diff --git a/.github/workflows/run-test-suite.yml b/.github/workflows/run-test-suite.yml index b9cbb5fe6c..4f47b0cae3 100644 --- a/.github/workflows/run-test-suite.yml +++ b/.github/workflows/run-test-suite.yml @@ -146,8 +146,11 @@ jobs: # Also, it means code coverage is only generated if the test suite is # passing at least for that job, avoiding useless coverage reports. uses: codecov/codecov-action@v3 + # Warning: GitHub Actions expressions require single-quoted strings. + # Double quotes will break workflow validation (even though YAML allows + # them). So don't change the quoting below. if: | - matrix.os == "ubuntu-latest" && matrix.python-version == "3.10" + matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10' with: file: | ${{ github.workspace }}/main/cf/test/cf_coverage_reports/coverage.xml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3aa8dd0405..2351cbcdac 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,7 +10,7 @@ repos: # Use specific format-enforcing pre-commit hooks from the core library # with the default configuration (see pre-commit.com for documentation) - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v6.0.0 hooks: - id: check-ast - id: debug-statements @@ -23,7 +23,7 @@ repos: # (see https://black.readthedocs.io/en/stable/ for documentation and see # the cf-python pyproject.toml file for our custom black configuration) - repo: https://github.com/ambv/black - rev: 24.4.2 + rev: 25.12.0 hooks: - id: black language_version: python3 @@ -53,7 +53,7 @@ repos: # (see https://flake8.pycqa.org/en/latest/ for documentation and see # the cf-python .flake8 file for our custom flake8 configuration) - repo: https://github.com/PyCQA/flake8 - rev: 7.1.0 + rev: 7.3.0 hooks: - id: flake8 @@ -62,7 +62,7 @@ repos: # compatible with 'black' with the lines set to ensure so in the repo's # pyproject.toml. Other than that and the below, no extra config is required. - repo: https://github.com/pycqa/isort - rev: 5.13.2 + rev: 7.0.0 hooks: - id: isort name: isort (python) diff --git a/pyproject.toml b/pyproject.toml index efc6ea52ec..8086e1e8a6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,8 +15,12 @@ profile = "black" # ... and since we set this against the black default line length: line_length=79 # Prevent isort from auto-formatting '__init__.py' file imports because -# they require a specific non-aphabetical (etc.) ordering else they will -# cause errors due to bad or circular importing across the modules. +# they require a specific non-alphabetical (etc.) ordering else they will +# cause errors due to bad or circular importing across the modules. Also +# skip the recipes, since we have a certain import order there for clarity +# and to avoid incompatibilities with some matplotlib and esmpy versions +# which can cause a seg fault if cf-plot/matplotlib is imported first. extend_skip_glob = [ "**/__init__.py", + "docs/source/recipes/**", ]