From bf3febef8d0b4c17378941d9274f71c58713cb7f Mon Sep 17 00:00:00 2001 From: William Jamieson Date: Fri, 22 Nov 2024 12:43:35 -0500 Subject: [PATCH 1/3] Use the list_dependencies_command instead of pip freeze. This is what `tox` recommends. It also allows this `tox` to be compatible with using `tox-uv` --- tox.ini | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 75e1f1c7..43ce1c36 100644 --- a/tox.ini +++ b/tox.ini @@ -28,8 +28,9 @@ deps = devdeps: numpy>=0.0.dev0 devdeps: astropy>=0.0.dev0 devdeps: pyerfa>=0.0.dev0 +commands_pre = + {list_dependencies_command} commands = - pip freeze pytest \ xdist: -n auto \ cov: --cov --cov-report=term-missing --cov-report=xml \ From b2e81be4d3c1558f22a33ad90e5dfdcb37cfb89d Mon Sep 17 00:00:00 2001 From: William Jamieson Date: Fri, 22 Nov 2024 15:08:39 -0500 Subject: [PATCH 2/3] Update devdeps support to acutally function --- tox.ini | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 43ce1c36..17b7b486 100644 --- a/tox.ini +++ b/tox.ini @@ -4,6 +4,9 @@ envlist = test-xdist{,-cov,-devdeps} build-{docs,dist} +[main] +extra_url = https://pypi.anaconda.org/liberfa/simple https://pypi.anaconda.org/astropy/simple https://pypi.anaconda.org/scientific-python-nightly-wheels/simple + [testenv:check-style] description = Run all style and file checks with pre-commit skip_install = true @@ -19,15 +22,17 @@ description = cov: with coverage xdist: using parallel processing set_env = - devdeps: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/astropy/simple https://pypi.anaconda.org/liberfa/simple https://pypi.anaconda.org/scientific-python-nightly-wheels/simple + devdeps: PIP_EXTRA_INDEX_URL = {[main]extra_url} + devdeps: UV_INDEX = {[main]extra_url} + devdeps: UV_INDEX_STRATEGY = unsafe-any-match extras = test deps = xdist: pytest-xdist cov: pytest-cov + devdeps: pyerfa>=0.0.dev0 devdeps: numpy>=0.0.dev0 devdeps: astropy>=0.0.dev0 - devdeps: pyerfa>=0.0.dev0 commands_pre = {list_dependencies_command} commands = From c26fa283b9207d25b4a10c3c8d717daab0cc1e55 Mon Sep 17 00:00:00 2001 From: William Jamieson Date: Fri, 22 Nov 2024 15:30:13 -0500 Subject: [PATCH 3/3] Add oldestdeps --- .github/workflows/ci_cron.yml | 1 + pyproject.toml | 8 ++++---- tox.ini | 14 ++++++++------ 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci_cron.yml b/.github/workflows/ci_cron.yml index 21a74402..f289c12b 100644 --- a/.github/workflows/ci_cron.yml +++ b/.github/workflows/ci_cron.yml @@ -22,3 +22,4 @@ jobs: envs: | - macos: py310-xdist - linux: py312-devdeps-xdist + - linux: py310-oldestdeps-xdist diff --git a/pyproject.toml b/pyproject.toml index 61268a34..950d19c6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,7 @@ classifiers = [ "Programming Language :: Python :: 3", ] dependencies = [ - "asdf >=2.14.2", + "asdf >=2.15.2", "asdf-astropy >=0.5.0", ] dynamic = [ @@ -28,8 +28,8 @@ file = "LICENSE" [project.optional-dependencies] test = [ - "pytest>=4.6.0", - "pytest-doctestplus>=0.11.1", + "pytest>=7.0.0", + "pytest-doctestplus>=1.2.1", "crds>=11.16.16", ] docs = [ @@ -77,7 +77,7 @@ where = [ ] [tool.pytest.ini_options] -minversion = 4.6 +minversion = 7.0 doctest_plus = true doctest_rst = true text_file_format = "rst" diff --git a/tox.ini b/tox.ini index 17b7b486..76bab7fe 100644 --- a/tox.ini +++ b/tox.ini @@ -3,9 +3,8 @@ envlist = check-{style,build} test-xdist{,-cov,-devdeps} build-{docs,dist} - -[main] -extra_url = https://pypi.anaconda.org/liberfa/simple https://pypi.anaconda.org/astropy/simple https://pypi.anaconda.org/scientific-python-nightly-wheels/simple +requires = + tox-uv [testenv:check-style] description = Run all style and file checks with pre-commit @@ -21,14 +20,17 @@ description = run tests cov: with coverage xdist: using parallel processing + devdeps: Run with select dev dependencies + oldestdeps: Run with oldest direct dependencies set_env = - devdeps: PIP_EXTRA_INDEX_URL = {[main]extra_url} - devdeps: UV_INDEX = {[main]extra_url} + devdeps: UV_INDEX = https://pypi.anaconda.org/liberfa/simple https://pypi.anaconda.org/astropy/simple https://pypi.anaconda.org/scientific-python-nightly-wheels/simple devdeps: UV_INDEX_STRATEGY = unsafe-any-match extras = test +uv_resolution = + oldestdeps: lowest-direct deps = - xdist: pytest-xdist + xdist: pytest-xdist>=3 cov: pytest-cov devdeps: pyerfa>=0.0.dev0 devdeps: numpy>=0.0.dev0