[pytest]
minversion = 8.0
testpaths = docs sherpa
addopts = -rs --doctest-rst --strict-config --doctest-plus


norecursedirs = .git build dist tmp* .eggs
text_file_format = rst
filterwarnings =
    # Since we can runpytest without loading pytest-doctestplus, hide
    # the warnings we get when this is done
    ignore::pytest.PytestConfigWarning
doctest_plus = enabled
doctest_plus_atol = 1e-4
doctest_optionflags =
    NORMALIZE_WHITESPACE
    ELLIPSIS
    FLOAT_CMP
doctest_norecursedirs =
    extern
    sherpa-test-data
    scripts
    # Blacklist everything and then remove from this list when it's ready
    docs/_examples
    docs/code
    docs/data
    docs/developer
    docs/examples
    docs/extra
    docs/install.rst
    docs/model_classes
    docs/overview
    docs/statistics
    docs/ui
    sherpa/__init__.py
    sherpa/astro/all.py
    sherpa/astro/background.py
    sherpa/astro/datastack
    sherpa/astro/fake.py
    sherpa/astro/flux.py
    sherpa/astro/instrument.py
    sherpa/astro/models
    sherpa/astro/optical
    sherpa/astro/plot.py
    sherpa/astro/sim
    sherpa/astro/ui
    sherpa/astro/tests
    sherpa/astro/utils
    sherpa/astro/xspec
    sherpa/conftest.py
    sherpa/estmethods
    sherpa/image
    sherpa/include
    sherpa/io.py
    sherpa/sim
    sherpa/static
    sherpa/stats
    sherpa/tests
    sherpa/ui
    sherpa/utils

doctest_subpackage_requires =
    sherpa/astro/io/crates_backend.py = pycrates
    sherpa/astro/io/pyfits_backend.py = astropy
    sherpa/plot/pylab_backend.py = matplotlib
    sherpa/plot/pylab_area_backend.py = matplotlib
    sherpa/plot/__init__.py = matplotlib
    sherpa/plot/bokeh_backend.py = bokeh
    sherpa/optmethods/optscipy.py = scipy
    sherpa/optmethods/optoptimagic.py = optimagic
    docs/evaluation/simulate.rst = matplotlib astropy
    docs/mcmc/index.rst = matplotlib
    docs/model_classes/usermodel.rst = matplotlib
    docs/plots/* = matplotlib
    docs/ui/index.rst = matplotlib
    docs/models/index.rst = matplotlib
    docs/quick.rst = matplotlib
    docs/evaluation/* = matplotlib
    docs/mcmc/index.rst = arviz
    docs/plots/backends.rst = matplotlib bokeh
    docs/plots/bokeh_backend.rst = bokeh
    docs/evaluation/examples.rst = group sherpa.astro.xspec._xspec
    # pycrates OR astropy would do, but the syntax does not allow to specify alternatives, so just pick one
    docs/evaluation/examples.rst = astropy
    sherpa/astro/data.py = astropy

