Skip to content

Commit 64d0fa4

Browse files
authored
update coverage config (#6524)
* update coverage config * parallel * parallel * Apply suggestions from code review * Apply suggestions from code review * paralel * paralel * paralel * combine * combine * . * .. * .. * .. * rev * cb * cb * drop * drop * . * .. * ... * ... * ... * .
1 parent fd5cb7f commit 64d0fa4

File tree

7 files changed

+7
-12
lines changed

7 files changed

+7
-12
lines changed

.github/workflows/ci_test-base.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
- name: Test Package [only]
6969
run: |
7070
# NOTE: run coverage on tests does not propagare faler status for Win, https://github.com/nedbat/coveragepy/issues/1003
71-
python -m pytest pytorch_lightning -v --cov=pytorch_lightning --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml
71+
coverage run --source pytorch_lightning -m pytest pytorch_lightning -v --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml
7272
7373
- name: Upload pytest test results
7474
uses: actions/upload-artifact@v2

.github/workflows/ci_test-conda.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
- name: Tests
4545
run: |
4646
# NOTE: run coverage on tests does not propagare faler status for Win, https://github.com/nedbat/coveragepy/issues/1003
47-
python -m pytest pytorch_lightning tests --cov=pytorch_lightning -v --durations=50 --junitxml=junit/test-results-${{ runner.os }}-torch${{ matrix.pytorch-version }}.xml
47+
coverage run --source pytorch_lightning -m pytest pytorch_lightning tests -v --durations=50 --junitxml=junit/test-results-${{ runner.os }}-torch${{ matrix.pytorch-version }}.xml
4848
shell: bash -l {0}
4949

5050
- name: Upload pytest results

.github/workflows/ci_test-full.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ jobs:
134134
- name: Tests
135135
run: |
136136
# NOTE: do not include coverage report here, see: https://github.com/nedbat/coveragepy/issues/1003
137-
python -m pytest pytorch_lightning tests --cov=pytorch_lightning -v --durations=50 --junitxml=junit/test-results-${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.requires }}.xml
137+
coverage run --source pytorch_lightning -m pytest pytorch_lightning tests -v --durations=50 --junitxml=junit/test-results-${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.requires }}.xml
138138
139139
- name: Examples
140140
run: |

azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
displayName: 'Get legacy checkpoints'
7979
8080
- bash: |
81-
python -m pytest pytorch_lightning tests -v --cov=pytorch_lightning --junitxml=$(Build.StagingDirectory)/test-results.xml --durations=50
81+
python -m coverage run --source pytorch_lightning -m pytest pytorch_lightning tests -v --junitxml=$(Build.StagingDirectory)/test-results.xml --durations=50
8282
displayName: 'Testing: standard'
8383
8484
- bash: |

requirements/test.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
coverage>5.2.0
22
codecov>=2.1
33
pytest>=6.0
4-
pytest-cov>2.10
5-
# pytest-xdist
4+
#pytest-cov>2.10
5+
#pytest-xdist
66
flake8>=3.6
77
check-manifest
88
twine==3.2

setup.cfg

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,6 @@ omit =
4747
pytorch_lightning/utilities/xla_device_utils.py
4848
pytorch_lightning/utilities/distributed.py
4949
pytorch_lightning/tuner/auto_gpu_select.py
50-
# TODO: temporary, until accelerator refactor is finished
51-
pytorch_lightning/accelerators/accelerator.py
52-
pytorch_lightning/plugins/training_type/*.py
53-
pytorch_lightning/plugins/precision/*.py
54-
pytorch_lightning/plugins/base_plugin.py
5550

5651

5752
[flake8]

tests/special_tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# Running special tests
1515
set -e
1616
export PL_RUNNING_SPECIAL_TESTS=1
17-
DEFAULTS="-m coverage run --source pytorch_lightning -a -m pytest --verbose --capture=no"
17+
DEFAULTS="-m coverage run --source pytorch_lightning --append -m pytest --verbose --capture=no"
1818
python ${DEFAULTS} tests/trainer/optimization/test_manual_optimization.py::test_step_with_optimizer_closure_with_different_frequencies_ddp
1919
python ${DEFAULTS} tests/models/test_sync_batchnorm.py::test_sync_batchnorm_ddp
2020
python ${DEFAULTS} tests/plugins/test_deepspeed_plugin.py::test_invalid_deepspeed_defaults_no_precision

0 commit comments

Comments
 (0)