Skip to content

Commit 208bb83

Browse files
Merge branch 'main' into henryiii/chore/noxver
2 parents aa60388 + d9110f0 commit 208bb83

File tree

8 files changed

+30
-34
lines changed

8 files changed

+30
-34
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,12 @@ jobs:
3535
fail-fast: false
3636
matrix:
3737
os: [ubuntu-latest]
38-
python-version: ['3.9', '3.11', '3.13', '3.14']
38+
python-version: ['3.10', '3.12', '3.14']
3939
include:
40-
- {os: macos-15-intel, python-version: '3.9'}
41-
- {os: macos-latest, python-version: '3.13'}
40+
- {os: macos-15-intel, python-version: '3.10'}
4241
- {os: macos-latest, python-version: '3.14'}
43-
- {os: windows-latest, python-version: '3.9'}
42+
- {os: windows-latest, python-version: '3.11'}
4443
- {os: windows-latest, python-version: '3.13'}
45-
- {os: windows-latest, python-version: '3.14'}
4644

4745
steps:
4846
- uses: actions/checkout@v6
@@ -56,7 +54,7 @@ jobs:
5654
- uses: astral-sh/setup-uv@v7
5755

5856
- name: Install package
59-
run: uv pip install --system -e .[test]
57+
run: uv pip install --system -e. --group=test
6058

6159
- name: Pytest
6260
if: runner.os == 'Linux'
@@ -92,7 +90,7 @@ jobs:
9290
run: sudo apt-get install graphviz
9391

9492
- name: Install package
95-
run: uv pip install --system -e .[test]
93+
run: uv pip install --system -e. --group=test
9694

9795
- name: Install notebook requirements
9896
run: uv pip install --system nbconvert jupyter_client ipykernel pydot

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ repos:
2222
rev: "v0.14.14"
2323
hooks:
2424
- id: ruff-check
25-
args: ["--fix", "--show-fixes"]
25+
args: ["--fix"]
2626
- id: ruff-format
2727

2828
- repo: https://github.com/pre-commit/mirrors-mypy

.readthedocs.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,10 @@ sphinx:
1313
formats: all
1414

1515
build:
16-
os: ubuntu-22.04
16+
os: ubuntu-24.04
1717
tools:
18-
python: "3.11"
19-
20-
python:
21-
install:
22-
- method: pip
23-
path: .
24-
extra_requirements:
25-
- docs
18+
python: "3.14"
19+
jobs:
20+
install:
21+
- pip install --upgrade pip
22+
- pip install --group docs

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@ pip install decaylanguage
3434

3535
You can use a virtual environment through pipenv or with `--user` if you know
3636
what those are. [Python
37-
3.9+](http://docs.python-guide.org/en/latest/starting/installation) supported
38-
(see version 0.14 for Python 3.6 support, 0.18 for Python 3.7 and 3.8 support).
37+
3.10+](http://docs.python-guide.org/en/latest/starting/installation) supported
38+
(see version 0.14 for Python 3.6 support, 0.18 for Python 3.7 and 3.8 support,
39+
0.20 for Python 3.8 support).
3940

4041
<details><summary>Dependencies: (click to expand)</summary><p>
4142

notebooks/AmpGen2GooFit D2K3p.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@
269269
},
270270
{
271271
"cell_type": "code",
272-
"execution_count": 7,
272+
"execution_count": null,
273273
"metadata": {},
274274
"outputs": [
275275
{
@@ -287,7 +287,7 @@
287287
}
288288
],
289289
"source": [
290-
"for spintype, c in zip(SpinType, colors):\n",
290+
"for spintype, c in zip(SpinType, colors, strict=False):\n",
291291
" ps = [\n",
292292
" c | format(str(p), \"11\")\n",
293293
" for p in GooFitChain.all_particles\n",

noxfile.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,22 @@
1313

1414
@nox.session
1515
def lint(session):
16-
session.install("pre-commit")
17-
session.run("pre-commit", "run", "--all-files", *session.posargs)
16+
session.install("prek")
17+
session.run("prek", "run", "--all-files", *session.posargs)
1818

1919

2020
@nox.session
2121
def pylint(session: nox.Session) -> None:
2222
"""
2323
Run pylint.
2424
"""
25-
26-
session.install("pylint")
27-
session.install("-e.[dev]")
25+
session.install("-e.", "--group=dev", "pylint")
2826
session.run("pylint", "src", *session.posargs)
2927

3028

3129
@nox.session(python=PYTHON_VERSIONS)
3230
def tests(session):
33-
session.install(".[test]")
31+
session.install(".", "--group=test")
3432
session.run("pytest", *session.posargs)
3533

3634

pyproject.toml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ build-backend = "hatchling.build"
99
name = "decaylanguage"
1010
description = "A language to describe, manipulate and convert particle decays"
1111
readme = "README.md"
12-
requires-python = ">=3.9"
12+
requires-python = ">=3.10"
1313
authors = [
1414
{ name = "Eduardo Rodrigues", email = "eduardo.rodrigues@cern.ch" },
1515
{ name = "Henry Schreiner", email = "henryfs@princeton.edu" },
@@ -33,7 +33,6 @@ classifiers = [
3333
"Programming Language :: Python",
3434
"Programming Language :: Python :: 3",
3535
"Programming Language :: Python :: 3 :: Only",
36-
"Programming Language :: Python :: 3.9",
3736
"Programming Language :: Python :: 3.10",
3837
"Programming Language :: Python :: 3.11",
3938
"Programming Language :: Python :: 3.12",
@@ -53,9 +52,9 @@ dependencies = [
5352
]
5453
dynamic = ["version"]
5554

56-
[project.optional-dependencies]
55+
[dependency-groups]
5756
dev = [
58-
"pytest>=6",
57+
{ include-group = "test" }
5958
]
6059
docs = [
6160
"sphinx-rtd-theme>=0.5.0",
@@ -147,6 +146,9 @@ messages_control.disable = [
147146
"duplicate-code",
148147
]
149148

149+
[tool.ruff]
150+
show-fixes = true
151+
150152
[tool.ruff.lint]
151153
extend-select = [
152154
"B", # flake8-bugbear

src/decaylanguage/dec/dec.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@
4242
import os
4343
import re
4444
import warnings
45-
from collections.abc import Iterable
45+
from collections.abc import Callable, Iterable
4646
from io import StringIO
4747
from itertools import chain, zip_longest
4848
from pathlib import Path
49-
from typing import Any, Callable
49+
from typing import Any
5050

5151
from hepunits import GeV
5252
from lark import Lark, Token, Transformer, Tree, Visitor
@@ -995,7 +995,7 @@ def _align_items(
995995

996996
aligned.append(row)
997997

998-
return [sep.join(row) for row in zip(*aligned)]
998+
return [sep.join(row) for row in zip(*aligned, strict=True)]
999999

10001000
def build_decay_chains(
10011001
self,

0 commit comments

Comments
 (0)