Skip to content

Conversation

@henryiii
Copy link
Member

@henryiii henryiii commented Oct 15, 2025

This is a quick pass with uvx sp-repo-review[all] . and fixing the low hanging fruit. 3.8 is still supported? It's about time to drop 3.9 (official EoL) or 3.11 (SPEC 0). ;)

I'd recommend the remaining checks be worked on, and maybe move from black to ruff-format, and use SPDX license.

General

  • Detected build backend: hatchling.build
  • Detected license(s): Apache Software License

?NameDescription
PY001 Has a pyproject.toml
PY002 Has a README.(md|rst) file
PY003 Has a LICENSE* file
PY004 Has docs folder
PY005 Has tests folder
PY006 Has pre-commit config
PY007 Supports an easy task runner (nox, tox, pixi, etc.)

PyProject

?NameDescription
PP002 Has a proper build-system table
PP003 Does not list wheel as a build-dep
PP004 Does not upper cap Python requires
⚠️ PP005 Using SPDX project.license should not use deprecated trove classifiers
PP301 Has pytest in pyproject
PP302 Sets a minimum pytest to at least 6
PP303 Sets the test paths
PP304 Sets the log level in pytest
PP305 Specifies xfail_strict
PP306 Specifies strict config
PP307 Specifies strict markers
PP308 Specifies useful pytest summary
PP309 Filter warnings specified

GitHub Actions

?NameDescription
GH100 Has GitHub Actions config
GH101 Has nice names
GH102 Auto-cancel on repeated PRs
GH103 At least one workflow with manual dispatch trigger
GH104 Use unique names for upload-artifact
GH200 Maintained by Dependabot
GH210 Maintains the GitHub action versions with Dependabot
GH211 Do not pin core actions as major versions
GH212 Require GHA update grouping

Pre-commit

?NameDescription
PC100 Has pre-commit-hooks
PC110 Uses black or ruff-format
PC111 Uses blacken-docs
PC140 Uses a type checker
PC160 Uses a spell checker
PC170 Uses PyGrep hooks (only needed if rST present)
PC180 Uses a markdown formatter
Must have one of https://github.com/hukkin/mdformat, https://github.com/rbubley/mirrors-prettier, https://github.com/rvben/rumdl-pre-commit in .pre-commit-config.yaml
PC190 Uses Ruff
PC191 Ruff show fixes if fixes enabled
PC192 Ruff uses `ruff-check` instead of `ruff` (legacy)
PC901 Custom pre-commit CI message

MyPy

?NameDescription
MY100 Uses MyPy (pyproject config)
MY101 MyPy strict mode
MY102 MyPy show_error_codes deprecated
MY103 MyPy warn unreachable
MY104 MyPy enables ignore-without-code
MY105 MyPy enables redundant-expr
MY106 MyPy enables truthy-bool

Ruff

?NameDescription
RF001 Has Ruff config
RF002 Target version must be set
RF003 src directory doesn't need to be specified anymore (0.6+)
RF101 Bugbear must be selected
Must select the flake8-bugbear B checks. Recommended:

[tool.ruff.lint]
extend-select = [
  "B",  # flake8-bugbear
]
RF102 isort must be selected
Must select the isort I checks. Recommended:

[tool.ruff.lint]
extend-select = [
  "I",  # isort
]
RF103 pyupgrade must be selected
RF201 Avoid using deprecated config settings
RF202 Use (new) lint config section

Documentation

?NameDescription
RTD100 Uses ReadTheDocs (pyproject config)
RTD101 You have to set the RTD version number to 2
RTD102 You have to set the RTD build image
RTD103 You have to set the RTD python version
RTD104 You have to specify a build configuration now for readthedocs.

Setuptools Config

?NameDescription
⚠️ SCFG001 Avoid deprecated setup.cfg names

Validate-PyProject

Checks [build-system], [project], [tool.black], [tool.cibuildwheel], [tool.hatch], [tool.maturin], [tool.mypy], [tool.pdm], [tool.poe], [tool.poetry], [tool.pyright], [tool.pytest], [tool.repo-review], [tool.ruff], [tool.scikit-build], [tool.setuptools_scm], [tool.taskipy], [tool.tombi], [tool.tox], [tool.ty], [tool.uv], [tool.setuptools]

?NameDescription
VPP001 Validate pyproject.toml

@codecov
Copy link

codecov bot commented Oct 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.23%. Comparing base (316bcae) to head (88d2369).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2623   +/-   ##
=======================================
  Coverage   98.23%   98.23%           
=======================================
  Files          65       65           
  Lines        4198     4198           
  Branches      592      592           
=======================================
  Hits         4124     4124           
  Misses         45       45           
  Partials       29       29           
Flag Coverage Δ
contrib 97.97% <ø> (ø)
doctest 98.09% <ø> (ø)
unittests-3.10 96.28% <ø> (ø)
unittests-3.11 96.28% <ø> (ø)
unittests-3.12 96.28% <ø> (ø)
unittests-3.13 96.28% <ø> (ø)
unittests-3.8 96.28% <ø> (ø)
unittests-3.9 96.33% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@matthewfeickert
Copy link
Member

