From 913ab06aff1fd26a35f0697cfc70163dd7ec39bd Mon Sep 17 00:00:00 2001 From: David Nicholson Date: Fri, 12 Sep 2025 13:05:17 -0400 Subject: [PATCH 1/8] Use dependency-groups in pyproject.toml --- pyproject.toml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 621a429..41428fb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,7 +32,7 @@ classifiers = [ 'Programming Language :: Python :: Implementation :: CPython', ] -[project.optional-dependencies] +[dependency-groups] test = [ "pytest >=6.2.1", "pytest-cov >=2.12.0", @@ -56,14 +56,16 @@ doc = [ ] dev = [ 'black >=23.1.0', - 'crowsetta[doc, test]', 'flake8 >=6.0.0', - 'flit', 'isort >=5.12.0', 'pycln >=2.1.3', 'twine', + {include-group = "test"}, + {include-group = "doc"}, + ] + [project.urls] Source = "https://github.com/vocalpy/crowsetta" Documentation = "https://crowsetta.readthedocs.io" From 05c2db9b97b87ad4cfa69cf7dd857c2a7d8b8816 Mon Sep 17 00:00:00 2001 From: David Nicholson Date: Fri, 12 Sep 2025 13:34:50 -0400 Subject: [PATCH 2/8] Add dependency-group lint so we can use just that in nox session --- pyproject.toml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 41428fb..dc2e148 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,12 +54,15 @@ doc = [ "sphinxext-opengraph >=0.5.1", "sphinx-tabs >= 3.3.1", ] -dev = [ +lint = [ 'black >=23.1.0', 'flake8 >=6.0.0', 'isort >=5.12.0', 'pycln >=2.1.3', +] +dev = [ 'twine', + {include-group = "lint"}, {include-group = "test"}, {include-group = "doc"}, From f4a1c25361688c6c84b092352ece5b9825738195 Mon Sep 17 00:00:00 2001 From: David Nicholson Date: Fri, 12 Sep 2025 13:35:04 -0400 Subject: [PATCH 3/8] Rewrite noxfile.py to use dependency-groups for install --- noxfile.py | 39 +++++++++++++++++---------------------- 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/noxfile.py b/noxfile.py index 8bdb03d..12f9a06 100644 --- a/noxfile.py +++ b/noxfile.py @@ -19,20 +19,6 @@ ] -@nox.session -def build(session: nox.Session) -> None: - """ - Build an SDist and wheel with ``flit``. - """ - - dist_dir = DIR.joinpath("dist") - if dist_dir.exists(): - shutil.rmtree(dist_dir) - - session.install(".[dev]") - session.run("flit", "build") - - @nox.session(python=TEST_PYTHONS[1]) def dev(session: nox.Session) -> None: """ @@ -58,7 +44,9 @@ def dev(session: nox.Session) -> None: # Use the venv's interpreter to install the project along with # all it's dev dependencies, this ensures it's installed in the right way - session.run(python, "-m", "pip", "install", "-e", ".[dev,test,doc]", external=True) + pyproject = nox.project.load_toml("pyproject.toml") + session.install(*nox.project.dependency_groups(pyproject, "dev")) + session.run(python, "-m", "pip", "install", "-e", ".", external=True) @nox.session(python=TEST_PYTHONS[1]) @@ -66,9 +54,9 @@ def lint(session): """ Run the linter. """ - session.install(".[dev]") - # run isort first since black disagrees with it - session.run("isort", "./src") + pyproject = nox.project.load_toml("pyproject.toml") + session.install(*nox.project.dependency_groups(pyproject, "lint")) + session.run("isort", "./src") # run isort first since black disagrees with it session.run("black", "./src", "--line-length=120") session.run("flake8", "./src", "--max-line-length", "120", "--exclude", "./src/crowsetta/_vendor") @@ -78,7 +66,9 @@ def test(session) -> None: """ Run the unit and regular tests. """ - session.install(".[test]") + session.install(".") + pyproject = nox.project.load_toml("pyproject.toml") + session.install(*nox.project.dependency_groups(pyproject, "test")) session.run("pytest", "-n", "auto", *session.posargs) @@ -87,9 +77,12 @@ def coverage(session) -> None: """ Run the unit and regular tests, and save coverage report """ - session.install(".[test]", "pytest-cov") + session.install(".") + pyproject = nox.project.load_toml("pyproject.toml") + session.install(*nox.project.dependency_groups(pyproject, "test")) + session.install("pytest-cov") session.run( - "pytest", "-n", "auto", "--cov=./", "--cov-report=xml", *session.posargs + "pytest", "-n", "auto", "--cov=crowsetta", "--cov-report=xml", *session.posargs ) @@ -106,7 +99,9 @@ def doc(session: nox.Session) -> None: Otherwise the docs will be built once using """ - session.install(".[doc]") + session.install(".") + pyproject = nox.project.load_toml("pyproject.toml") + session.install(*nox.project.dependency_groups(pyproject, "doc")) if session.posargs: if "autobuild" in session.posargs: print("Building docs at http://127.0.0.1:8000 with sphinx-autobuild -- use Ctrl-C to quit") From e2ff1c8e7b46c9f45739cc03196b6a84c7f540e6 Mon Sep 17 00:00:00 2001 From: David Nicholson Date: Fri, 12 Sep 2025 13:43:32 -0400 Subject: [PATCH 4/8] Fix .readthedocs.yaml to use dependency-group doc --- .readthedocs.yaml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index b701d24..664febf 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -10,13 +10,10 @@ build: - libsndfile1 tools: python: "3.13" + jobs: + install: + - python -m pip install --no-cache dir "pip >= 25.1" + - python -m pip install --upgrade --upgrade-strategy only-if-needed --no-cache-dir --group doc . sphinx: configuration: doc/conf.py - -python: - install: - - method: pip - path: . - extra_requirements: - - doc From 8581dc2d2ab1d699bb9a183336ce6e1d68f708c7 Mon Sep 17 00:00:00 2001 From: David Nicholson Date: Fri, 12 Sep 2025 14:26:24 -0400 Subject: [PATCH 5/8] Fix typ in .readthedocs.yaml --- .readthedocs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 664febf..6ec0cce 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -12,7 +12,7 @@ build: python: "3.13" jobs: install: - - python -m pip install --no-cache dir "pip >= 25.1" + - python -m pip install --no-cache-dir "pip >= 25.1" - python -m pip install --upgrade --upgrade-strategy only-if-needed --no-cache-dir --group doc . sphinx: From 4d56425899f4fe51d0cb91fbdab275ffc3e892a7 Mon Sep 17 00:00:00 2001 From: David Nicholson Date: Mon, 15 Dec 2025 17:54:29 -0500 Subject: [PATCH 6/8] WIP: Drop support for dependencies as per SPEC 0 --- pyproject.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index dc2e148..e6a2592 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,12 +8,12 @@ description = "A Python tool to work with any format for annotating animal sound authors = [ {name = "David Nicholson", email = "nickledave@users.noreply.github.com"} ] -requires-python = ">=3.11" +requires-python = ">=3.12" dependencies = [ "appdirs >=1.4.4", "attrs >=25.3.0", - "numpy >=1.26.0", - "pandas >= 2.1.0", + "numpy >=2.0.0", + "pandas >= 2.2.0", "pandera >= 0.25.0", "scipy >=1.12.0", "SoundFile >=0.13.1", @@ -39,7 +39,7 @@ test = [ "pytest-xdist >=3.2.0", ] doc = [ - "ipython != 8.7.0", + "ipython >= 8.20.0", "jupyterlab >=3.0.3", "jupytext >=1.13.8", "librosa >=0.9.1", From e5e2dbdf116cb4f1d66e41b8b518908493a1c9c5 Mon Sep 17 00:00:00 2001 From: David Nicholson Date: Mon, 15 Dec 2025 18:37:03 -0500 Subject: [PATCH 7/8] Change TEST_PTYHONS in noxfile.py: 3.12-3.14 --- noxfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noxfile.py b/noxfile.py index 12f9a06..7654ca5 100644 --- a/noxfile.py +++ b/noxfile.py @@ -13,9 +13,9 @@ TEST_PYTHONS = [ - "3.11", "3.12", "3.13", + "3.14", ] From d47ef40989bc4864a4a8319c80550d0c9308a9d8 Mon Sep 17 00:00:00 2001 From: David Nicholson Date: Mon, 15 Dec 2025 18:37:21 -0500 Subject: [PATCH 8/8] Change python-version in workflows/ci.yml: 3.12-3.14 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f4ec21c..5726748 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.11, 3.12, 3.13] + python-version: [3.12, 3.13, 3.14] os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} steps: