diff --git a/.copier-answers.yml b/.copier-answers.yml index ef73fb9..bfc5ba0 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,5 +1,5 @@ # Changes here will be overwritten by Copier; NEVER EDIT MANUALLY -_commit: 8cfdb1b +_commit: ee9a09a _src_path: gh:scipp/copier_template description: Reflectometry data reduction for the European Spallation Source max_python: '3.12' diff --git a/docs/conf.py b/docs/conf.py index eb3cc4c..0f0474b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -29,6 +29,12 @@ 'nbsphinx', 'myst_parser', ] +try: + import sciline.sphinxext.domain_types # noqa: F401 + + extensions.append('sciline.sphinxext.domain_types') +except ModuleNotFoundError: + pass myst_enable_extensions = [ "amsmath", @@ -54,6 +60,7 @@ intersphinx_mapping = { 'python': ('https://docs.python.org/3', None), 'numpy': ('https://numpy.org/doc/stable/', None), + 'scipp': ('https://scipp.github.io/', None), } # autodocs includes everything, even irrelevant API internals. autosummary @@ -73,6 +80,16 @@ typehints_defaults = 'comma' typehints_use_rtype = False +sciline_domain_types_prefix = 'essreflectometry' +sciline_domain_types_aliases = { + 'scipp._scipp.core.DataArray': 'scipp.DataArray', + 'scipp._scipp.core.Dataset': 'scipp.Dataset', + 'scipp._scipp.core.DType': 'scipp.DType', + 'scipp._scipp.core.Unit': 'scipp.Unit', + 'scipp._scipp.core.Variable': 'scipp.Variable', + 'scipp.core.data_group.DataGroup': 'scipp.DataGroup', +} + # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] diff --git a/pyproject.toml b/pyproject.toml index f09a9d7..8c1fbbc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,6 +54,7 @@ minversion = "7.0" addopts = """ --strict-config --strict-markers +--import-mode=importlib -ra -v """ diff --git a/tox.ini b/tox.ini index a19c2f8..307a5a6 100644 --- a/tox.ini +++ b/tox.ini @@ -15,8 +15,8 @@ commands = pytest [testenv:unpinned] description = Test with unpinned dependencies, as a user would install now. deps = + -r requirements/basetest.txt essreflectometry - pytest commands = pytest [testenv:docs]