Skip to content

Commit

Permalink
👷 Update pre-commit.ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Freed-Wu committed Apr 4, 2023
1 parent 243b495 commit 75f00d4
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 40 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@
- docs/*
workflow_dispatch:

# https://github.com/softprops/action-gh-release/issues/236
permissions:
contents: write

env:
files: dist/*
PYTHONUTF8: "1"
python-version: 3.x
cache: pip

Expand Down Expand Up @@ -40,10 +44,6 @@ jobs:
- name: Test
run: |
pytest --cov
- name: Test for macOS and Linux
if: runner.os != 'Windows'
run: |
pre-commit run -a
- uses: codecov/codecov-action@v3
build:
needs: test
Expand Down Expand Up @@ -74,13 +74,13 @@ jobs:
if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
with:
path: |
${{ env.files }}
dist/*
- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
body_path: build/CHANGELOG.md
files: |
${{ env.files }}
dist/*
- uses: pypa/gh-action-pypi-publish@release/v1
if: startsWith(github.ref, 'refs/tags/') && runner.os == 'Linux'
if: runner.os == 'Linux' && startsWith(github.ref, 'refs/tags/')
with:
password: ${{ secrets.PYPI_API_TOKEN }}
38 changes: 26 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,31 @@ repos:
- id: check-toml
- id: check-json
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.3.1
rev: v1.4.2
hooks:
- id: remove-crlf
- repo: https://github.com/codespell-project/codespell
rev: v2.2.2
rev: v2.2.4
hooks:
- id: codespell
additional_dependencies:
- tomli
- repo: https://github.com/jorisroovers/gitlint
rev: v0.18.0
rev: v0.19.1
hooks:
- id: gitlint
args:
- --msg-filename
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: 2.6.2
rev: 2.7.1
hooks:
- id: editorconfig-checker
- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 3.0.0
hooks:
- id: check-mailmap
- repo: https://github.com/adrienverge/yamllint
rev: v1.28.0
rev: v1.30.0
hooks:
- id: yamllint
- repo: https://github.com/executablebooks/mdformat
Expand All @@ -57,6 +57,7 @@ repos:
args:
- --number
additional_dependencies:
- mdformat-gfm
- mdformat-myst
- mdformat-toc
- mdformat-deflist
Expand All @@ -69,32 +70,45 @@ repos:
- id: markdownlint-cli2
additional_dependencies:
- [email protected]
- repo: https://github.com/Freed-Wu/pre-commit-hooks
rev: 0.0.10
hooks:
- id: update-CITATION.cff
- id: update-pyproject.toml
- repo: https://github.com/perltidy/perltidy
rev: "20230309.02"
hooks:
- id: perltidy
- repo: https://github.com/psf/black
rev: 22.12.0
rev: 23.1.0
hooks:
- id: black
- repo: https://github.com/PyCQA/isort
rev: 5.11.4
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/pycqa/pydocstyle
rev: 6.1.1
rev: 6.3.0
hooks:
- id: pydocstyle
additional_dependencies:
- toml
- tomli
- repo: https://github.com/kumaraditya303/mirrors-pyright
rev: v1.1.286
rev: v1.1.300
hooks:
- id: pyright
- repo: https://github.com/PyCQA/bandit
rev: 1.7.4
rev: 1.7.5
hooks:
- id: bandit
args:
- -cpyproject.toml
additional_dependencies:
- toml
- tomli
- repo: https://github.com/nix-community/nixpkgs-fmt
rev: v1.3.0
hooks:
- id: nixpkgs-fmt

ci:
skip:
Expand Down
10 changes: 7 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,13 @@ write_to = "src/sphinxcontrib/eval/_version.py"
[tool.setuptools.dynamic]
dependencies = { file = "requirements.txt" }

[tool.setuptools.dynamic.optional-dependencies]
dev = { file = "requirements/dev.txt" }
myst = { file = "requirements/myst.txt" }
# begin: scripts/update-pyproject.toml.pl
[tool.setuptools.dynamic.optional-dependencies.dev]
file = "requirements/dev.txt"

[tool.setuptools.dynamic.optional-dependencies.myst]
file = "requirements/myst.txt"
# end: scripts/update-pyproject.toml.pl

[tool.black]
line-length = 79
Expand Down
9 changes: 0 additions & 9 deletions scripts/generate-CITATION.cff.pl

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/generate-api.md.pl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env -S perl -n
$. = 1 unless $#ARGV == $oldargc;
$. = 1 unless $#ARGV == $oldargc;
$oldargc = $#ARGV;
next unless $. == 1;
$_ = $ARGV;
Expand Down
6 changes: 0 additions & 6 deletions scripts/generate-requirements.md.pl

This file was deleted.

0 comments on commit 75f00d4

Please sign in to comment.