diff --git a/.github/dependabot.yml b/.github/dependabot.yml index be006de9..4b5e1c76 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -8,6 +8,6 @@ updates: groups: github-actions: patterns: - - "*" # Group all Actions updates into a single larger pull request + - "*" # Group all Actions updates into a single larger pull request schedule: interval: weekly diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 36bd93d2..79e9b618 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -16,42 +16,42 @@ jobs: SETUPTOOLS_SCM_PRETEND_VERSION: ${{ github.event.inputs.version }} steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v6 - - name: Build and Check Package - uses: hynek/build-and-inspect-python-package@v2.14 + - name: Build and Check Package + uses: hynek/build-and-inspect-python-package@v2.14 deploy: needs: package runs-on: ubuntu-latest environment: deploy permissions: - id-token: write # For PyPI trusted publishers. - contents: write # For tag. + id-token: write # For PyPI trusted publishers. + contents: write # For tag. steps: - - uses: actions/checkout@v6 - - - name: Download Package - uses: actions/download-artifact@v7 - with: - name: Packages - path: dist - - - name: Publish package to PyPI - uses: pypa/gh-action-pypi-publish@v1.13.0 - with: - attestations: true - - - name: Push tag - run: | - git config user.name "pytest bot" - git config user.email "pytestbot@gmail.com" - git tag --annotate --message=v${{ github.event.inputs.version }} v${{ github.event.inputs.version }} ${{ github.sha }} - git push origin v${{ github.event.inputs.version }} - - - name: GitHub Release - uses: softprops/action-gh-release@v2 - with: - files: dist/* - tag_name: v${{ github.event.inputs.version }} + - uses: actions/checkout@v6 + + - name: Download Package + uses: actions/download-artifact@v7 + with: + name: Packages + path: dist + + - name: Publish package to PyPI + uses: pypa/gh-action-pypi-publish@v1.13.0 + with: + attestations: true + + - name: Push tag + run: | + git config user.name "pytest bot" + git config user.email "pytestbot@gmail.com" + git tag --annotate --message=v${{ github.event.inputs.version }} v${{ github.event.inputs.version }} ${{ github.sha }} + git push origin v${{ github.event.inputs.version }} + + - name: GitHub Release + uses: softprops/action-gh-release@v2 + with: + files: dist/* + tag_name: v${{ github.event.inputs.version }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index afc3bef7..312e8e9d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,9 +20,9 @@ jobs: package: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 - - name: Build and Check Package - uses: hynek/build-and-inspect-python-package@v2.14 + - uses: actions/checkout@v6 + - name: Build and Check Package + uses: hynek/build-and-inspect-python-package@v2.14 test: @@ -69,28 +69,28 @@ jobs: python: "3.10" steps: - - uses: actions/checkout@v6 - with: - # Needed to fetch tags, which are required by setuptools-scm. - fetch-depth: 0 + - uses: actions/checkout@v6 + with: + # Needed to fetch tags, which are required by setuptools-scm. + fetch-depth: 0 - - name: Download Package - uses: actions/download-artifact@v7 - with: - name: Packages - path: dist + - name: Download Package + uses: actions/download-artifact@v7 + with: + name: Packages + path: dist - - name: Set up Python - uses: actions/setup-python@v6 - with: - python-version: ${{ matrix.python }} + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version: ${{ matrix.python }} - - name: Install tox - run: | - python -m pip install --upgrade pip - pip install tox + - name: Install tox + run: | + python -m pip install --upgrade pip + pip install tox - - name: Test - shell: bash - run: | - tox run -e ${{ matrix.tox_env }} --installpkg "$(find dist/*.whl)" + - name: Test + shell: bash + run: | + tox run -e ${{ matrix.tox_env }} --installpkg "$(find dist/*.whl)" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a05a730d..898244eb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,31 +1,31 @@ repos: -- repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.14.14" - hooks: - - id: ruff - args: ["--fix"] - - id: ruff-format -- repo: https://github.com/asottile/blacken-docs + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.14.14 + hooks: + - id: ruff + args: [--fix] + - id: ruff-format + - repo: https://github.com/asottile/blacken-docs rev: 1.20.0 hooks: - - id: blacken-docs + - id: blacken-docs additional_dependencies: [black==23.1.0] -- repo: https://github.com/pre-commit/pre-commit-hooks + - repo: https://github.com/pre-commit/pre-commit-hooks rev: v6.0.0 hooks: - - id: check-yaml -- repo: local + - id: check-yaml + - repo: local hooks: - - id: rst + - id: rst name: rst entry: rst-lint files: ^(CHANGELOG.rst|HOWTORELEASE.rst|README.rst|changelog/.*)$ language: python additional_dependencies: [pygments, restructuredtext_lint] -- repo: https://github.com/pre-commit/mirrors-mypy + - repo: https://github.com/pre-commit/mirrors-mypy rev: v1.19.1 hooks: - - id: mypy + - id: mypy files: ^(src/|testing/) args: [] additional_dependencies: @@ -33,3 +33,12 @@ repos: - execnet>=2.1.0 - types-psutil - setproctitle + - repo: https://github.com/google/yamlfmt + rev: v0.21.0 + hooks: + - id: yamlfmt + name: YAML formatter + files: (^|/).*\.ya?ml$ + args: + - "--conf" + - ".yamlfmt" diff --git a/.yamlfmt b/.yamlfmt new file mode 100644 index 00000000..f13843f4 --- /dev/null +++ b/.yamlfmt @@ -0,0 +1,10 @@ +# config for pre-commit https://github.com/google/yamlfmt + +formatter: + type: basic + line_ending: lf + indent: 2 + include_document_start: false + retain_line_breaks: true + retain_empty_objects: false + disable_sort_keys: false