matthewfeickert commented Oct 15, 2025

This is a quick pass with uvx sp-repo-review[all] . and fixing the low hanging fruit.

Thanks @henryiii

3.8 is still supported? It's about time to drop 3.9 (official EoL) or 3.11 (SPEC 0). ;)

c.f. PR #2566. We're dropping and going to Python 3.9 for the lower bound for pyhf v0.8.0, but yeah, Python 3.9 EOL is just around the corner

$ pixi exec --with norwegianblue eol python
┌───────┬────────────┬─────────┬────────────────┬────────────┬────────────┐
│ cycle │  release   │ latest  │ latest release │  support   │    eol     │
├───────┼────────────┼─────────┼────────────────┼────────────┼────────────┤
│ 3.14  │ 2025-10-07 │ 3.14.0  │   2025-10-07   │ 2027-10-01 │ 2030-10-31 │
│ 3.13  │ 2024-10-07 │ 3.13.9  │   2025-10-14   │ 2026-10-01 │ 2029-10-31 │
│ 3.12  │ 2023-10-02 │ 3.12.12 │   2025-10-09   │ 2025-04-02 │ 2028-10-31 │
│ 3.11  │ 2022-10-24 │ 3.11.14 │   2025-10-09   │ 2024-04-01 │ 2027-10-31 │
│ 3.10  │ 2021-10-04 │ 3.10.19 │   2025-10-09   │ 2023-04-05 │ 2026-10-31 │
│ 3.9   │ 2020-10-05 │ 3.9.24  │   2025-10-09   │ 2022-05-17 │ 2025-10-31 │
│ 3.8   │ 2019-10-14 │ 3.8.20  │   2024-09-06   │ 2021-05-03 │ 2024-10-07 │
│ 3.7   │ 2018-06-27 │ 3.7.17  │   2023-06-05   │ 2020-06-27 │ 2023-06-27 │
│ 3.6   │ 2016-12-23 │ 3.6.15  │   2021-09-03   │ 2018-12-24 │ 2021-12-23 │
│ 3.5   │ 2015-09-13 │ 3.5.10  │   2020-09-05   │   False    │ 2020-09-30 │
│ 3.4   │ 2014-03-16 │ 3.4.10  │   2019-03-18   │   False    │ 2019-03-18 │
│ 3.3   │ 2012-09-29 │ 3.3.7   │   2017-09-19   │   False    │ 2017-09-29 │
│ 3.2   │ 2011-02-20 │ 3.2.6   │   2014-10-12   │   False    │ 2016-02-20 │
│ 2.7   │ 2010-07-03 │ 2.7.18  │   2020-04-19   │   False    │ 2020-01-01 │
│ 3.1   │ 2009-06-27 │ 3.1.5   │   2012-04-06   │   False    │ 2012-04-09 │
│ 3.0   │ 2008-12-03 │ 3.0.1   │   2009-02-12   │   False    │ 2009-06-27 │
│ 2.6   │ 2008-10-01 │ 2.6.9   │   2013-10-29   │   False    │ 2013-10-29 │
└───────┴────────────┴─────────┴────────────────┴────────────┴────────────┘

I'd recommend the remaining checks be worked on, and maybe move from black to ruff-format

Yeah, Ruff is a TODO item. Also doing a large PR where we apply a lot of the style changes in one go to make it a transition point.

@matthewfeickert matthewfeickert added the chore Other changes that don't modify src or test files label Oct 15, 2025
@github-project-automation github-project-automation bot moved this to In progress in pyhf v0.8.0 Oct 15, 2025
@matthewfeickert matthewfeickert force-pushed the henryiii/chore/pyprojup branch from 8a3ef08 to 88d2369 Compare October 16, 2025 08:25
@matthewfeickert
Copy link
Member

matthewfeickert commented Oct 16, 2025

@henryiii Do you have a GitHub Action setup to run sp-repo-review[all] on PRs?

edit: Yes.

- repo: https://github.com/scientific-python/repo-review
  rev: <version>
  hooks:
    - id: repo-review
      additional_dependencies: ["repo-review[cli]", "sp-repo-review==<version>"]
- uses: scientific-python/repo-review@<version>
  with:
    plugins: sp-repo-review

@matthewfeickert
Copy link
Member

Commit message:

* Update Ruff pre-commit hook to v0.12.0 to use ruff-check.
* Apply revisions to pass more of sp-repo-review.
   - RF003 src directory doesn't need to be specified anymore (0.6+)
   - Use "INFO" to avoid Error: tool.pytest.ini_options.log_cli_level must
     be valid exactly by one definition.
* Remove License trove classifier as using SPDX project license.

@matthewfeickert matthewfeickert added the docs Documentation related label Oct 16, 2025
@matthewfeickert matthewfeickert merged commit 82d876b into scikit-hep:main Oct 16, 2025
21 of 22 checks passed
@github-project-automation github-project-automation bot moved this from In progress to Done in pyhf v0.8.0 Oct 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Other changes that don't modify src or test files docs Documentation related

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants