Skip to content

Commit 09af8fb

Browse files
committed
updates for 3.14
1 parent 4166902 commit 09af8fb

File tree

4 files changed

+70
-0
lines changed

4 files changed

+70
-0
lines changed

noxfile.py

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# noxfile.py
2+
import nox
3+
import sys
4+
import os
5+
6+
ARTIFACTS = (
7+
"*.egg-info",
8+
".hypothesis",
9+
"build",
10+
"dist",
11+
"src/*.so",
12+
)
13+
14+
# Optional: set defaults so `nox` with no args runs tests.
15+
# Comment this out if you don't want defaults.
16+
nox.options.sessions = ["test"]
17+
18+
@nox.session(python=False) # run in the current environment
19+
def clean(session):
20+
"""Clean build artifacts and uninstall arraykit."""
21+
session.run(
22+
sys.executable, "-m", "pip",
23+
"--disable-pip-version-check", "uninstall", "--yes", "arraykit",
24+
external=True
25+
)
26+
for artifact in sorted(ARTIFACTS):
27+
session.run("rm", "-rf", artifact, external=True)
28+
29+
@nox.session(python=False)
30+
def build(session):
31+
"""Build/install locally without build isolation (keeps verbose for warnings)."""
32+
session.run(
33+
sys.executable, "-m", "pip",
34+
"--disable-pip-version-check", "-v",
35+
"install", "--no-build-isolation", ".",
36+
external=True
37+
)
38+
39+
@nox.session(python=False)
40+
def test(session):
41+
"""Run pytest with native traceback."""
42+
session.run(
43+
"pytest", "-s", "--disable-pytest-warnings", "--tb=native",
44+
external=True
45+
)
46+
47+
@nox.session(python=False)
48+
def performance(session):
49+
"""Run performance benches. Pass names via env: NAMES='foo,bar' nox -s performance"""
50+
names = os.environ.get("NAMES", "")
51+
args = [sys.executable, "-m", "performance"]
52+
if names:
53+
args.extend(["--names", names])
54+
session.run(*args, external=True)
55+
56+
@nox.session(python=False)
57+
def lint(session):
58+
"""Run pylint static analysis."""
59+
session.run(
60+
"pylint", "-f", "colorized", "*.py", "performance", "src", "test",
61+
external=True
62+
)

requirements-build-3_14.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
numpy==2.3.3
2+
setuptools==80.*

requirements-dev-3_14.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
numpy==2.3.3
2+
pytest==8.3.3
3+
invoke==2.2.0
4+
hypothesis==6.131.16

test/test_pyi.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ class Interface(tp.NamedTuple):
1414

1515
@staticmethod
1616
def _valid_name(name: str) -> bool:
17+
if name in ('__annotate__', '__class__', '__annotate_func__'):
18+
return False
1719
if name.startswith('__'):
1820
return True
1921
if name.startswith('_'):

0 commit comments

Comments
 (0)