Skip to content

Commit 4e78dcd

Browse files
committed
Copier update
1 parent eb6dcea commit 4e78dcd

File tree

10 files changed

+36
-14
lines changed

10 files changed

+36
-14
lines changed

.copier-answers.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2-
_commit: 8cfdb1b
2+
_commit: f426ac2
33
_src_path: gh:scipp/copier_template
44
description: Diffraction data reduction for the European Spallation Source
5-
max_python: '3.11'
5+
max_python: '3.12'
66
min_python: '3.9'
77
namespace_package: ess
88
nightly_deps: scipp,scippnexus,sciline,plopp,scippneutron
99
orgname: scipp
1010
prettyname: ESSdiffraction
1111
projectname: essdiffraction
1212
related_projects: Scipp,ScippNexus,ScippNeutron,Sciline,Plopp
13-
year: 2023
13+
year: 2024

.github/workflows/ci.yml

+6-5
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,13 @@ jobs:
2727
- uses: actions/setup-python@v4
2828
with:
2929
python-version-file: '.github/workflows/python-version-ci'
30-
- run: python -m pip install --upgrade pip
31-
- run: python -m pip install -r requirements/ci.txt
32-
- run: tox -e static
33-
- uses: stefanzweifel/git-auto-commit-action@v5
30+
- uses: pre-commit/[email protected]
3431
with:
35-
commit_message: Apply automatic formatting
32+
extra_args: --all-files
33+
- uses: pre-commit-ci/[email protected]
34+
if: always()
35+
with:
36+
msg: Apply automatic formatting
3637

3738
tests:
3839
name: Tests

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,4 @@ docs/generated/
3737
*.raw
3838
*.cif
3939
*.rcif
40+
*.ort

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
BSD 3-Clause License
22

3-
Copyright (c) 2023, Scipp contributors (https://github.com/scipp)
3+
Copyright (c) 2024, Scipp contributors (https://github.com/scipp)
44
All rights reserved.
55

66
Redistribution and use in source and binary forms, with or without

docs/conf.py

+19-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
# General information about the project.
1212
project = u'ESSdiffraction'
13-
copyright = u'2023 Scipp contributors'
13+
copyright = u'2024 Scipp contributors'
1414
author = u'Scipp contributors'
1515

1616
html_show_sourcelink = True
@@ -23,12 +23,19 @@
2323
'sphinx.ext.intersphinx',
2424
'sphinx.ext.mathjax',
2525
'sphinx.ext.napoleon',
26+
'sphinx.ext.viewcode',
2627
'sphinx_autodoc_typehints',
2728
'sphinx_copybutton',
2829
'sphinx_design',
2930
'nbsphinx',
3031
'myst_parser',
3132
]
33+
try:
34+
import sciline.sphinxext.domain_types # noqa: F401
35+
36+
extensions.append('sciline.sphinxext.domain_types')
37+
except ModuleNotFoundError:
38+
pass
3239

3340
myst_enable_extensions = [
3441
"amsmath",
@@ -54,6 +61,7 @@
5461
intersphinx_mapping = {
5562
'python': ('https://docs.python.org/3', None),
5663
'numpy': ('https://numpy.org/doc/stable/', None),
64+
'scipp': ('https://scipp.github.io/', None),
5765
}
5866

5967
# autodocs includes everything, even irrelevant API internals. autosummary
@@ -73,6 +81,16 @@
7381
typehints_defaults = 'comma'
7482
typehints_use_rtype = False
7583

84+
sciline_domain_types_prefix = 'ess.diffraction'
85+
sciline_domain_types_aliases = {
86+
'scipp._scipp.core.DataArray': 'scipp.DataArray',
87+
'scipp._scipp.core.Dataset': 'scipp.Dataset',
88+
'scipp._scipp.core.DType': 'scipp.DType',
89+
'scipp._scipp.core.Unit': 'scipp.Unit',
90+
'scipp._scipp.core.Variable': 'scipp.Variable',
91+
'scipp.core.data_group.DataGroup': 'scipp.DataGroup',
92+
}
93+
7694
# Add any paths that contain templates here, relative to this directory.
7795
templates_path = ['_templates']
7896

pyproject.toml

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ classifiers = [
2121
"Programming Language :: Python :: 3.9",
2222
"Programming Language :: Python :: 3.10",
2323
"Programming Language :: Python :: 3.11",
24+
"Programming Language :: Python :: 3.12",
2425
"Topic :: Scientific/Engineering",
2526
"Typing :: Typed",
2627
]
@@ -54,6 +55,7 @@ minversion = "7.0"
5455
addopts = """
5556
--strict-config
5657
--strict-markers
58+
--import-mode=importlib
5759
-ra
5860
-v
5961
"""

requirements/make_base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def write_dependencies(dependency_name: str, dependencies: List[str]) -> None:
4343
with open("../pyproject.toml", "rb") as toml_file:
4444
pyproject = tomli.load(toml_file)
4545
dependencies = pyproject["project"].get("dependencies")
46-
if not dependencies:
46+
if dependencies is None:
4747
raise RuntimeError("No dependencies found in pyproject.toml")
4848
dependencies = [dep.strip().strip('"') for dep in dependencies]
4949

src/ess/diffraction/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# SPDX-License-Identifier: BSD-3-Clause
2-
# Copyright (c) 2023 Scipp contributors (https://github.com/scipp)
2+
# Copyright (c) 2024 Scipp contributors (https://github.com/scipp)
33

44
"""
55
Components for diffraction experiments (powder and single crystal).

tests/package_test.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# SPDX-License-Identifier: BSD-3-Clause
2-
# Copyright (c) 2023 Scipp contributors (https://github.com/scipp)
2+
# Copyright (c) 2024 Scipp contributors (https://github.com/scipp)
33
from ess import diffraction as pkg
44

55

tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ commands = pytest
1515
[testenv:unpinned]
1616
description = Test with unpinned dependencies, as a user would install now.
1717
deps =
18+
-r requirements/basetest.txt
1819
essdiffraction
19-
pytest
2020
commands = pytest
2121

2222
[testenv:docs]

0 commit comments

Comments
 (0)