diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..8452ef0 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: monthly + assignees: + - "ezio-melotti" + groups: + actions: + patterns: + - "*" diff --git a/.github/workflows/documentation-links.yml b/.github/workflows/documentation-links.yml new file mode 100644 index 0000000..f05df37 --- /dev/null +++ b/.github/workflows/documentation-links.yml @@ -0,0 +1,27 @@ +name: Read the Docs PR preview +# Automatically edits a pull request's descriptions with a link +# to the documentation's preview on Read the Docs. + +on: + pull_request_target: + types: + - opened + paths: + - 'Doc/**' + - '.github/workflows/doc.yml' + +permissions: + pull-requests: write + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + documentation-links: + runs-on: ubuntu-latest + steps: + - uses: readthedocs/actions/preview@v1 + with: + project-slug: "python-docs-theme-previews" + single-version: "true" diff --git a/.github/workflows/pypi-package.yml b/.github/workflows/pypi-package.yml index 355a35f..bd704b5 100644 --- a/.github/workflows/pypi-package.yml +++ b/.github/workflows/pypi-package.yml @@ -27,7 +27,9 @@ jobs: name: Publish to PyPI environment: release-pypi # Only run for published releases. - if: github.repository_owner == 'python' && github.event.action == 'published' + if: | + github.repository_owner == 'python' + && github.event.action == 'published' runs-on: ubuntu-latest needs: build-package diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 008784c..70b4e19 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,18 +6,17 @@ repos: args: [--py38-plus] - repo: https://github.com/psf/black-pre-commit-mirror - rev: 23.9.1 + rev: 24.1.1 hooks: - id: black - repo: https://github.com/PyCQA/isort - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort - args: [--add-import=from __future__ import annotations] - repo: https://github.com/PyCQA/flake8 - rev: 6.1.0 + rev: 7.0.0 hooks: - id: flake8 additional_dependencies: @@ -32,19 +31,28 @@ repos: rev: v4.5.0 hooks: - id: check-case-conflict - - id: check-executables-have-shebangs - id: check-merge-conflict - - id: check-json - id: check-toml - id: check-yaml - id: debug-statements - id: end-of-file-fixer - id: trailing-whitespace + - repo: https://github.com/tox-dev/pyproject-fmt + rev: 1.7.0 + hooks: + - id: pyproject-fmt + args: [--max-supported-python=3.13] + - repo: https://github.com/abravalheri/validate-pyproject - rev: v0.14 + rev: v0.16 hooks: - id: validate-pyproject + - repo: meta + hooks: + - id: check-hooks-apply + - id: check-useless-excludes + ci: autoupdate_schedule: quarterly diff --git a/pyproject.toml b/pyproject.toml index ce22aed..272d26c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,3 +43,7 @@ name = "python_docs_theme" include = [ "python_docs_theme/", ] + +[tool.isort] +add_imports = "from __future__ import annotations" +profile = "black"