Skip to content

Commit

Permalink
MAINT: autoupdate pre-commit hooks (#50)
Browse files Browse the repository at this point in the history
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Remco de Boer <[email protected]>
  • Loading branch information
3 people authored Jan 12, 2024
1 parent 1782fb9 commit 5c3f49d
Show file tree
Hide file tree
Showing 13 changed files with 47 additions and 46 deletions.
7 changes: 6 additions & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@
"path": "./.cspell/python.txt"
}
],
"enableFiletypes": ["git-commit", "julia", "jupyter"],
"enableFiletypes": [
"git-commit",
"github-actions-workflow",
"julia",
"jupyter"
],
"flagWords": [
"analyse",
"colour",
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ jobs:
runs-on: ubuntu-22.04
steps:
- id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion .github/workflows/docnb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
GITHUB_REPO: ${{ github.event.pull_request.head.repo.full_name }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: tox -e docnb
- uses: actions/upload-pages-artifact@v2
- uses: actions/upload-pages-artifact@v3
if: always()
with:
path: docs/_build/html
8 changes: 4 additions & 4 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
- name: Determine if repository is Python package
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
# https://github.com/actions/upload-artifact/issues/174#issuecomment-934330651
shell: bash
- if: always() && steps.diff.outputs.diff != ''
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: pre-commit-changes
Expand Down Expand Up @@ -128,7 +128,7 @@ jobs:
# https://github.com/actions/upload-artifact/issues/174#issuecomment-934330651
shell: bash
- if: always() && steps.diff.outputs.diff != ''
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: pre-commit-changes
Expand All @@ -149,7 +149,7 @@ jobs:
- uses: actions/checkout@v4
with:
token: ${{ secrets.token || secrets.GITHUB_TOKEN }}
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: pre-commit-changes
path: .
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
file: ./coverage.xml
flags: unittests

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: inputs.test-output-path != ''
with:
name: test-output-${{ matrix.runs-on }}-${{ matrix.python-version }}
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Build files
*.egg-info/
.eggs/

# Temporary files
node_modules/
3 changes: 2 additions & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
tasks:
- init: pyenv local 3.8
- init: pip install -e .[dev]

github:
Expand All @@ -18,13 +19,13 @@ vscode:
- eamodio.gitlens
- editorconfig.editorconfig
- esbenp.prettier-vscode
- garaioag.garaio-vscode-unwanted-recommendations
- github.vscode-github-actions
- github.vscode-pull-request-github
- mhutchie.git-graph
- ms-python.black-formatter
- ms-python.python
- redhat.vscode-yaml
- Soulcode.vscode-unwanted-extensions
- stkb.rewrap
- streetsidesoftware.code-spell-checker
- tamasfe.even-better-toml
Expand Down
26 changes: 10 additions & 16 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ ci:
autoupdate_commit_msg: "MAINT: autoupdate pre-commit hooks"
autoupdate_schedule: quarterly
skip:
- prettier
- pyright
- taplo

Expand All @@ -23,13 +24,13 @@ repos:
- id: mixed-line-ending
- id: trailing-whitespace

- repo: https://github.com/psf/black
rev: 23.9.1
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.12.1
hooks:
- id: black

- repo: https://github.com/ComPWA/repo-maintenance
rev: 0.1.0
- repo: https://github.com/ComPWA/policy
rev: 0.2.0
hooks:
- id: check-dev-files
args:
Expand All @@ -42,12 +43,12 @@ repos:
- --repo-title=ComPWA actions and shared workflows

- repo: https://github.com/streetsidesoftware/cspell-cli
rev: v7.3.1
rev: v8.3.0
hooks:
- id: cspell

- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: 2.7.2
rev: 2.7.3
hooks:
- id: editorconfig-checker
name: editorconfig
Expand All @@ -58,24 +59,17 @@ repos:
)$
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.3
rev: v4.0.0-alpha.8
hooks:
- id: prettier

- repo: https://github.com/ComPWA/mirrors-pyright
rev: v1.1.330
rev: v1.1.345
hooks:
- id: pyright

- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
hooks:
- id: pyupgrade
args:
- --py37-plus

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.292
rev: v0.1.13
hooks:
- id: ruff
args:
Expand Down
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
"eamodio.gitlens",
"editorconfig.editorconfig",
"esbenp.prettier-vscode",
"garaioag.garaio-vscode-unwanted-recommendations",
"github.vscode-github-actions",
"github.vscode-pull-request-github",
"mhutchie.git-graph",
"ms-python.black-formatter",
"ms-python.python",
"redhat.vscode-yaml",
"Soulcode.vscode-unwanted-extensions",
"stkb.rewrap",
"streetsidesoftware.code-spell-checker",
"tamasfe.even-better-toml",
Expand All @@ -22,6 +22,7 @@
"unwantedRecommendations": [
"bungcip.better-toml",
"davidanson.vscode-markdownlint",
"garaioag.garaio-vscode-unwanted-recommendations",
"ms-python.flake8",
"ms-python.isort",
"ms-python.mypy-type-checker",
Expand Down
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@
},
"black-formatter.importStrategy": "fromEnvironment",
"cSpell.enabled": true,
"diffEditor.experimental.showMoves": true,
"editor.formatOnSave": true,
"editor.wrappingStrategy": "advanced",
"git.rebaseWhenSync": true,
"github-actions.workflows.pinned.workflows": [".github/workflows/ci.yml"],
"multiDiffEditor.experimental.enabled": true,
"python.analysis.typeCheckingMode": "basic",
"rewrap.wrappingColumn": 88,
"ruff.enable": true,
Expand Down
32 changes: 13 additions & 19 deletions create-pytest-matrix/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,27 +62,21 @@ def create_job_matrix(
includes = []
if "3.6" in python_versions:
python_versions.remove("3.6")
includes.append(
{
"python-version": "3.6",
"runs-on": "ubuntu-20.04",
}
)
includes.append({
"python-version": "3.6",
"runs-on": "ubuntu-20.04",
})
if coverage_target:
includes.append(
{
"coverage-target": coverage_target,
"python-version": coverage_python_version,
"runs-on": "ubuntu-22.04",
}
)
includes.append({
"coverage-target": coverage_target,
"python-version": coverage_python_version,
"runs-on": "ubuntu-22.04",
})
if macos_python_version:
includes.append(
{
"python-version": macos_python_version,
"runs-on": "macos-12",
}
)
includes.append({
"python-version": macos_python_version,
"runs-on": "macos-12",
})
matrix = {}
if python_versions:
matrix = {
Expand Down
2 changes: 2 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ dependencies:
- pip
- pip:
- -e .[dev]
variables:
PRETTIER_LEGACY_CLI: "1"

0 comments on commit 5c3f49d

Please sign in to comment.