Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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 @@ -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:
Expand Down
11 changes: 4 additions & 7 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
41 changes: 18 additions & 23 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,12 @@


TEST_PYTHONS = [
"3.11",
"3.12",
"3.13",
"3.14",
]


@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:
"""
Expand All @@ -58,17 +44,19 @@ 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])
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")

Expand All @@ -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)


Expand All @@ -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
)


Expand All @@ -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")
Expand Down
21 changes: 13 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ description = "A Python tool to work with any format for annotating animal sound
authors = [
{name = "David Nicholson", email = "[email protected]"}
]
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",
Expand All @@ -32,14 +32,14 @@ classifiers = [
'Programming Language :: Python :: Implementation :: CPython',
]

[project.optional-dependencies]
[dependency-groups]
test = [
"pytest >=6.2.1",
"pytest-cov >=2.12.0",
"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",
Expand All @@ -54,16 +54,21 @@ doc = [
"sphinxext-opengraph >=0.5.1",
"sphinx-tabs >= 3.3.1",
]
dev = [
lint = [
'black >=23.1.0',
'crowsetta[doc, test]',
'flake8 >=6.0.0',
'flit',
'isort >=5.12.0',
'pycln >=2.1.3',
]
dev = [
'twine',
{include-group = "lint"},
{include-group = "test"},
{include-group = "doc"},

]


[project.urls]
Source = "https://github.com/vocalpy/crowsetta"
Documentation = "https://crowsetta.readthedocs.io"
Expand Down