diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index b69161d5..5d0a1c58 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -34,7 +34,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: "3.11" + python-version: "3.12" - name: Display Python version run: python --version @@ -48,22 +48,10 @@ jobs: - name: Install tox via pipx run: pipx install tox - - name: Set up Homebrew - if: runner.os == 'macOS' - uses: Homebrew/actions/setup-homebrew@master - - - name: Install enchant on macOS - if: runner.os == 'macOS' - run: | - brew update - brew install enchant - - - name: Run tests with tox except linkcheck + - name: Run tests with tox except linkcheck and spelling if: runner.os != 'Linux' run: tox -m docs - env: - TOX_SKIP_ENV: docs-test-linkcheck - name: Run all tests with tox if: runner.os == 'Linux' - run: tox -m docs + run: tox -m docs-full diff --git a/.github/workflows/qa.yml b/.github/workflows/qa.yml index 1c37d53b..5556ff4c 100644 --- a/.github/workflows/qa.yml +++ b/.github/workflows/qa.yml @@ -28,7 +28,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: "3.11" + python-version: "3.12" - name: Display Python version run: python --version diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 91fc80d5..cb914ede 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,7 +26,7 @@ jobs: fail-fast: false matrix: os: ["ubuntu-latest", "windows-latest", "macos-latest"] - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12-dev"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/update-authors.yaml b/.github/workflows/update-authors.yaml index bcdcab23..8eb8aba8 100644 --- a/.github/workflows/update-authors.yaml +++ b/.github/workflows/update-authors.yaml @@ -27,7 +27,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: "3.11" + python-version: "3.12" - name: Update AUTHORS.rst file shell: python diff --git a/.markdownlint-cli2.jsonc b/.markdownlint-cli2.jsonc index 4498738e..936d01ce 100644 --- a/.markdownlint-cli2.jsonc +++ b/.markdownlint-cli2.jsonc @@ -4,32 +4,32 @@ "MD003": "atx", // heading-style "MD004": { // ul-style - "style": "dash" + "style": "dash", }, "MD013": { // line-length - "line_length": 100 + "line_length": 100, }, "MD014": false, // commands-show-output "MD024": { // no-duplicate-heading - "siblings_only": true + "siblings_only": true, }, "MD035": { // hr-style - "style": "---" + "style": "---", }, "MD048": { // code-fence-style - "style": "backtick" + "style": "backtick", }, "MD049": { // emphasis-style - "style": "underscore" + "style": "underscore", }, "MD050": { // strong-style - "style": "asterisk" - } - } + "style": "asterisk", + }, + }, } diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d81e4dc1..229c0fe0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,9 +1,11 @@ --- minimum_pre_commit_version: "2.17" default_stages: [commit] +default_language_version: + python: python3.12 ci: - skip: [mypy] + skip: [mypy, pylint] repos: # ---------------------------------------------- @@ -25,10 +27,15 @@ repos: # file checking out-of-the-box hooks - repo: https://github.com/pre-commit/pre-commit-hooks - rev: f71fa2c1f9cf5cb705f73dffe4b21f7c61470ba9 # frozen: v4.4.0 + rev: 2c9f875913ee60ca25ce70243dc24d5b6415598c # frozen: v4.6.0 hooks: - id: check-case-conflict - id: check-shebang-scripts-are-executable + exclude: '^.*\.rs$' + stages: [commit] + - id: check-symlinks + - id: destroyed-symlinks + - id: forbid-new-submodules # #################################################################################### # @@ -41,25 +48,21 @@ repos: # ---------------------------------------------- # ruff - python linter with fixing ability - - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: 47023bed2b253176c10ba0f760c85e952e52e5fd # frozen: v0.0.287 + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: 1dc9eb131c2ea4816c708e4d85820d2cc8542683 # frozen: v0.5.0 hooks: - id: ruff name: ruff (fix) args: ["--fix-only", "--exit-non-zero-on-fix", "--config=pyproject.toml"] - - # black - python formatter - - repo: https://github.com/psf/black - rev: b70b2c619671f0c6adc722742181bd2fa6e2a2f4 # frozen: 23.9.0 - hooks: - - id: black - args: ["--safe"] + - id: ruff-format + name: ruff (format) # blacken-docs - black for python code in docs (rst/md/tex) - repo: https://github.com/asottile/blacken-docs - rev: 960ead214cd1184149d366c6d27ca6c369ce46b6 # frozen: 1.16.0 + rev: 4c97c4a0d921007af6fefae92d8447cfbf63720b # frozen: 1.18.0 hooks: - id: blacken-docs + args: ["--line-length=100", "--target-version=py312"] exclude: testing|tests # ---------------------------------------------- @@ -68,9 +71,11 @@ repos: # prettier - multi formatter - repo: https://github.com/pre-commit/mirrors-prettier - rev: fc260393cc4ec09f8fc0a5ba4437f481c8b55dc1 # frozen: v3.0.3 + rev: f12edd9c7be1c20cfa42420fd0e6df71e42b51ea # frozen: v4.0.0-alpha.8 hooks: - id: prettier + additional_dependencies: + - "prettier@^3.2.4" # ---------------------------------------------- # Spelling dict @@ -99,7 +104,7 @@ repos: # code unspecific out-of-the-box hooks - repo: https://github.com/pre-commit/pre-commit-hooks - rev: f71fa2c1f9cf5cb705f73dffe4b21f7c61470ba9 # frozen: v4.4.0 + rev: 2c9f875913ee60ca25ce70243dc24d5b6415598c # frozen: v4.6.0 hooks: - id: end-of-file-fixer stages: [commit] @@ -118,18 +123,18 @@ repos: - repo: local hooks: - # Find TODO:|FIXME:|BUG: comments in all files + # Find TODO:|FIXME: comments in all files # Inline skip: `#i#` directly after the colon after the tag-word - id: find-todos - name: "Find TODO:|FIXME:|BUG: comments" - description: "Check for TODO:|FIXME:|BUG: comments in all files" + name: "Find TODO:|FIXME: comments" + description: "Check for TODO:|FIXME: comments in all files" language: pygrep - entry: '(^|//!?|#|