Skip to content

Commit

Permalink
Some updates to the tox config
Browse files Browse the repository at this point in the history
Update things to avoid using pip, so that uv can be used
  • Loading branch information
WilliamJamieson committed Nov 22, 2024
1 parent 3db8024 commit d103665
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 19 deletions.
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ minversion = 4.6
doctest_plus = true
doctest_rst = true
text_file_format = "rst"
addopts = "--color=yes --doctest-rst"
addopts = [
"--color=yes",
"--doctest-rst",
]
testpaths = ["tests"]
filterwarnings = [
"error",
Expand Down
21 changes: 3 additions & 18 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,15 @@ deps =
cov: pytest-cov
oldestdeps: minimum_dependencies
rad: rad @ git+https://github.com/spacetelescope/rad.git@main#egg=rad
romancal: romancal[test] @ git+https://github.com/spacetelescope/romancal.git
commands_pre =
oldestdeps: minimum_dependencies roman_datamodels --filename requirements-min.txt
oldestdeps: pip install -r requirements-min.txt
devdeps: pip install -r requirements-dev.txt -U --upgrade-strategy eager
pip freeze
{list_dependencies_command}
commands =
pytest \
warnings: -W error \
romancal: -W ignore::DeprecationWarning -W ignore::UserWarning -W ignore::pytest.PytestUnknownMarkWarning -W ignore::pytest.PytestUnraisableExceptionWarning -W ignore::erfa.core.ErfaWarning -W ignore::roman_datamodels.datamodels._utils.FilenameMismatchWarning -W ignore::astropy.io.fits.verify.VerifyWarning -W ignore::RuntimeWarning --pyargs romancal \
xdist: -n auto \
cov: --cov=roman_datamodels --cov=tests --cov-config pyproject.toml --cov-report term-missing --cov-report xml \
{posargs}
Expand All @@ -70,19 +71,3 @@ deps =
build
commands =
python -m build .

[testenv:withromancal]
allowlist_externals =
git
bash
deps =
pytest-cov
commands_pre =
bash -c "pip freeze -q | grep 'roman_datamodels @' > {env_tmp_dir}/requirements.txt"
pip install git+https://github.com/spacetelescope/romancal.git
pip install -r {env_tmp_dir}/requirements.txt
pip freeze
commands =
pytest tests/test_open.py::test_open_asn \
--cov=tests --cov-config pyproject.toml --cov-report term-missing --cov-report xml \
{posargs}

0 comments on commit d103665

Please sign in to comment.