From 06066caf5d78e9542b55044644943dfa331b64e8 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Mon, 15 Mar 2021 11:06:30 +0100 Subject: [PATCH 1/4] update coverage --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6846de4330..3ac7668d95 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -62,7 +62,7 @@ jobs: - bash: | python -m coverage report - python -m coverage xml -o '$(Build.SourcesDirectory)/coverage.xml' + python -m coverage xml python -m coverage html python -m codecov --token=$(CODECOV_TOKEN) --commit=$(Build.SourceVersion) --flags=gpu,pytest --name="GPU-coverage" --env=linux,azure ls -l @@ -79,7 +79,7 @@ jobs: displayName: 'Publish coverage report' inputs: codeCoverageTool: 'cobertura' - summaryFileLocation: '$(Build.SourcesDirectory)/coverage.xml' + summaryFileLocation: 'coverage.xml' reportDirectory: '$(Build.SourcesDirectory)/htmlcov' testRunTitle: '$(Agent.OS) - $(Build.BuildNumber)[$(Agent.JobName)] - Python $(python.version)' condition: succeededOrFailed() From 96d4b1cd4c0c36e573759dbb0650099880e77a8d Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Mon, 15 Mar 2021 11:10:48 +0100 Subject: [PATCH 2/4] update coverage --- setup.cfg | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/setup.cfg b/setup.cfg index e57d83a522..784b6315b9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -9,19 +9,22 @@ addopts = --durations=0 --color=yes + +[coverage:run] +parallel = True +concurrency = thread, multiprocessing + [coverage:report] exclude_lines = pragma: no-cover pass if __name__ == .__main__.: - add_model_specific_args - -[coverage:run] # TODO, remove this ignores in future omit = pl_bolts/datamodules/*_datamodule.py pl_bolts/datamodules/*_dataset.py + [flake8] max-line-length = 120 exclude = .tox,*.egg,build,temp @@ -38,6 +41,7 @@ ignore = W504 # Ignore "Line break occurred after a binary operator" W605 # Ignore "Invalid escape sequence 'x'" + [yapf] based_on_style = pep8 spaces_before_comment = 2 @@ -50,7 +54,7 @@ ALLOW_SPLIT_BEFORE_DICT_VALUE = false BLANK_LINE_BEFORE_NESTED_CLASS_OR_DEF = true NO_SPACES_AROUND_SELECTED_BINARY_OPERATORS = false -# setup.cfg or tox.ini + [check-manifest] ignore = *.yml @@ -58,12 +62,14 @@ ignore = .github/* .circleci + [metadata] license_file = LICENSE description-file = README.md # long_description = file:README.md # long_description_content_type = text/markdown + [isort] known_first_party = pl_bolts @@ -75,6 +81,7 @@ order_by_type = False multi_line_output = 3 include_trailing_comma = True + [mypy] # Typing tests is low priority, but enabling type checking on the # untyped test functions (using `--check-untyped-defs`) is still From b8809cbd204af84040603bf4ce19ef9171e5b545 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Mon, 15 Mar 2021 12:24:33 +0100 Subject: [PATCH 3/4] Apply suggestions from code review --- setup.cfg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 784b6315b9..5376e131e7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -12,7 +12,8 @@ addopts = [coverage:run] parallel = True -concurrency = thread, multiprocessing +#concurrency = thread, multiprocessing +concurrency = thread [coverage:report] exclude_lines = From cc75f12e497d90db77b4ec718925ed3be429766f Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Mon, 15 Mar 2021 12:25:04 +0100 Subject: [PATCH 4/4] Apply suggestions from code review --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3ac7668d95..e721de3d89 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -79,7 +79,7 @@ jobs: displayName: 'Publish coverage report' inputs: codeCoverageTool: 'cobertura' - summaryFileLocation: 'coverage.xml' + summaryFileLocation: '$(Build.SourcesDirectory)/coverage.xml' reportDirectory: '$(Build.SourcesDirectory)/htmlcov' testRunTitle: '$(Agent.OS) - $(Build.BuildNumber)[$(Agent.JobName)] - Python $(python.version)' condition: succeededOrFailed()