Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python: ["3.9", "3.10", "3.11", "3.12"]
python: ["3.9", "3.10", "3.11", "3.12", "3.13"]
include:
- os: "macos-latest"
python: "3.9"
- os: "macos-latest"
python: "3.12"
python: "3.13"
steps:
- uses: actions/checkout@main
- uses: actions/setup-python@main
Expand All @@ -42,12 +42,12 @@ jobs:
with:
path: ${{ env.pythonLocation }}
key: test-${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'requirements/*') }}
- run: pip install -r requirements/requirements-dev.txt
- run: pip install ./
- run: python --version
- run: python -m pip --version
- run: python -mpip --version
- run: python -mpip install -r requirements/requirements-dev.txt
- run: python -mpip install ./
- run: pytest --version
- run: python -m pip cache info
- run: python -mpip cache info
- run: mypy searvey
- run: make cov
# We only run on a single matrix case in order to speed up CI runtime
Expand Down
58 changes: 44 additions & 14 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,46 +41,76 @@ repos:
- id: "shellcheck"

- repo: "https://github.com/python-jsonschema/check-jsonschema"
rev: "0.28.6"
rev: "0.33.1"
hooks:
- id: "check-github-workflows"
- id: "check-readthedocs"

- repo: "https://github.com/asottile/reorder_python_imports"
rev: "v3.13.0"
rev: "v3.15.0"
hooks:
- id: "reorder-python-imports"
args:
- "--py38-plus"

- repo: "https://github.com/psf/black"
rev: "24.4.2"
rev: "25.1.0"
hooks:
- id: "black"

- repo: "https://github.com/charliermarsh/ruff-pre-commit"
# Ruff version.
rev: 'v0.4.10'
- repo: "https://github.com/astral-sh/ruff-pre-commit"
rev: 'v0.12.0'
hooks:
- id: "ruff"
# Run the linter.
- id: ruff-check
# Run the formatter.
#- id: ruff-format

- repo: "https://github.com/kynan/nbstripout"
rev: "0.7.1"
rev: "0.8.1"
hooks:
- id: "nbstripout"

- repo: "https://github.com/python-poetry/poetry"
rev: "1.8.0"
rev: "2.1.3"
hooks:
- id: "poetry-check"
name: "poetry check --lock"
args: ["--lock"]
- id: "poetry-lock"
args: ["--check"]
name: "poetry lock"

- repo: "https://github.com/python-poetry/poetry-plugin-export"
rev: "1.9.0"
hooks:
- id: "poetry-export"
name: 'poetry export main'
args: ["--without-hashes", "--only", "main", "-f", "requirements.txt", "-o", "requirements/requirements.txt"]
name: "poetry export main"
args:
[
"--only",
"main",
"--without-hashes",
"-f",
"requirements.txt",
"-o",
"requirements/requirements.txt",
]
- id: "poetry-export"
name: 'poetry export dev'
args: ["--without-hashes", "--with", "dev", "--with", "docs", "--with", "jupyter", "-f", "requirements.txt", "-o", "requirements/requirements-dev.txt"]
name: "poetry export dev"
args:
[
"--without-hashes",
"--with",
"dev",
"--with",
"docs",
"--with",
"jupyter",
"-f",
"requirements.txt",
"-o",
"requirements/requirements-dev.txt",
]

- repo: "local"
hooks:
Expand Down
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ style:
pre-commit run black -a

lint:
pre-commit run ruff -a
pre-commit run ruff-check -a

mypy:
dmypy run searvey
Expand All @@ -33,5 +33,7 @@ docs:
make -C docs html

deps:
mkdir -p requirements
pre-commit run poetry-lock -a
pre-commit run poetry-check -a
pre-commit run poetry-export -a
Loading
Loading