From 63f2c9ea51d54813b8aa9f3bbabc05fcaa27f03e Mon Sep 17 00:00:00 2001 From: Adrien Berchet Date: Tue, 12 Sep 2023 13:27:07 +0200 Subject: [PATCH] Chore: Apply Copier template --- .auto-changelog | 2 +- .copier-answers.yml | 4 +- .github/dependabot.yml | 3 ++ .github/workflows/codeql.yml | 71 ----------------------------------- .github/workflows/run-tox.yml | 2 +- .pre-commit-config.yaml | 6 +-- package.json | 24 ++++++------ tox.ini | 2 +- 8 files changed, 23 insertions(+), 91 deletions(-) delete mode 100644 .github/workflows/codeql.yml diff --git a/.auto-changelog b/.auto-changelog index 6a107aba..263f3db0 100644 --- a/.auto-changelog +++ b/.auto-changelog @@ -3,7 +3,7 @@ "template": ".auto-changelog-template.hbs", "commitLimit": false, "backfillLimit": false, - "ignoreCommitPattern": "Release:? [0-9]+\\.[0-9]+\\.[0-9]+|Update CHANGELOG.*|.*\\[skip-changelog\\].*|\\[pre-commit.ci\\]", + "ignoreCommitPattern": "^Release:? [0-9]+\\.[0-9]+\\.[0-9]+$|^Update CHANGELOG.*|.*\\[skip-changelog\\].*|^\\[pre-commit.ci\\]|^\\(dependabot\\) .*", "commitUrl": "https://github.com/BlueBrain/NeuroTS/commit/{id}", "issueUrl": "https://github.com/BlueBrain/NeuroTS/issues/{id}", "mergeUrl": "https://github.com/BlueBrain/NeuroTS/pull/{id}", diff --git a/.copier-answers.yml b/.copier-answers.yml index 69c0f61d..64db666e 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,6 +1,6 @@ # Changes here will be overwritten by Copier -_commit: 0.1.44 +_commit: 0.1.51 _src_path: git@bbpgitlab.epfl.ch:neuromath/python-template.git author_email: '' author_name: Blue Brain Project, EPFL @@ -18,8 +18,8 @@ project_url: https://NeuroTS.readthedocs.io repository_name: NeuroTS repository_namespace: BlueBrain repository_provider: github +setup_codeql: false ssh_url: git@github.com:BlueBrain/NeuroTS.git -support_py37: false team_name: neuromath tracker_url: https://github.com/BlueBrain/NeuroTS/issues use_pyproject_toml: false diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 870e6546..a6aa10ab 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -11,3 +11,6 @@ updates: directory: "/" # Check the repository's workflows under /.github/workflows/ schedule: interval: "weekly" + commit-message: + # Prefix all commit messages with "CI(dependabot): " + prefix: "CI(dependabot): " diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml deleted file mode 100644 index f81596d7..00000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,71 +0,0 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. -# -name: "CodeQL" - -on: - push: - branches: [ "main" ] - schedule: - - cron: '56 17 * * 4' - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: [ 'python' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] - # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - - # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs - # queries: security-extended,security-and-quality - - - # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v2 - - # ℹī¸ Command-line programs to run using the OS shell. - # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun - - # If the Autobuild fails above, remove it and uncomment the following three lines. - # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. - - # - run: | - # echo "Run, Build Application using script" - # ./location_of_script_within_repo/buildscript.sh - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 - with: - category: "/language:${{matrix.language}}" diff --git a/.github/workflows/run-tox.yml b/.github/workflows/run-tox.yml index 6c30bc97..e4714fa0 100644 --- a/.github/workflows/run-tox.yml +++ b/.github/workflows/run-tox.yml @@ -58,7 +58,7 @@ jobs: uses: codecov/codecov-action@v3 with: fail_ci_if_error: false - files: ./coverage.xml + directory: ./reports flags: pytest name: "NeuroTS-py${{ matrix.python-version }}-${{ matrix.min_versions }}" - name: Upload test artifacts diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9bf3d1c5..6fa9e94c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -24,11 +24,11 @@ repos: hooks: - id: isort - repo: https://github.com/psf/black - rev: 23.3.0 + rev: 23.9.1 hooks: - id: black - repo: https://github.com/codespell-project/codespell - rev: v2.2.4 + rev: v2.2.5 hooks: - id: codespell args: ["-x", ".codespellignorelines"] @@ -38,6 +38,6 @@ repos: - id: pydocstyle additional_dependencies: ["tomli"] - repo: https://github.com/PyCQA/flake8 - rev: 6.0.0 + rev: 6.1.0 hooks: - id: flake8 diff --git a/package.json b/package.json index 2b86e819..3fdf4a45 100644 --- a/package.json +++ b/package.json @@ -5,29 +5,29 @@ "([bB]reaking: ?)": "", "([bB]reaking change: ?)": "", "(^[bB]uild: ?)": "", - "(^[bB]uild\\((.*)\\): ?)": "\\($2\\)", + "(^[bB]uild\\((.*)\\): ?)": "($2) ", "(^[cC]hore: ?)": "", - "(^[cC]hore\\((.*)\\): ?)": "\\($2\\)", + "(^[cC]hore\\((.*)\\): ?)": "($2) ", "(^[cC][iI]: ?)": "", - "(^[cC][iI]\\((.*)\\): ?)": "\\($2\\)", + "(^[cC][iI]\\((.*)\\): ?)": "($2) ", "(^[dD]eprecate: ?)": "", - "(^[dD]eprecate\\((.*)\\): ?)": "\\($2\\)", + "(^[dD]eprecate\\((.*)\\): ?)": "($2) ", "(^[dD]ocs: ?)": "", - "(^[dD]ocs\\((.*)\\): ?)": "\\($2\\)", + "(^[dD]ocs\\((.*)\\): ?)": "($2) ", "(^[fF]eat: ?)": "", - "(^[fF]eat\\((.*)\\): ?)": "\\($2\\)", + "(^[fF]eat\\((.*)\\): ?)": "($2) ", "(^[fF]ix: ?)": "", - "(^[fF]ix\\((.*)\\): ?)": "\\($2\\)", + "(^[fF]ix\\((.*)\\): ?)": "($2) ", "(^[pP]erf: ?)": "", - "(^[pP]erf\\((.*)\\): ?)": "\\($2\\)", + "(^[pP]erf\\((.*)\\): ?)": "($2) ", "(^[rR]efactor: ?)": "", - "(^[rR]efactor\\((.*)\\): ?)": "\\($2\\)", + "(^[rR]efactor\\((.*)\\): ?)": "($2) ", "(^[rR]evert: ?)": "", - "(^[rR]evert\\((.*)\\): ?)": "\\($2\\)", + "(^[rR]evert\\((.*)\\): ?)": "($2) ", "(^[sS]tyle: ?)": "", - "(^[sS]tyle\\((.*)\\): ?)": "\\($2\\)", + "(^[sS]tyle\\((.*)\\): ?)": "($2) ", "(^[tT]est: ?)": "", - "(^[tT]est\\((.*)\\): ?)": "\\($2\\)" + "(^[tT]est\\((.*)\\): ?)": "($2) " } } } diff --git a/tox.ini b/tox.ini index 7e96ce17..86c0624b 100644 --- a/tox.ini +++ b/tox.ini @@ -92,6 +92,6 @@ commands = [gh-actions] python = 3.8: py38, lint - 3.9: py39, docs, coverage + 3.9: py39, docs 3.10: py310, check-packaging 3.11: py311