Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
0e55857
build: Drop Python 3.8 support
kratsg Dec 21, 2024
719f6d9
typing: Cast transpose to ArrayLike
matthewfeickert Oct 16, 2025
c9fc79c
build: Remove importlib_resources dependency for Python 3.8
matthewfeickert Oct 16, 2025
6b95ab7
Add note about casting to ArrayLike for Python 3.10 mypy
matthewfeickert Oct 16, 2025
0340148
Remove Black formatting
matthewfeickert Oct 23, 2025
48376e1
Add isort to Ruff formatting
matthewfeickert Oct 23, 2025
3b8781c
Apply isort in pre-commit
matthewfeickert Oct 23, 2025
9bde636
docs: Update badge to show Ruff as code style
matthewfeickert Oct 23, 2025
37c0746
Use blacken-docs still
matthewfeickert Oct 23, 2025
4bb61c3
Apply ruff format
matthewfeickert Oct 23, 2025
586e5bf
Place the ignore on the correct line
matthewfeickert Oct 23, 2025
90cae1b
Disable isort to avoid circular import failure
matthewfeickert Oct 23, 2025
371b6e1
reorder again to prevernt other errors in testing
matthewfeickert Oct 23, 2025
128eee6
Apply fix for flake8-bugbear B904
matthewfeickert Oct 23, 2025
da6f691
fix: Apply flake8-bugbear B007 for docs
matthewfeickert Oct 23, 2025
123803a
fix: Apply flake8-bugbear B007 for src
matthewfeickert Oct 23, 2025
12de7ed
fix: Apply B009 (get-attr-with-constant)
matthewfeickert Oct 23, 2025
428e5bd
fix: Apply flake8-bugbear B006 for src
matthewfeickert Oct 23, 2025
ea79e23
fix: Apply flake8-bugbear B006 for tests
matthewfeickert Oct 23, 2025
83d0760
fix: Apply flake8-bugbear B006 for docs
matthewfeickert Oct 23, 2025
a29a623
fix B011
matthewfeickert Oct 23, 2025
cf372c6
fix B017
matthewfeickert Oct 23, 2025
5872f17
style: Enable flake8-bugbear in ruff
matthewfeickert Oct 23, 2025
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/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
include:
- os: macos-latest
python-version: '3.13'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lower-bound-requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
matrix:
os: [ubuntu-latest]
# minimum supported Python
python-version: ['3.8']
python-version: ['3.9']

steps:
- uses: actions/checkout@v5
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
include:
- os: macos-latest
python-version: '3.13'
Expand Down
26 changes: 11 additions & 15 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,34 +35,30 @@ repos:
- id: rst-inline-touching-normal

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.12.0"
rev: "v0.12.11"
hooks:
- id: ruff-check
args: ["--fix", "--show-fixes"]
- id: ruff-check
args: ["--fix", "--show-fixes"]
- id: ruff-format

- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.10.0
hooks:
- id: black-jupyter
types_or: [python, pyi, jupyter]

- repo: https://github.com/adamchainz/blacken-docs
rev: 1.19.1
hooks:
- repo: https://github.com/adamchainz/blacken-docs
rev: "1.20.0"
hooks:
- id: blacken-docs
additional_dependencies: [black==24.10.0]
additional_dependencies: [black==25.*]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.13.0
# check the oldest and newest supported Pythons
# except skip python 3.9 for numpy, due to poor typing
hooks:
- &mypy
id: mypy
name: mypy with Python 3.8
name: mypy with Python 3.10
files: src
additional_dependencies:
['numpy', 'types-tqdm', 'click', 'types-jsonpatch', 'types-pyyaml', 'types-jsonschema', 'importlib_metadata', 'packaging']
args: ["--python-version=3.8"]
args: ["--python-version=3.10"]
- <<: *mypy
name: mypy with Python 3.13
args: ["--python-version=3.13"]
Expand Down
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pure-python fitting/limit-setting/interval estimation HistFactory-style

|PyPI version| |Conda-forge version| |Supported Python versions| |Docker Hub pyhf| |Docker Hub pyhf CUDA|

|Code Coverage| |CodeFactor| |pre-commit.ci Status| |Code style: black|
|Code Coverage| |CodeFactor| |pre-commit.ci Status| |Code style: ruff|

|GitHub Actions Status: CI| |GitHub Actions Status: Docs| |GitHub Actions Status: Publish|
|GitHub Actions Status: Docker|
Expand Down Expand Up @@ -392,8 +392,8 @@ and grant `OAC-1450377 <https://www.nsf.gov/awardsearch/showAward?AWD_ID=1450377
.. |pre-commit.ci Status| image:: https://results.pre-commit.ci/badge/github/scikit-hep/pyhf/main.svg
:target: https://results.pre-commit.ci/latest/github/scikit-hep/pyhf/main
:alt: pre-commit.ci status
.. |Code style: black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
.. |Code style: ruff| image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
:target: https://github.com/astral-sh/ruff

.. |GitHub Actions Status: CI| image:: https://github.com/scikit-hep/pyhf/actions/workflows/ci.yml/badge.svg
:target: https://github.com/scikit-hep/pyhf/actions/workflows/ci.yml?query=branch%3Amain
Expand Down
Loading