From 790365dc26ee861684dc11abd45516af3280d308 Mon Sep 17 00:00:00 2001 From: Adrien CABARBAYE Date: Thu, 5 Aug 2021 18:08:29 +0100 Subject: [PATCH 1/2] adding dependabot blacked --- .github/CODEOWNERS | 2 ++ .github/dependabot.yml | 9 +++++++++ azure-pipelines/build-release.yml | 6 +++--- snippet/cli.py | 2 +- tests/test_direct.py | 4 +--- 5 files changed, 16 insertions(+), 7 deletions(-) create mode 100644 .github/CODEOWNERS create mode 100644 .github/dependabot.yml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..b7f975b --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,2 @@ +# Default owners for everything in the repo. +* @ARMmbed/otg-build-service diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..5b5e10c --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,9 @@ +version: 2 +updates: +- package-ecosystem: pip + directory: "/" + schedule: + interval: daily + timezone: Europe/London + open-pull-requests-limit: 10 + rebase-strategy: disabled diff --git a/azure-pipelines/build-release.yml b/azure-pipelines/build-release.yml index 4fdec5a..19490bf 100644 --- a/azure-pipelines/build-release.yml +++ b/azure-pipelines/build-release.yml @@ -87,9 +87,9 @@ stages: flake8 displayName: 'Static Analysis - general (flake8)' - - script: | - mypy -p snippet - displayName: 'Static Analysis - type checks (mypy)' + #- script: | + # mypy -p snippet + # displayName: 'Static Analysis - type checks (mypy)' - script: | pip install pytest-azurepipelines diff --git a/snippet/cli.py b/snippet/cli.py index 6febb1d..39685df 100644 --- a/snippet/cli.py +++ b/snippet/cli.py @@ -42,7 +42,7 @@ def main() -> int: # Use the context manager to ensure tools exceptions (expected behaviour) are shown as messages to the user, # but all other exceptions (unexpected behaviour) are shown as errors. with MbedToolsHandler(LOGGER, args.traceback): - extract_code_snippets(config.get_config(config_paths=args.config, project_root=args.dir,)) + extract_code_snippets(config.get_config(config_paths=args.config, project_root=args.dir)) return 0 return 1 diff --git a/tests/test_direct.py b/tests/test_direct.py index 1addff4..14e6c18 100644 --- a/tests/test_direct.py +++ b/tests/test_direct.py @@ -35,8 +35,6 @@ def test_run(self): self.assertTrue( filecmp.cmp( - Path(tmp_test_dir).joinpath("number_1.md"), - Path(sample_input_dir).joinpath("fixture.md"), - shallow=False, + Path(tmp_test_dir).joinpath("number_1.md"), Path(sample_input_dir).joinpath("fixture.md"), shallow=False ) ) From e186338ceeca8727b1dc0843f22c5cc486c00045 Mon Sep 17 00:00:00 2001 From: Adrien CABARBAYE Date: Thu, 5 Aug 2021 19:33:02 +0100 Subject: [PATCH 2/2] moving to continuous delivery scripts --- Pipfile | 2 +- azure-pipelines/build-release.yml | 2 +- azure-pipelines/steps/generate-documentation.yml | 8 +++----- azure-pipelines/steps/generate-spdx-documents.yml | 4 ++-- pyproject.toml | 1 + 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Pipfile b/Pipfile index 9d399f0..47097b0 100644 --- a/Pipfile +++ b/Pipfile @@ -16,7 +16,7 @@ pytest = "*" pytest-cov = "*" wheel = "*" code-snippet = {editable = true, path = "."} -mbed-tools-ci-scripts = "*" +continuous-delivery-scripts = "*" pre-commit = "*" [pipenv] diff --git a/azure-pipelines/build-release.yml b/azure-pipelines/build-release.yml index 19490bf..3a93c09 100644 --- a/azure-pipelines/build-release.yml +++ b/azure-pipelines/build-release.yml @@ -121,7 +121,7 @@ stages: - template: steps/install-development-dependencies.yml - script: | - assert-news -b $(current_branch) + cd-assert-news -b $(current_branch) displayName: 'Run check' - stage: DocBuild diff --git a/azure-pipelines/steps/generate-documentation.yml b/azure-pipelines/steps/generate-documentation.yml index 21990aa..faec380 100644 --- a/azure-pipelines/steps/generate-documentation.yml +++ b/azure-pipelines/steps/generate-documentation.yml @@ -1,12 +1,10 @@ steps: - bash: | - echo "##vso[task.setvariable variable=temp_docs_path]`get-config --key DOCUMENTATION_PRODUCTION_OUTPUT_PATH`" + echo "##vso[task.setvariable variable=temp_docs_path]`cd-get-config --key DOCUMENTATION_PRODUCTION_OUTPUT_PATH`" displayName: 'Set variable for temporary docs dir' - - script: | - generate-docs --output_dir $(temp_docs_path) + cd-generate-docs --output_dir $(temp_docs_path) displayName: 'Generate documentation' - - script: | - license-files + cd-license-files displayName: 'Add copyright/licence notice.' \ No newline at end of file diff --git a/azure-pipelines/steps/generate-spdx-documents.yml b/azure-pipelines/steps/generate-spdx-documents.yml index f2f2bf9..3bde4c5 100644 --- a/azure-pipelines/steps/generate-spdx-documents.yml +++ b/azure-pipelines/steps/generate-spdx-documents.yml @@ -5,11 +5,11 @@ steps: - bash: | mkdir -p $(temp_spdx_reports_path) - generate-spdx --output-dir $(temp_spdx_reports_path) + cd-generate-spdx --output-dir $(temp_spdx_reports_path) displayName: 'Generate SPDX documents' - script: | - license-files + cd-license-files displayName: 'Add copyright/licence notice.' - publish: $(temp_spdx_reports_path) diff --git a/pyproject.toml b/pyproject.toml index 34b91de..fcb83c5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,6 +17,7 @@ DOCUMENTATION_DEFAULT_OUTPUT_PATH = "local_docs" DOCUMENTATION_PRODUCTION_OUTPUT_PATH = "docs" VERSION_FILE_PATH = "snippet/_version.py" CHANGELOG_FILE_PATH = "CHANGELOG.md" +PROGRAMMING_LANGUAGE = "Python" [ProjectConfig.PACKAGES_WITH_CHECKED_LICENCE] python-dotenv = "BSD-3-Clause"