From d4733a7976306b9d71b8f378014ad6909d529846 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Feb 2024 03:51:47 +0000 Subject: [PATCH 1/6] gh-actions(deps): Bump the gh-actions-dependencies group with 2 updates Bumps the gh-actions-dependencies group with 2 updates: [nick-fields/retry](https://github.com/nick-fields/retry) and [codecov/codecov-action](https://github.com/codecov/codecov-action). Updates `nick-fields/retry` from 2 to 3 - [Release notes](https://github.com/nick-fields/retry/releases) - [Changelog](https://github.com/nick-fields/retry/blob/master/.releaserc.js) - [Commits](https://github.com/nick-fields/retry/compare/v2...v3) Updates `codecov/codecov-action` from 3 to 4 - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v3...v4) --- updated-dependencies: - dependency-name: nick-fields/retry dependency-type: direct:production update-type: version-update:semver-major dependency-group: gh-actions-dependencies - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-major dependency-group: gh-actions-dependencies ... Signed-off-by: dependabot[bot] --- .github/workflows/package-release.yml | 2 +- .github/workflows/package-testpypi.yml | 2 +- .github/workflows/test-code.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/package-release.yml b/.github/workflows/package-release.yml index 653d093a..55658c0b 100644 --- a/.github/workflows/package-release.yml +++ b/.github/workflows/package-release.yml @@ -155,7 +155,7 @@ jobs: check-latest: true - name: Test installing package # A retry is used to allow for some downtime before the package is installable - uses: nick-fields/retry@v2 + uses: nick-fields/retry@v3 with: timeout_minutes: 10 max_attempts: 5 diff --git a/.github/workflows/package-testpypi.yml b/.github/workflows/package-testpypi.yml index b18a84b5..b034a85e 100644 --- a/.github/workflows/package-testpypi.yml +++ b/.github/workflows/package-testpypi.yml @@ -66,7 +66,7 @@ jobs: check-latest: true - name: Test installing from test.pypi.org # A retry is used to allow for some downtime before the package is installable - uses: nick-fields/retry@v2 + uses: nick-fields/retry@v3 with: timeout_minutes: 10 max_attempts: 5 diff --git a/.github/workflows/test-code.yml b/.github/workflows/test-code.yml index 8ce1bccb..848e80f0 100644 --- a/.github/workflows/test-code.yml +++ b/.github/workflows/test-code.yml @@ -67,7 +67,7 @@ jobs: .results_*/** .coverage* - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 if: ${{ !cancelled() }} with: token: ${{ secrets.CODECOV_TOKEN }} From e839d8ef7d2d98997c68c4503ec0d467bc1fa2d2 Mon Sep 17 00:00:00 2001 From: Nicholas Felt Date: Mon, 5 Feb 2024 14:56:01 -0800 Subject: [PATCH 2/6] ci: Update pre-commit hook versions. --- .github/workflows/test-code.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-code.yml b/.github/workflows/test-code.yml index 848e80f0..cabd600a 100644 --- a/.github/workflows/test-code.yml +++ b/.github/workflows/test-code.yml @@ -69,8 +69,9 @@ jobs: - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 if: ${{ !cancelled() }} + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} with: - token: ${{ secrets.CODECOV_TOKEN }} files: ./.coverage_tests.xml name: codecov-${{ matrix.os_name }} fail_ci_if_error: true From 95e673a6bfd42245488d0a1706b8701d945bfb18 Mon Sep 17 00:00:00 2001 From: Nicholas Felt Date: Mon, 5 Feb 2024 15:31:55 -0800 Subject: [PATCH 3/6] ci: Update linter versions. --- .pre-commit-config.yaml | 4 ++-- pyproject.toml | 34 ++++++++++++++-------------------- 2 files changed, 16 insertions(+), 22 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cb8f808f..0cd5b41e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -41,7 +41,7 @@ repos: - id: check-github-actions - id: check-github-workflows - repo: https://github.com/commitizen-tools/commitizen - rev: v3.14.0 + rev: v3.14.1 hooks: - id: commitizen stages: [commit-msg] @@ -125,7 +125,7 @@ repos: always_run: true args: [., --min=10] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.15 + rev: v0.2.1 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] diff --git a/pyproject.toml b/pyproject.toml index 481c4192..7c281fef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -105,7 +105,7 @@ poetry = ">=1.5.1" pre-commit = ">=2.20.0" pre-commit-update = ">=0.1.3" pylint = {extras = ["spelling"], version = "3.0.3"} # Update this by running scripts/update_development_dependencies.py -pyright = "1.1.349" # Update this by running scripts/update_development_dependencies.py +pyright = "1.1.350" # Update this by running scripts/update_development_dependencies.py pyroma = ">=4.2" pytest = ">=7.1.2" pytest-cov = ">=3.0.0" @@ -113,7 +113,7 @@ pytest-html = ">=4.0" pytest-order = ">=1.0.1" pytest-profiling = ">=1.7.0" python-semantic-release = ">=8.5.1" -ruff = "0.1.15" # Update this by running scripts/update_development_dependencies.py +ruff = "0.2.1" # Update this by running scripts/update_development_dependencies.py safety = ">=2.1.1" sphinx-autoapi = ">=2.0.0" sphinx-copybutton = ">=0.5.1" @@ -267,6 +267,12 @@ ignore_directives = [ ] [tool.ruff] +line-length = 100 +namespace-packages = ["examples/**", "scripts/**", "tests/**"] +src = ["docs", "examples", "scripts", "src", "tests"] +target-version = "py38" # always generate Python 3.8 compatible code + +[tool.ruff.lint] allowed-confusables = ["¸", "×"] fixable = [ "F401", @@ -274,6 +280,8 @@ fixable = [ "I", "RUF100" ] +flake8-pytest-style = {mark-parentheses = false} +flake8-quotes = {docstring-quotes = "double"} ignore = [ "ANN101", # Missing type annotation for self in method "ANN102", # Missing type annotation for cls in method @@ -297,23 +305,15 @@ ignore = [ "UP024", # Replace aliased errors with `OSError` "UP037" # Remove quotes from type annotation ] -line-length = 100 -namespace-packages = ["examples/**", "scripts/**", "tests/**"] +pydocstyle = {convention = "google"} +pylint = {max-args = 7} # https://beta.ruff.rs/docs/rules/ select = [ "ALL" ] -src = ["docs", "examples", "scripts", "src", "tests"] -target-version = "py38" # always generate Python 3.8 compatible code task-tags = ["FIXME", "FUTURE", "RELIC", "TODO"] -[tool.ruff.flake8-pytest-style] -mark-parentheses = false - -[tool.ruff.flake8-quotes] -docstring-quotes = "double" - -[tool.ruff.isort] +[tool.ruff.lint.isort] force-sort-within-sections = false known-first-party = [ "conftest", @@ -323,7 +323,7 @@ known-first-party = [ lines-between-types = 1 order-by-type = false -[tool.ruff.per-file-ignores] +[tool.ruff.lint.per-file-ignores] "examples/**" = [ "S101" # Use of assert detected ] @@ -355,12 +355,6 @@ order-by-type = false "PYI053" # String and bytes literals longer than 50 characters are not permitted ] -[tool.ruff.pydocstyle] -convention = "google" - -[tool.ruff.pylint] -max-args = 7 - [tool.semantic_release] version_toml = [ "pyproject.toml:tool.poetry.version" From 0de7e32f171b703948cfc400ae523ae1ca008e50 Mon Sep 17 00:00:00 2001 From: Nicholas Felt Date: Mon, 5 Feb 2024 15:41:25 -0800 Subject: [PATCH 4/6] ci: Change how the codecov action is called, increase verbosity to debug failures. --- .github/workflows/test-code.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-code.yml b/.github/workflows/test-code.yml index cabd600a..1f7052bb 100644 --- a/.github/workflows/test-code.yml +++ b/.github/workflows/test-code.yml @@ -69,12 +69,12 @@ jobs: - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 if: ${{ !cancelled() }} - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} with: + token: ${{ secrets.CODECOV_TOKEN }} files: ./.coverage_tests.xml name: codecov-${{ matrix.os_name }} fail_ci_if_error: true + verbose: true # Check that all jobs passed check-tests-passed: if: ${{ !cancelled() }} From 9e6d22325277ed71dcb62119911f91813b1dc6de Mon Sep 17 00:00:00 2001 From: Nicholas Felt Date: Mon, 5 Feb 2024 15:46:21 -0800 Subject: [PATCH 5/6] ci: Install python coverage package to try to get coverage upload to detect files. --- .github/workflows/test-code.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-code.yml b/.github/workflows/test-code.yml index 1f7052bb..c70d87c3 100644 --- a/.github/workflows/test-code.yml +++ b/.github/workflows/test-code.yml @@ -55,8 +55,7 @@ jobs: check-latest: true - name: Install tox run: | - python -m pip install --upgrade pip - python -m pip install --upgrade tox + python -m pip install --upgrade pip tox coverage - name: Test run: tox -ve tests - uses: actions/upload-artifact@v4 @@ -67,11 +66,10 @@ jobs: .results_*/** .coverage* - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v4.0.1 if: ${{ !cancelled() }} with: token: ${{ secrets.CODECOV_TOKEN }} - files: ./.coverage_tests.xml name: codecov-${{ matrix.os_name }} fail_ci_if_error: true verbose: true From 9bbd991b66aa10d17ca9b2410ce3338276cca09d Mon Sep 17 00:00:00 2001 From: Nicholas Felt Date: Mon, 5 Feb 2024 15:53:43 -0800 Subject: [PATCH 6/6] ci: Attempt to use the full workspace for the coverage filepath. --- .github/workflows/test-code.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-code.yml b/.github/workflows/test-code.yml index c70d87c3..4e28f923 100644 --- a/.github/workflows/test-code.yml +++ b/.github/workflows/test-code.yml @@ -55,7 +55,8 @@ jobs: check-latest: true - name: Install tox run: | - python -m pip install --upgrade pip tox coverage + python -m pip install --upgrade pip + python -m pip install --upgrade tox - name: Test run: tox -ve tests - uses: actions/upload-artifact@v4 @@ -70,9 +71,9 @@ jobs: if: ${{ !cancelled() }} with: token: ${{ secrets.CODECOV_TOKEN }} + files: ${{ github.workspace }}/.coverage_tests.xml name: codecov-${{ matrix.os_name }} fail_ci_if_error: true - verbose: true # Check that all jobs passed check-tests-passed: if: ${{ !cancelled() }}