From a8b3452d3dcb7ddfacb9c01c2aa50cd6702c0205 Mon Sep 17 00:00:00 2001 From: William Jamieson Date: Mon, 25 Nov 2024 10:04:13 -0500 Subject: [PATCH] Use the list_dependencies_command instead of pip freeze (#515) --- .github/workflows/ci_cron.yml | 1 + pyproject.toml | 8 ++++---- tox.ini | 16 ++++++++++++---- 3 files changed, 17 insertions(+), 8 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 75e1f1c7..76bab7fe 100644 --- a/tox.ini +++ b/tox.ini @@ -3,6 +3,8 @@ envlist = check-{style,build} test-xdist{,-cov,-devdeps} build-{docs,dist} +requires = + tox-uv [testenv:check-style] description = Run all style and file checks with pre-commit @@ -18,18 +20,24 @@ 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 = https://pypi.anaconda.org/astropy/simple https://pypi.anaconda.org/liberfa/simple https://pypi.anaconda.org/scientific-python-nightly-wheels/simple + 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 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 \