Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/reusable-cookie.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.14"]
python-version: ["3.11", "3.14"]
runs-on: [ubuntu-latest, windows-latest, macos-latest, macos-15-intel]

include:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-rr-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.12", "3.14"]
python-version: ["3.11", "3.13", "3.15"]
runs-on: [ubuntu-latest, macos-latest, macos-15-intel, windows-latest]

steps:
Expand Down
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ repos:
- nox
- repo-review>=0.10.6
- rich
- tomli>=2.0.2
- types-PyYAML

- repo: https://github.com/rbubley/mirrors-prettier
Expand Down
22 changes: 13 additions & 9 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,16 @@ Important: tests run with `PYTHONWARNDEFAULTENCODING=1`.

### Cookie template validation

The noxfile generates temporary projects for **all 9 backends** × **vcs on/off**
× **3 docs engines** (sphinx/properdocs/zensical). These are slow.

- `nox -s "tests(hatch)"` — run generated project tests for a single backend
- `nox -s "lint(hatch)"` — run pre-commit (`prek`) on generated project
- `nox -s "dist(hatch)"` — verify build output includes LICENSE
- `nox -s "native(hatch)"` — test hatch/pdm/poetry native test runners
The noxfile generates temporary projects for **all 10 backends** × **vcs
on/off** × **3 docs engines** (sphinx/properdocs/zensical). These are slow.
Session names include all three, like `tests(hatch, vcs, sphinx)`.

- `nox -s "tests(hatch, vcs, sphinx)"` — run generated project tests
- `nox -s "lint(hatch, vcs, sphinx)"` — run pre-commit (`prek`) on generated
project
- `nox -s "dist(hatch, vcs, sphinx)"` — verify build output includes LICENSE
- `nox -s "native(hatch, vcs, sphinx)"` — test hatch/pdm/poetry native test
runners
- `nox -s compare_copier` — verify cookiecutter and copier produce identical
files
- `nox -s compare_cruft` — verify cookiecutter and cruft produce identical files
Expand Down Expand Up @@ -56,7 +59,7 @@ The noxfile generates temporary projects for **all 9 backends** × **vcs on/off*
directory.
- `tool.ruff.extend-exclude` also excludes `\{\{cookiecutter.project_name\}\}`
(double-escaped in TOML).
- `tool.mypy.python_version = "3.10"`; the `sp_repo_review.*` override enforces
- `tool.mypy.python_version = "3.11"`; the `sp_repo_review.*` override enforces
`disallow_untyped_defs=True`.
- `tool.pylint.master.ignore-paths` ignores `src/sp_repo_review/_version.py`
(auto-generated by hatch-vcs).
Expand All @@ -67,7 +70,8 @@ The noxfile generates temporary projects for **all 9 backends** × **vcs on/off*

- CI uses change detection to decide whether to run cookie tests or rr-tests.
Both are required to pass for the `pass` job.
- rr-tests matrix runs on Python 3.10, 3.12, 3.14 across ubuntu/macos/windows.
- rr-tests matrix runs on Python 3.11, 3.12, 3.14, 3.15 across
ubuntu/macos/windows.
- Cookie tests reuse the same `reusable-cookie.yml` workflow.

## Docs site (MyST)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ Check the key setup files, `pyproject.toml`, and possibly `setup.cfg` and
`setup.py` (pybind11 example). Update `README.md`. Also update and add docs to
`docs/`.

There are a few example dependencies and a minimum Python version of 3.10, feel
There are a few example dependencies and a minimum Python version of 3.11, feel
free to change it to whatever you actually need/want. There is also a basic
backports structure with a small typing example.

