Skip to content

Commit

Permalink
Update pre-commit hooks and let GHA run on 3.12 (#657)
Browse files Browse the repository at this point in the history

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Hans-Martin von Gaudecker <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and hmgaudecker authored Nov 17, 2023
1 parent adeefb7 commit 419769f
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 17 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ jobs:
- windows-latest
python-version:
- '3.11'
- '3.12'
exclude:
- os: macos-latest
python-version: 3.11
- os: windows-latest
python-version: 3.11
steps:
- uses: actions/checkout@v3
- name: Install conda environment on Windows
Expand Down Expand Up @@ -53,7 +59,7 @@ jobs:
run: pytest --cov=./ --cov-report=xml
shell: bash -el {0}
- name: Run tests with NumPy backend on Windows
# Ignore MacOS for being slow -- no reason that would break if Jax works.
# No JAX on Windows.
if: runner.os == 'Windows'
run: pytest src/_gettsim_tests
shell: pwsh
Expand All @@ -66,7 +72,7 @@ jobs:
# --use-jax
shell: bash -el {0}
- name: Upload coverage reports
if: runner.os == 'Linux' && matrix.python-version == '3.11'
if: runner.os == 'Linux' && matrix.python-version == '3.12'
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/publish-to-pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: '3.12'
- name: Install pypa/build
run: >-
python -m
Expand Down
21 changes: 11 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ repos:
- id: check-useless-excludes
# - id: identity # Prints all files passed to pre-commits. Debugging.
- repo: https://github.com/lyz-code/yamlfix
rev: 1.13.0
rev: 1.15.0
hooks:
- id: yamlfix
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-added-large-files
args:
Expand Down Expand Up @@ -41,23 +41,23 @@ repos:
- id: check-ast
- id: check-docstring-first
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.32.0
rev: v1.33.0
hooks:
- id: yamllint
- repo: https://github.com/psf/black
rev: 23.9.1
rev: 23.11.0
hooks:
- id: black
# It is recommended to specify the latest version of Python
# supported by your project here
language_version: python3.11
language_version: python3.12
- repo: https://github.com/asottile/blacken-docs
rev: 1.16.0
hooks:
- id: blacken-docs
# exclude: docs/source/how_to_guides/optimization/how_to_specify_constraints.md
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.289
rev: v0.1.5
hooks:
- id: ruff
# args:
Expand All @@ -74,10 +74,10 @@ repos:
hooks:
- id: nbqa-black
additional_dependencies:
- black==23.9.1
- black==23.11.0
- id: nbqa-ruff
additional_dependencies:
- ruff==v0.0.289
- ruff==v0.1.5
args:
- --ignore=B018,T201
- repo: https://github.com/executablebooks/mdformat
Expand All @@ -103,7 +103,7 @@ repos:
- '88'
files: (docs/.|CHANGES.md|CODE_OF_CONDUCT.md)
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.1
rev: v1.7.0
hooks:
- id: mypy
args:
Expand All @@ -112,7 +112,7 @@ repos:
- types-PyYAML
- types-pytz
- repo: https://github.com/asottile/setup-cfg-fmt
rev: v2.4.0
rev: v2.5.0
hooks:
- id: setup-cfg-fmt
- repo: https://github.com/mgedmin/check-manifest
Expand All @@ -124,5 +124,6 @@ repos:
additional_dependencies:
- setuptools-scm
- toml
- wheel
ci:
autoupdate_schedule: monthly
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
intersphinx_mapping = {
"numpy": ("https://docs.scipy.org/doc/numpy", None),
"pandas": ("https://pandas.pydata.org/pandas-docs/stable", None),
"python": ("https://docs.python.org/3.11", None),
"python": ("https://docs.python.org/", None),
}

myst_heading_anchors = 3
Expand Down
4 changes: 2 additions & 2 deletions src/_gettsim/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
in the documentation."""
from _gettsim.demographic_vars import * # noqa: F403
from _gettsim.social_insurance_contributions.arbeitsl_v import * # noqa: F403
from _gettsim.social_insurance_contributions.beitr_bemess_grenzen import * # noqa: F403, E501
from _gettsim.social_insurance_contributions.beitr_bemess_grenzen import * # noqa: F403
from _gettsim.social_insurance_contributions.eink_grenzen import * # noqa: F403
from _gettsim.social_insurance_contributions.ges_krankenv import * # noqa: F403
from _gettsim.social_insurance_contributions.ges_pflegev import * # noqa: F403
Expand All @@ -17,7 +17,7 @@
from _gettsim.taxes.zu_verst_eink.zu_verst_eink import * # noqa: F403
from _gettsim.transfers.arbeitsl_geld import * # noqa: F403
from _gettsim.transfers.arbeitsl_geld_2.arbeitsl_geld_2 import * # noqa: F403
from _gettsim.transfers.arbeitsl_geld_2.arbeitsl_geld_2_eink import * # noqa: F403, E501
from _gettsim.transfers.arbeitsl_geld_2.arbeitsl_geld_2_eink import * # noqa: F403
from _gettsim.transfers.arbeitsl_geld_2.kost_unterk import * # noqa: F403
from _gettsim.transfers.benefit_checks.benefit_checks import * # noqa: F403
from _gettsim.transfers.benefit_checks.vermoegens_checks import * # noqa: F403
Expand Down

0 comments on commit 419769f

Please sign in to comment.