From dd41ee6dae64ca29cb95c7641bc7b7da37de1f1d Mon Sep 17 00:00:00 2001 From: Ben Jeffery Date: Sun, 7 Sep 2025 23:03:44 +0100 Subject: [PATCH] Pyproject reqs --- .circleci/config.yml | 6 ++- .github/workflows/docs.yml | 4 +- docs/requirements.txt | 22 --------- pyproject.toml | 96 ++++++++++++++++++++++++++++++++++++-- requirements.txt | 20 -------- 5 files changed, 99 insertions(+), 49 deletions(-) delete mode 100644 docs/requirements.txt delete mode 100644 requirements.txt diff --git a/.circleci/config.yml b/.circleci/config.yml index 3bb5663d..52565d84 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -20,7 +20,11 @@ jobs: - run: name: install dependencies command: | - pip install -r requirements.txt --user + # Install uv for dependency management + pip install --user uv + # Install dependencies from pyproject.toml + uv pip install --system -r pyproject.toml --extra test --extra dev + pyenv rehash - run: name: Lint Python command: | diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 990be4dc..d6bba304 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -8,6 +8,4 @@ on: merge_group: jobs: Docs: - uses: tskit-dev/.github/.github/workflows/docs-build-template.yml@main - with: - requirements-path: docs/requirements.txt + uses: tskit-dev/.github/.github/workflows/docs-build-template.yml@v1 diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index ba651abb..00000000 --- a/docs/requirements.txt +++ /dev/null @@ -1,22 +0,0 @@ -appdirs -demesdraw -attrs -matplotlib -mpmath -numba -pandas -scipy>=1.13.0 -stdpopsim==0.3.0 -tsinfer -tskit -tqdm -jupyter-book==1.0.4.post1 -sphinx-issues==5.0.0 -sphinx-argparse==0.5.2 -sphinxcontrib-bibtex -humanize==4.12.1 -tqdm==4.67.1 -daiquiri -msprime==1.3.3 -ipywidgets==8.1.5 -sphinx-book-theme #Unpinned to allow easy updating. diff --git a/pyproject.toml b/pyproject.toml index 6c6e4526..7a70ba5e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,10 +3,100 @@ requires = [ "setuptools>=42", "setuptools_scm", "wheel", - "oldest-supported-numpy" + "oldest-supported-numpy", ] - build-backend = "setuptools.build_meta" +[project] +name = "tsdate" +dynamic = [ + "version", +] +authors = [ + { name = "tsdate Developers", email = "admin@tskit.dev" }, +] +description = "Infer tree sequence node times" +readme = "README.md" +requires-python = ">=3.8" +classifiers = [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", +] +dependencies = [ + "tskit>=0.6.0", + "tsinfer>=0.3.0", + "numpy", + "tqdm", + "daiquiri", + "scipy>=1.13.0", + "numba>=0.58.1", + "appdirs", + "setuptools>=45", +] + +[project.license] +text = "MIT" + +[project.optional-dependencies] +test = [ + "pytest==8.4.2", + "pytest-xdist==3.8.0", + "pytest-cov==6.3.0", + "msprime==1.3.4", + "mpmath==1.3.0", + "numdifftools==0.9.41", + "matplotlib==3.10.6", +] +docs = [ + "demesdraw==0.4.0", + "attrs==25.3.0", + "matplotlib==3.10.6", + "mpmath==1.3.0", + "numba==0.61.2", + "pandas==2.3.2", + "stdpopsim==0.3.0", + "tsinfer==0.4.1", + "tskit==0.6.4", + "jupyter-book==1.0.4.post1", + "sphinx-issues==5.0.1", + "sphinx-argparse==0.5.2", + "sphinxcontrib-bibtex==2.6.5", + "humanize==4.13.0", + "msprime==1.3.4", + "ipywidgets==8.1.7", + "sphinx-book-theme==1.1.4", +] +dev = [ + "ruff", + "pre-commit", + "pytest", + "pytest-xdist", + "pytest-cov", + "msprime", + "mpmath", + "numdifftools", + "matplotlib", + "twine", + "build", + "demesdraw", + "attrs", + "pandas", + "stdpopsim", + "jupyter-book", + "sphinx-issues", + "sphinx-argparse", + "sphinxcontrib-bibtex", + "humanize", + "ipywidgets", + "sphinx-book-theme", +] + [tool.setuptools_scm] -write_to = "tsdate/_version.py" \ No newline at end of file +write_to = "tsdate/_version.py" diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 4dd62e86..00000000 --- a/requirements.txt +++ /dev/null @@ -1,20 +0,0 @@ -tskit>=0.6.0 -tsinfer>=0.3.0 -ruff -numpy -tqdm -daiquiri -msprime>=1.3.2 -scipy>=1.13.0 -numba>=0.58.1 -appdirs -pre-commit -pytest -pytest-xdist -pytest-cov -mpmath -numdifftools -setuptools>=45 -matplotlib -twine -build