Expand Down
3 changes: 1 addition & 2 deletions docs/_partials/pyproject.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ description = "A great package."
readme = "README.md"
license = "BSD-3-Clause"
license-files = ["LICENSE"]
requires-python = ">=3.10"
requires-python = ">=3.11"
classifiers = [
"Development Status :: 1 - Planning",
"Intended Audience :: Science/Research",
Expand All @@ -36,7 +36,6 @@ classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/gha_basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ tests:
fail-fast: false
matrix:
python-version:
- "3.10"
- "3.11"
- "3.12"
- "3.14"
name: Check Python ${{ matrix.python-version }}
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/packaging_compiled.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,8 @@ rand = "0.9.2"
[dependencies.pyo3]
version = "0.27.2"
# "extension-module" tells pyo3 we want to build an extension module (skips linking against libpython.so)
# "abi3-py310" tells pyo3 (and maturin) to build using the stable ABI with minimum Python version 3.10
features = ["extension-module", "abi3-py310"]
# "abi3-py311" tells pyo3 (and maturin) to build using the stable ABI with minimum Python version 3.11
features = ["extension-module", "abi3-py311"]
```
<!-- rumdl-enable MD013 -->
<!-- [[[end]]] -->
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/repo_review.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ fail, that's okay - the goal is bring all possible issues to your attention, not
to force compliance with arbitrary checks.

You can also run [this tool](https://github.com/scientific-python/repo-review)
locally (Python 3.10+ required):
locally (Python 3.11+ required):

```bash
pipx run 'sp-repo-review[cli]' <path to repo>
Expand Down
12 changes: 5 additions & 7 deletions docs/guides/style.md
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ If you don't use a `[project]` table (older setuptools or Poetry), then you
should also set:

```ini
target-version = "py310"
target-version = "py311"
```

This selects the minimum version you want to target (primarily for `"UP"` and
Expand Down Expand Up @@ -701,7 +701,7 @@ this:
```ini
[tool.mypy]
files = "src"
python_version = "3.10"
python_version = "3.11"
strict = true
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
warn_unreachable = true
Expand Down Expand Up @@ -737,7 +737,7 @@ errors in your typing.
```toml
[tool.pyrefly]
project-includes = ["src"]
python-version = "3.10"
python-version = "3.11"
project-excludes = ["**/tests"]

# Use `Any` for imports that can't be resolved, one entry per module
Expand Down Expand Up @@ -768,7 +768,7 @@ You can disable Pyrefly on a line with `# pyrefly: ignore` (or

```toml
[tool.ty.environment]
python-version = "3.10"
python-version = "3.11"

[tool.ty.src]
include = ["src"]
Expand Down Expand Up @@ -882,8 +882,6 @@ If you want a Python based tool, [codespell] is the classic tool used.
rev: "v2.4.3"
hooks:
- id: codespell
additional_dependencies:
- tomli; python_version<'3.11'
```

You can list allowed spellings in a comma separated string passed to `-L` (or
Expand Down Expand Up @@ -1086,7 +1084,7 @@ started:

```ini
[tool.pylint]
py-version = "3.10"
py-version = "3.11"
jobs = "0"
reports.output-format = "colorized"
similarities.ignore-imports = "yes"
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ customize the versions of Python prepared for you, then use input like this:
```yaml
- uses: wntrblm/nox@2026.08.17
with:
python-versions: "3.10, 3.11, 3.12, 3.13, 3.13t, 3.14, 3.14t, pypy-3.11"
python-versions: "3.11, 3.12, 3.13, 3.13t, 3.14, 3.14t, pypy-3.11"
```

### Introduction
Expand Down Expand Up @@ -127,7 +127,7 @@ You can parametrize sessions. either on Python or on any other item.

```python
# Shortcut to parametrize Python
@nox.session(python=["3.10", "3.11", "3.12", "3.13", "3.14"])
@nox.session(python=["3.11", "3.12", "3.13", "3.14"])
def my_session(session: nox.Session) -> None: ...


Expand Down
2 changes: 1 addition & 1 deletion helpers/extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class CookiecutterContext(SmartDict):

@CookiecutterContext.register
def __year(_):
return str(datetime.datetime.now(tz=datetime.timezone.utc).year)
return str(datetime.datetime.now(tz=datetime.UTC).year)


@CookiecutterContext.register
Expand Down
14 changes: 4 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ authors = [
{ name = "Henry Schreiner", email = "henryfs@princeton.edu" },
]
description = "Review repos for compliance to the Scientific-Python development guidelines"
requires-python = ">=3.10"
requires-python = ">=3.11"
license = "BSD-3-Clause"
classifiers = [
"Development Status :: 4 - Beta",
Expand All @@ -19,11 +19,11 @@ classifiers = [
"Intended Audience :: Science/Research",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15",
"Programming Language :: Python",
"Topic :: Scientific/Engineering",
"Topic :: Software Development :: Libraries :: Python Modules",
Expand All @@ -34,7 +34,6 @@ dynamic = ["version", "readme"]
dependencies = [
"pyyaml",
"repo-review",
"tomli; python_version<'3.11'",
]

[project.optional-dependencies]
Expand Down Expand Up @@ -134,7 +133,7 @@ testpaths = ["tests"]
[tool.mypy]
mypy_path = ["src"]
files = ["src", "tests"]
python_version = "3.10"
python_version = "3.11"
warn_unused_configs = true
strict = true
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
Expand All @@ -149,7 +148,7 @@ disallow_incomplete_defs = true


[tool.pylint]
master.py-version = "3.10"
master.py-version = "3.11"
master.ignore-paths= ["src/sp_repo_review/_version.py"]
reports.output-format = "colorized"
similarities.ignore-imports = "yes"
Expand Down Expand Up @@ -192,12 +191,7 @@ ignore = [
"TID252", # Relative imports are fine
]

[tool.ruff.lint.flake8-tidy-imports.banned-api]
"importlib.abc".msg = "Use sp_repo_review._compat.importlib.resources.abc instead."
"importlib.resources.abc".msg = "Use sp_repo_review._compat.importlib.resources.abc instead."

[tool.ruff.lint.per-file-ignores]
"src/sp_repo_review/_compat/**.py" = ["TID251"]
"src/sp_repo_review/checks/*.py" = ["ERA001"]
"src/sp_repo_review/ruff_checks/__main__.py" = ["PLC0415", "T20"]
"tests/**" = ["ANN", "INP001", "S607"]
Expand Down
Empty file.
Empty file.
Empty file.
18 changes: 0 additions & 18 deletions src/sp_repo_review/_compat/importlib/resources/abc.py

This file was deleted.

16 changes: 0 additions & 16 deletions src/sp_repo_review/_compat/tomllib.py

This file was deleted.

2 changes: 1 addition & 1 deletion src/sp_repo_review/checks/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from . import mk_url

if TYPE_CHECKING:
from .._compat.importlib.resources.abc import Traversable
from importlib.resources.abc import Traversable

# PY: Python Project
## 0xx: File existence
Expand Down
2 changes: 1 addition & 1 deletion src/sp_repo_review/checks/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from . import mk_url

if TYPE_CHECKING:
from .._compat.importlib.resources.abc import Traversable
from importlib.resources.abc import Traversable


def workflows(root: Traversable) -> dict[str, Any]:
Expand Down
6 changes: 3 additions & 3 deletions src/sp_repo_review/checks/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@

from __future__ import annotations

__lazy_modules__ = ["ast", f"{__spec__.parent.rsplit('.', 1)[0]}._compat"] # type: ignore[union-attr]
__lazy_modules__ = ["ast", "tomllib"]

import ast
import dataclasses
import re
import tomllib
from typing import TYPE_CHECKING, Any

from .._compat import tomllib
from . import mk_url

if TYPE_CHECKING:
from .._compat.importlib.resources.abc import Traversable
from importlib.resources.abc import Traversable

REGEX = re.compile(
r"(?m)^# /// (?P<type>[a-zA-Z0-9-]+)$\s(?P<content>(^#(| .*)$\s)+)^# ///$"
Expand Down
2 changes: 1 addition & 1 deletion src/sp_repo_review/checks/precommit.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from . import mk_url

if TYPE_CHECKING:
from .._compat.importlib.resources.abc import Traversable
from importlib.resources.abc import Traversable


def precommit(root: Traversable) -> dict[str, Any]:
Expand Down
7 changes: 3 additions & 4 deletions src/sp_repo_review/checks/pyproject.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
from __future__ import annotations

__lazy_modules__ = [f"{__spec__.parent.rsplit('.', 1)[0]}._compat"] # type: ignore[union-attr]
__lazy_modules__ = ["tomllib"]

import enum
import tomllib
from typing import TYPE_CHECKING, Any

from .._compat import tomllib
from . import mk_url

if TYPE_CHECKING:
from configparser import ConfigParser

from .._compat.importlib.resources.abc import Traversable
from importlib.resources.abc import Traversable


class PytestFile(enum.Enum):
Expand Down
2 changes: 1 addition & 1 deletion src/sp_repo_review/checks/readthedocs.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from . import mk_url

if TYPE_CHECKING:
from .._compat.importlib.resources.abc import Traversable
from importlib.resources.abc import Traversable


class ReadTheDocs:
Expand Down
Loading
Loading