diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 091a1f9..e380385 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -80,6 +80,12 @@ Run static analysis (note that no output means all is well): flake8 ``` +Perform static type check: + +```bash +mypy -p snippet +``` + ## Documenting code Inclusion of docstrings is needed in all areas of the code for Flake8 diff --git a/README.md b/README.md index 9e3ee2b..48f52c3 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,13 @@ # Snippet - -[](https://armmbed.github.io/snippet) -[](https://pypi.org/project/code-snippet/) -[](https://pypi.org/project/code-snippet/) -[](https://pypi.org/project/code-snippet/) -[](https://github.com/ARMmbed/code-snippet/blob/master/LICENSE) + +[](https://armmbed.github.io/snippet) +[](https://pypi.org/project/code-snippet/) +[](https://pypi.org/project/code-snippet/) +[](https://pypi.org/project/code-snippet/) + +[](https://github.com/ARMmbed/snippet/blob/master/LICENSE) +[](https://armmbed.github.io/snippet/third_party_IP_report.html) [](https://dev.azure.com/mbed-tools/code-snippet/_build/latest?definitionId=15&branchName=master) [](https://codecov.io/gh/ARMmbed/snippet) diff --git a/azure-pipelines/build-release.yml b/azure-pipelines/build-release.yml index 579df96..4fdec5a 100644 --- a/azure-pipelines/build-release.yml +++ b/azure-pipelines/build-release.yml @@ -34,6 +34,11 @@ stages: Linux_Py_3_7: python.version: '3.7' vmImageName: ubuntu-latest + uploadCoverage: "false" + + Linux_Py_3_8: + python.version: '3.8' + vmImageName: ubuntu-latest uploadCoverage: "true" Windows_Py_3_6: @@ -46,6 +51,11 @@ stages: vmImageName: windows-latest uploadCoverage: "false" + Windows_Py_3_8: + python.version: '3.8' + vmImageName: windows-latest + uploadCoverage: "false" + macOS_Py_3_6: python.version: '3.6' vmImageName: macOS-latest @@ -55,6 +65,12 @@ stages: python.version: '3.7' vmImageName: macOS-latest uploadCoverage: "false" + + macOS_Py_3_8: + python.version: '3.8' + vmImageName: macOS-latest + uploadCoverage: "false" + pool: vmImage: $(vmImageName) @@ -150,10 +166,6 @@ stages: - template: steps/generate-spdx-documents.yml - - publish: $(temp_spdx_reports_path) - artifact: SPDX - displayName: 'Publish SPDX reports' - # Collect test and build stages together before the release stages to provide a pass/fail point for the status badge. - stage: CiCheckpoint displayName: 'CI Checkpoint' diff --git a/azure-pipelines/steps/generate-spdx-documents.yml b/azure-pipelines/steps/generate-spdx-documents.yml index 9e3f08d..f2f2bf9 100644 --- a/azure-pipelines/steps/generate-spdx-documents.yml +++ b/azure-pipelines/steps/generate-spdx-documents.yml @@ -10,4 +10,9 @@ steps: - script: | license-files - displayName: 'Add copyright/licence notice.' \ No newline at end of file + displayName: 'Add copyright/licence notice.' + + - publish: $(temp_spdx_reports_path) + artifact: SPDX + displayName: 'Publish SPDX reports' + condition: always() diff --git a/news/20200428.bugfix b/news/20200428.bugfix new file mode 100644 index 0000000..b5367de --- /dev/null +++ b/news/20200428.bugfix @@ -0,0 +1 @@ +Checked 3rd-party licences. \ No newline at end of file diff --git a/news/20200428.misc b/news/20200428.misc new file mode 100644 index 0000000..34f380d --- /dev/null +++ b/news/20200428.misc @@ -0,0 +1 @@ +Reset project's structure with latest template. \ No newline at end of file diff --git a/news/2020042801.bugfix b/news/2020042801.bugfix new file mode 100644 index 0000000..ad786f9 --- /dev/null +++ b/news/2020042801.bugfix @@ -0,0 +1 @@ +Tested on Python 3.8. \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 387f092..34b91de 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,6 +18,9 @@ DOCUMENTATION_PRODUCTION_OUTPUT_PATH = "docs" VERSION_FILE_PATH = "snippet/_version.py" CHANGELOG_FILE_PATH = "CHANGELOG.md" +[ProjectConfig.PACKAGES_WITH_CHECKED_LICENCE] +python-dotenv = "BSD-3-Clause" + [AutoVersionConfig] CONFIG_NAME = "DEFAULT" PRERELEASE_TOKEN = "beta" diff --git a/setup.py b/setup.py index 1807c1a..e5a1900 100644 --- a/setup.py +++ b/setup.py @@ -32,6 +32,7 @@ "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", "Topic :: Software Development :: Build Tools", "Topic :: Documentation", "Topic :: Software Development :: Documentation", @@ -46,7 +47,7 @@ name=PROJECT_SLUG, packages=[SOURCE_DIR], python_requires=">=3.6,<4", - url=f"https://github.com/ARMmbed/snippet", + url="https://github.com/ARMmbed/snippet", version=__version__, entry_points=dict( console_scripts=[ diff --git a/snippet/api.py b/snippet/api.py index b6c0189..3d43ef6 100644 --- a/snippet/api.py +++ b/snippet/api.py @@ -18,4 +18,4 @@ def extract_code_snippets(config: config.Config) -> None: LOGGER.error( "failures:\n%s", textwrap.indent("\n".join(f"{name}: {exc}" for name, exc in failures), prefix=" ") ) - raise Exception(f"There were %s failures!" % len(failures)) + raise Exception(f"There were {len(failures)} failures!")