Skip to content

Commit

Permalink
config
Browse files Browse the repository at this point in the history
Signed-off-by: Nathaniel Starkman <nstarman@users.noreply.github.com>
  • Loading branch information
nstarman committed May 18, 2023
1 parent a9d7aa3 commit 6f2625c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 7 deletions.
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
]

[project.optional-dependencies]
all = [
"cosmology.api >= 0.1.0", # is this needed?
]
test = [
"coverage[toml]",
"numpy>=1.20",
Expand Down
29 changes: 22 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ deps =

# The oldestdeps factor is intended to be used to install the oldest
# versions of all dependencies that have a minimum version.
oldestdeps: numpy==1.18.*
oldestdeps: numpy==1.21.*

devdeps: :NIGHTLY:numpy
devdeps: git+https://github.com/scipy/scipy.git#egg=scipy
Expand All @@ -65,10 +65,23 @@ extras =

commands =
pip freeze
!cov-!double: pytest --pyargs {toxinidir}/tests {posargs}
cov-!double: pytest --pyargs {toxinidir}/tests --cov cosmology --cov-config={toxinidir}/pyproject.toml {posargs}
!cov-!double: pytest --pyargs {toxinidir}/tests {toxinidir}/docs {posargs}
cov-!double: pytest --pyargs {toxinidir}/tests {toxinidir}/docs --cov cosmology --cov-config={toxinidir}/pyproject.toml {posargs}
cov: coverage xml -o {toxinidir}/coverage.xml


# This lets developers use tox to build docs and ignores warnings.
# This is not used in CI; For that, we have RTD PR builder.
[testenv:build_docs]
changedir = docs
description = invoke sphinx-build to build the HTML docs
extras = docs
commands =
pip freeze
sphinx-build -b html . _build/html {posargs:-j auto}



[testenv:codestyle]
skip_install = true
description = Run all style and file checks with pre-commit
Expand All @@ -78,18 +91,20 @@ commands =
pre-commit install-hooks
pre-commit run {posargs:--color always --all-files --show-diff-on-failure}


[pytest]
testpaths =
tests
src/cosmology/
astropy_header = True
doctest_plus = enabled
docs
text_file_format = rst
addopts = --doctest-rst
addopts = -p no:doctest
markers =
incompatible_with_mypyc: run when testing mypyc compiled code
filterwarnings =
# tomlkit
ignore:The config value
# distutils
ignore:distutils Version classes are deprecated\.
ignore:distutils Version classes are deprecated:DeprecationWarning
# NumPy
ignore:The numpy.array_api submodule is still experimental. See NEP 47.:UserWarning

0 comments on commit 6f2625c

Please sign in to comment.