essdiffraction 23.12.0__tar.gz → 24.9.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. essdiffraction-24.9.0/.copier-answers.ess.yml +3 -0
  2. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/.copier-answers.yml +6 -6
  3. essdiffraction-24.9.0/.github/ISSUE_TEMPLATE/blank.md +8 -0
  4. essdiffraction-24.9.0/.github/ISSUE_TEMPLATE/high-level-requirement.yml +89 -0
  5. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/.github/workflows/ci.yml +9 -9
  6. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/.github/workflows/docs.yml +9 -7
  7. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/.github/workflows/nightly_at_main.yml +1 -3
  8. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/.github/workflows/nightly_at_release.yml +1 -3
  9. essdiffraction-24.9.0/.github/workflows/python-version-ci +1 -0
  10. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/.github/workflows/release.yml +9 -12
  11. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/.github/workflows/test.yml +21 -6
  12. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/.github/workflows/unpinned.yml +1 -3
  13. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/.gitignore +5 -0
  14. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/.pre-commit-config.yaml +11 -24
  15. essdiffraction-24.9.0/.python-version +1 -0
  16. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/LICENSE +1 -1
  17. {essdiffraction-23.12.0/src/essdiffraction.egg-info → essdiffraction-24.9.0}/PKG-INFO +13 -7
  18. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/conda/meta.yaml +20 -11
  19. essdiffraction-24.9.0/docs/_templates/doc_version.html +2 -0
  20. essdiffraction-24.9.0/docs/about/bibliography.rst +4 -0
  21. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/docs/about/index.md +9 -1
  22. essdiffraction-24.9.0/docs/api-reference/index.md +69 -0
  23. essdiffraction-24.9.0/docs/bibliography.bib +8 -0
  24. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/docs/conf.py +81 -42
  25. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/docs/developer/coding-conventions.md +1 -1
  26. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/docs/developer/getting-started.md +1 -1
  27. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/docs/developer/index.md +1 -1
  28. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/docs/index.md +1 -1
  29. essdiffraction-24.9.0/docs/user-guide/dream/dream-data-reduction.ipynb +311 -0
  30. essdiffraction-24.9.0/docs/user-guide/dream/dream-instrument-view.ipynb +255 -0
  31. essdiffraction-24.9.0/docs/user-guide/dream/index.md +10 -0
  32. essdiffraction-24.9.0/docs/user-guide/index.md +10 -0
  33. essdiffraction-24.9.0/docs/user-guide/sns-instruments/POWGEN_data_reduction.ipynb +402 -0
  34. essdiffraction-24.9.0/docs/user-guide/sns-instruments/index.md +13 -0
  35. {essdiffraction-23.12.0/docs/examples → essdiffraction-24.9.0/docs/user-guide/sns-instruments}/preprocess_files.ipynb +51 -45
  36. essdiffraction-24.9.0/docs/user-guide/sns-instruments/vanadium_processing.ipynb +391 -0
  37. essdiffraction-24.9.0/pyproject.toml +132 -0
  38. essdiffraction-24.9.0/requirements/base.in +14 -0
  39. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/requirements/base.txt +63 -68
  40. essdiffraction-24.9.0/requirements/basetest.in +12 -0
  41. essdiffraction-24.9.0/requirements/basetest.txt +47 -0
  42. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/requirements/ci.txt +14 -14
  43. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/requirements/dev.txt +44 -36
  44. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/requirements/docs.in +6 -0
  45. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/requirements/docs.txt +82 -48
  46. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/requirements/make_base.py +10 -7
  47. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/requirements/mypy.txt +1 -3
  48. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/requirements/nightly.in +3 -1
  49. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/requirements/nightly.txt +52 -76
  50. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/requirements/static.txt +8 -11
  51. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/requirements/wheels.txt +4 -10
  52. essdiffraction-24.9.0/setup.cfg +4 -0
  53. essdiffraction-24.9.0/src/ess/diffraction/__init__.py +16 -0
  54. essdiffraction-24.9.0/src/ess/dream/__init__.py +28 -0
  55. essdiffraction-24.9.0/src/ess/dream/data.py +121 -0
  56. essdiffraction-24.9.0/src/ess/dream/instrument_view.py +155 -0
  57. essdiffraction-24.9.0/src/ess/dream/io/__init__.py +12 -0
  58. essdiffraction-24.9.0/src/ess/dream/io/cif.py +48 -0
  59. essdiffraction-24.9.0/src/ess/dream/io/geant4.py +203 -0
  60. essdiffraction-24.9.0/src/ess/dream/io/nexus.py +54 -0
  61. essdiffraction-24.9.0/src/ess/dream/workflow.py +52 -0
  62. essdiffraction-24.9.0/src/ess/powder/__init__.py +48 -0
  63. essdiffraction-24.9.0/src/ess/powder/_util.py +22 -0
  64. essdiffraction-24.9.0/src/ess/powder/conversion.py +220 -0
  65. essdiffraction-24.9.0/src/ess/powder/correction.py +268 -0
  66. {essdiffraction-23.12.0/src/ess/diffraction → essdiffraction-24.9.0/src/ess/powder}/filtering.py +17 -43
  67. essdiffraction-24.9.0/src/ess/powder/grouping.py +34 -0
  68. {essdiffraction-23.12.0/src/ess/diffraction → essdiffraction-24.9.0/src/ess/powder}/logging.py +3 -2
  69. essdiffraction-24.9.0/src/ess/powder/masking.py +97 -0
  70. {essdiffraction-23.12.0/src/ess/diffraction → essdiffraction-24.9.0/src/ess/powder}/smoothing.py +2 -4
  71. essdiffraction-24.9.0/src/ess/powder/transform.py +89 -0
  72. essdiffraction-24.9.0/src/ess/powder/types.py +175 -0
  73. {essdiffraction-23.12.0/src/ess/diffraction/external → essdiffraction-24.9.0/src/ess/snspowder}/powgen/__init__.py +10 -6
  74. {essdiffraction-23.12.0/src/ess/diffraction/external → essdiffraction-24.9.0/src/ess/snspowder}/powgen/beamline.py +19 -20
  75. essdiffraction-23.12.0/src/ess/diffraction/external/__init__.py → essdiffraction-24.9.0/src/ess/snspowder/powgen/calibration.py +10 -10
  76. essdiffraction-24.9.0/src/ess/snspowder/powgen/data.py +152 -0
  77. {essdiffraction-23.12.0/src/ess/diffraction/external → essdiffraction-24.9.0/src/ess/snspowder}/powgen/instrument_view.py +3 -3
  78. essdiffraction-24.9.0/src/ess/snspowder/powgen/peaks.py +134 -0
  79. essdiffraction-24.9.0/src/ess/snspowder/powgen/workflow.py +30 -0
  80. {essdiffraction-23.12.0 → essdiffraction-24.9.0/src/essdiffraction.egg-info}/PKG-INFO +13 -7
  81. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/src/essdiffraction.egg-info/SOURCES.txt +51 -31
  82. essdiffraction-24.9.0/src/essdiffraction.egg-info/requires.txt +15 -0
  83. essdiffraction-24.9.0/tests/dream/geant4_reduction_test.py +203 -0
  84. essdiffraction-24.9.0/tests/dream/instrument_view_test.py +71 -0
  85. essdiffraction-24.9.0/tests/dream/io/cif_test.py +49 -0
  86. essdiffraction-24.9.0/tests/dream/io/geant4_test.py +198 -0
  87. essdiffraction-24.9.0/tests/dream/io/nexus_test.py +86 -0
  88. essdiffraction-24.9.0/tests/package_test.py +20 -0
  89. essdiffraction-23.12.0/tests/diffraction/powder/conversions_test.py → essdiffraction-24.9.0/tests/powder/conversion_test.py +35 -1
  90. essdiffraction-24.9.0/tests/powder/correction_test.py +318 -0
  91. {essdiffraction-23.12.0/tests/diffraction → essdiffraction-24.9.0/tests/powder}/filtering_test.py +4 -10
  92. essdiffraction-24.9.0/tests/powder/transform_test.py +87 -0
  93. {essdiffraction-23.12.0/tests/diffraction → essdiffraction-24.9.0/tests/snspowder/powgen}/load_test.py +7 -7
  94. essdiffraction-24.9.0/tests/snspowder/powgen/powgen_reduction_test.py +175 -0
  95. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/tox.ini +10 -6
  96. essdiffraction-23.12.0/.github/workflows/python-version-ci +0 -1
  97. essdiffraction-23.12.0/docs/_templates/doc_version.html +0 -2
  98. essdiffraction-23.12.0/docs/api-reference/index.md +0 -44
  99. essdiffraction-23.12.0/docs/examples/POWGEN_data_reduction.ipynb +0 -423
  100. essdiffraction-23.12.0/docs/examples/index.md +0 -9
  101. essdiffraction-23.12.0/pyproject.toml +0 -87
  102. essdiffraction-23.12.0/requirements/base.in +0 -15
  103. essdiffraction-23.12.0/requirements/basetest.in +0 -4
  104. essdiffraction-23.12.0/requirements/basetest.txt +0 -19
  105. essdiffraction-23.12.0/setup.cfg +0 -8
  106. essdiffraction-23.12.0/src/ess/diffraction/__init__.py +0 -56
  107. essdiffraction-23.12.0/src/ess/diffraction/correction.py +0 -125
  108. essdiffraction-23.12.0/src/ess/diffraction/external/powgen/data.py +0 -159
  109. essdiffraction-23.12.0/src/ess/diffraction/external/powgen/types.py +0 -19
  110. essdiffraction-23.12.0/src/ess/diffraction/grouping.py +0 -81
  111. essdiffraction-23.12.0/src/ess/diffraction/powder/__init__.py +0 -14
  112. essdiffraction-23.12.0/src/ess/diffraction/powder/conversion.py +0 -157
  113. essdiffraction-23.12.0/src/ess/diffraction/powder/correction.py +0 -46
  114. essdiffraction-23.12.0/src/ess/diffraction/types.py +0 -117
  115. essdiffraction-23.12.0/src/ess/diffraction/uncertainty.py +0 -18
  116. essdiffraction-23.12.0/src/ess/dream/__init__.py +0 -23
  117. essdiffraction-23.12.0/src/ess/dream/data.py +0 -34
  118. essdiffraction-23.12.0/src/ess/dream/io.py +0 -133
  119. essdiffraction-23.12.0/src/essdiffraction.egg-info/requires.txt +0 -8
  120. essdiffraction-23.12.0/tests/diffraction/__init__.py +0 -2
  121. essdiffraction-23.12.0/tests/diffraction/external/powgen/powgen_reduction_test.py +0 -85
  122. essdiffraction-23.12.0/tests/diffraction/powder/__init__.py +0 -2
  123. essdiffraction-23.12.0/tests/diffraction/powder/corrections_test.py +0 -111
  124. essdiffraction-23.12.0/tests/dream/io_test.py +0 -77
  125. essdiffraction-23.12.0/tests/package_test.py +0 -7
  126. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/.github/dependabot.yml +0 -0
  127. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/CODE_OF_CONDUCT.md +0 -0
  128. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/CONTRIBUTING.md +0 -0
  129. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/MANIFEST.in +0 -0
  130. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/README.md +0 -0
  131. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/docs/_static/anaconda-icon.js +0 -0
  132. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/docs/_static/favicon.svg +0 -0
  133. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/docs/_static/logo-dark.svg +0 -0
  134. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/docs/_static/logo.svg +0 -0
  135. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/docs/_templates/class-template.rst +0 -0
  136. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/docs/_templates/module-template.rst +0 -0
  137. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/docs/developer/dependency-management.md +0 -0
  138. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/requirements/ci.in +0 -0
  139. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/requirements/dev.in +0 -0
  140. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/requirements/mypy.in +0 -0
  141. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/requirements/static.in +0 -0
  142. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/requirements/test.in +0 -0
  143. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/requirements/test.txt +0 -0
  144. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/requirements/wheels.in +0 -0
  145. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/resources/logo.svg +0 -0
  146. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/src/ess/diffraction/py.typed +0 -0
  147. /essdiffraction-23.12.0/tests/diffraction/external/__init__.py → /essdiffraction-24.9.0/src/ess/dream/py.typed +0 -0
  148. /essdiffraction-23.12.0/tests/diffraction/external/powgen/__init__.py → /essdiffraction-24.9.0/src/ess/powder/py.typed +0 -0
  149. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/src/essdiffraction.egg-info/dependency_links.txt +0 -0
  150. {essdiffraction-23.12.0 → essdiffraction-24.9.0}/src/essdiffraction.egg-info/top_level.txt +0 -0
@@ -0,0 +1,3 @@
1
+ # Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2
+ _commit: 0951a4b
3
+ _src_path: https://github.com/scipp/ess_template
@@ -1,13 +1,13 @@
1
1
  # Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2
- _commit: 8cfdb1b
2
+ _commit: 75b9a8f
3
3
  _src_path: gh:scipp/copier_template
4
4
  description: Diffraction data reduction for the European Spallation Source
5
- max_python: '3.11'
6
- min_python: '3.9'
5
+ max_python: '3.12'
6
+ min_python: '3.10'
7
7
  namespace_package: ess
8
- nightly_deps: scipp,scippnexus,sciline,plopp,scippneutron
8
+ nightly_deps: scipp,scippnexus,sciline,plopp,scippneutron,essreduce
9
9
  orgname: scipp
10
10
  prettyname: ESSdiffraction
11
11
  projectname: essdiffraction
12
- related_projects: Scipp,ScippNexus,ScippNeutron,Sciline,Plopp
13
- year: 2023
12
+ related_projects: Scipp,ScippNexus,ScippNeutron,Sciline,Plopp,ESSreduce
13
+ year: 2024
@@ -0,0 +1,8 @@
1
+ ---
2
+ name: Blank
3
+ about: General issue that does not fit another category
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
@@ -0,0 +1,89 @@
1
+ name: High-level requirement
2
+ description: Describe a high-level requirement
3
+ title: "[Requirement] "
4
+ labels: ["requirement"]
5
+ projects: []
6
+ body:
7
+ - type: markdown
8
+ attributes:
9
+ value: |
10
+ Thanks for taking the time to provide as many details as possible for this requirement!
11
+ - type: input
12
+ id: summary
13
+ attributes:
14
+ label: Executive summary
15
+ description: Provide a short summary of the requirement
16
+ placeholder: "Example: We need to correct for X when processing Y."
17
+ validations:
18
+ required: true
19
+ - type: textarea
20
+ id: context
21
+ attributes:
22
+ label: Context and background knowledge
23
+ description: |
24
+ - What is the context of this requirement?
25
+ - What background knowledge is required to understand it?
26
+ - Does this depend on previous tasks? Provide links!
27
+ - Is there follow-up work?
28
+ placeholder: "Example: See summary on Wikipedia, or the following paper."
29
+ validations:
30
+ required: true
31
+ - type: textarea
32
+ id: inputs
33
+ attributes:
34
+ label: Inputs
35
+ description: |
36
+ Describe in detail all the input data and data properties that are known.
37
+ This is not about test data (see below), but about general properties of data that will be used in practice.
38
+ placeholder: "Example: A single 1-D spectrum with a known wavelength range."
39
+ validations:
40
+ required: true
41
+ - type: textarea
42
+ id: methodology
43
+ attributes:
44
+ label: Methodology
45
+ description: |
46
+ Describe, e.g., the computation to be performed.
47
+ When linking to references, please refer to the specific section, page, or equation.
48
+ placeholder: "Remember you can write equations such as $n\\lambda = 2d\\sin(\\theta)$ using LaTeX syntax, as well as other Markdown formatting."
49
+ validations:
50
+ required: true
51
+ - type: textarea
52
+ id: outputs
53
+ attributes:
54
+ label: Outputs
55
+ description: |
56
+ Describe in detail all the output data and data properties.
57
+ This is not about test data (see below), but about general properties of data that will be used in practice.
58
+ placeholder: "Example: The position of the peak in the spectrum."
59
+ validations:
60
+ required: true
61
+ - type: dropdown
62
+ id: interfaces
63
+ attributes:
64
+ label: Which interfaces are required?
65
+ multiple: true
66
+ options:
67
+ - Integrated into reduction workflow
68
+ - Python module / function
69
+ - Python script
70
+ - Jupyter notebook
71
+ - Other (please describe in comments)
72
+ default: 0
73
+ validations:
74
+ required: true
75
+ - type: textarea
76
+ id: testcases
77
+ attributes:
78
+ label: Test cases
79
+ description: How can we test this requirement? Links to tests data and reference data, or other suggestions.
80
+ validations:
81
+ required: true
82
+ - type: textarea
83
+ id: comments
84
+ attributes:
85
+ label: Comments
86
+ description: Do you have other comments that do not fall in the above categories?
87
+ placeholder: "Example: Depends on issues #1234, blocked by #666."
88
+ validations:
89
+ required: false
@@ -1,6 +1,3 @@
1
- # SPDX-License-Identifier: BSD-3-Clause
2
- # Copyright (c) 2023 Scipp contributors (https://github.com/scipp)
3
-
4
1
  name: CI
5
2
 
6
3
  on:
@@ -24,15 +21,16 @@ jobs:
24
21
  run: |
25
22
  echo "min_python=$(cat .github/workflows/python-version-ci)" >> $GITHUB_OUTPUT
26
23
  echo "min_tox_env=py$(cat .github/workflows/python-version-ci | sed 's/\.//g')" >> $GITHUB_OUTPUT
27
- - uses: actions/setup-python@v4
24
+ - uses: actions/setup-python@v5
28
25
  with:
29
26
  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
27
+ - uses: pre-commit/action@v3.0.1
28
+ with:
29
+ extra_args: --all-files
30
+ - uses: pre-commit-ci/lite-action@v1.0.3
31
+ if: always()
34
32
  with:
35
- commit_message: Apply automatic formatting
33
+ msg: Apply automatic formatting
36
34
 
37
35
  tests:
38
36
  name: Tests
@@ -48,6 +46,7 @@ jobs:
48
46
  os-variant: ${{ matrix.os }}
49
47
  python-version: ${{ matrix.python.version }}
50
48
  tox-env: ${{ matrix.python.tox-env }}
49
+ secrets: inherit
51
50
 
52
51
  docs:
53
52
  needs: tests
@@ -56,3 +55,4 @@ jobs:
56
55
  publish: false
57
56
  linkcheck: ${{ contains(matrix.variant.os, 'ubuntu') && github.ref == 'refs/heads/main' }}
58
57
  branch: ${{ github.head_ref == '' && github.ref_name || github.head_ref }}
58
+ secrets: inherit
@@ -1,6 +1,3 @@
1
- # SPDX-License-Identifier: BSD-3-Clause
2
- # Copyright (c) 2023 Scipp contributors (https://github.com/scipp)
3
-
4
1
  name: Docs
5
2
 
6
3
  on:
@@ -45,13 +42,18 @@ jobs:
45
42
  docs:
46
43
  name: Build documentation
47
44
  runs-on: 'ubuntu-22.04'
45
+ env:
46
+ ESS_PROTECTED_FILESTORE_USERNAME: ${{ secrets.ESS_PROTECTED_FILESTORE_USERNAME }}
47
+ ESS_PROTECTED_FILESTORE_PASSWORD: ${{ secrets.ESS_PROTECTED_FILESTORE_PASSWORD }}
48
+
48
49
  steps:
49
50
  - run: sudo apt install --yes graphviz pandoc
50
- - uses: actions/checkout@v3
51
+ - uses: actions/checkout@v4
51
52
  with:
52
53
  ref: ${{ inputs.branch == '' && github.ref_name || inputs.branch }}
54
+ repository: ${{ github.event.pull_request.head.repo.full_name }}
53
55
  fetch-depth: 0 # history required so cmake can determine version
54
- - uses: actions/setup-python@v4
56
+ - uses: actions/setup-python@v5
55
57
  with:
56
58
  python-version-file: '.github/workflows/python-version-ci'
57
59
  - run: python -m pip install --upgrade pip
@@ -62,12 +64,12 @@ jobs:
62
64
  if: ${{ inputs.version == '' }}
63
65
  - run: tox -e linkcheck
64
66
  if: ${{ inputs.linkcheck }}
65
- - uses: actions/upload-artifact@v3
67
+ - uses: actions/upload-artifact@v4
66
68
  with:
67
69
  name: docs_html
68
70
  path: html/
69
71
 
70
- - uses: JamesIves/github-pages-deploy-action@v4.4.3
72
+ - uses: JamesIves/github-pages-deploy-action@v4.6.4
71
73
  if: ${{ inputs.publish }}
72
74
  with:
73
75
  branch: gh-pages
@@ -1,6 +1,3 @@
1
- # SPDX-License-Identifier: BSD-3-Clause
2
- # Copyright (c) 2023 Scipp contributors (https://github.com/scipp)
3
-
4
1
  name: Nightly test at main branch
5
2
 
6
3
  on:
@@ -34,3 +31,4 @@ jobs:
34
31
  os-variant: ${{ matrix.os }}
35
32
  python-version: ${{ matrix.python.version }}
36
33
  tox-env: ${{ matrix.python.tox-env }}
34
+ secrets: inherit
@@ -1,6 +1,3 @@
1
- # SPDX-License-Identifier: BSD-3-Clause
2
- # Copyright (c) 2023 Scipp contributors (https://github.com/scipp)
3
-
4
1
  name: Nightly tests at latest release
5
2
 
6
3
  on:
@@ -41,3 +38,4 @@ jobs:
41
38
  python-version: ${{ matrix.python.version }}
42
39
  tox-env: ${{ matrix.python.tox-env }}
43
40
  checkout_ref: ${{ needs.setup.outputs.release_tag }}
41
+ secrets: inherit
@@ -1,6 +1,3 @@
1
- # SPDX-License-Identifier: BSD-3-Clause
2
- # Copyright (c) 2023 Scipp contributors (https://github.com/scipp)
3
-
4
1
  name: Release
5
2
 
6
3
  on:
@@ -18,7 +15,7 @@ jobs:
18
15
  runs-on: 'ubuntu-22.04'
19
16
 
20
17
  steps:
21
- - uses: actions/checkout@v3
18
+ - uses: actions/checkout@v4
22
19
  with:
23
20
  submodules: true
24
21
  fetch-depth: 0 # history required so setuptools_scm can determine version
@@ -31,7 +28,7 @@ jobs:
31
28
  boa
32
29
  - run: conda mambabuild --channel conda-forge --channel scipp --no-anaconda-upload --override-channels --output-folder conda/package conda
33
30
 
34
- - uses: actions/upload-artifact@v3
31
+ - uses: actions/upload-artifact@v4
35
32
  with:
36
33
  name: conda-package-noarch
37
34
  path: conda/package/noarch/*.tar.bz2
@@ -41,11 +38,11 @@ jobs:
41
38
  runs-on: 'ubuntu-22.04'
42
39
 
43
40
  steps:
44
- - uses: actions/checkout@v3
41
+ - uses: actions/checkout@v4
45
42
  with:
46
43
  fetch-depth: 0 # history required so setuptools_scm can determine version
47
44
 
48
- - uses: actions/setup-python@v4
45
+ - uses: actions/setup-python@v5
49
46
  with:
50
47
  python-version-file: '.github/workflows/python-version-ci'
51
48
 
@@ -56,7 +53,7 @@ jobs:
56
53
  run: python -m build
57
54
 
58
55
  - name: Upload wheels
59
- uses: actions/upload-artifact@v3
56
+ uses: actions/upload-artifact@v4
60
57
  with:
61
58
  name: dist
62
59
  path: dist
@@ -70,8 +67,8 @@ jobs:
70
67
  id-token: write
71
68
  if: github.event_name == 'release' && github.event.action == 'published'
72
69
  steps:
73
- - uses: actions/download-artifact@v3
74
- - uses: pypa/gh-action-pypi-publish@v1.8.10
70
+ - uses: actions/download-artifact@v4
71
+ - uses: pypa/gh-action-pypi-publish@v1.8.14
75
72
 
76
73
  upload_conda:
77
74
  name: Deploy Conda
@@ -80,7 +77,7 @@ jobs:
80
77
  if: github.event_name == 'release' && github.event.action == 'published'
81
78
 
82
79
  steps:
83
- - uses: actions/download-artifact@v3
80
+ - uses: actions/download-artifact@v4
84
81
  - uses: mamba-org/setup-micromamba@v1
85
82
  with:
86
83
  environment-name: upload-env
@@ -104,7 +101,7 @@ jobs:
104
101
  permissions:
105
102
  contents: write # This is needed so that the action can upload the asset
106
103
  steps:
107
- - uses: actions/download-artifact@v3
104
+ - uses: actions/download-artifact@v4
108
105
  - name: Zip documentation
109
106
  run: |
110
107
  mv docs_html documentation-${{ github.ref_name }}
@@ -1,6 +1,3 @@
1
- # SPDX-License-Identifier: BSD-3-Clause
2
- # Copyright (c) 2023 Scipp contributors (https://github.com/scipp)
3
-
4
1
  name: Test
5
2
 
6
3
  on:
@@ -44,20 +41,38 @@ on:
44
41
  type: string
45
42
 
46
43
  jobs:
44
+ package-test:
45
+ runs-on: ${{ inputs.os-variant }}
46
+
47
+ steps:
48
+ - uses: actions/checkout@v4
49
+ with:
50
+ ref: ${{ inputs.checkout_ref }}
51
+ - uses: actions/setup-python@v5
52
+ with:
53
+ python-version: ${{ inputs.python-version }}
54
+ - run: python -m pip install --upgrade pip
55
+ - run: python -m pip install .
56
+ - run: python tests/package_test.py
57
+ name: Run package tests
58
+
47
59
  test:
48
60
  runs-on: ${{ inputs.os-variant }}
61
+ env:
62
+ ESS_PROTECTED_FILESTORE_USERNAME: ${{ secrets.ESS_PROTECTED_FILESTORE_USERNAME }}
63
+ ESS_PROTECTED_FILESTORE_PASSWORD: ${{ secrets.ESS_PROTECTED_FILESTORE_PASSWORD }}
49
64
 
50
65
  steps:
51
- - uses: actions/checkout@v3
66
+ - uses: actions/checkout@v4
52
67
  with:
53
68
  ref: ${{ inputs.checkout_ref }}
54
- - uses: actions/setup-python@v3
69
+ - uses: actions/setup-python@v5
55
70
  with:
56
71
  python-version: ${{ inputs.python-version }}
57
72
  - run: python -m pip install --upgrade pip
58
73
  - run: python -m pip install -r ${{ inputs.pip-recipe }}
59
74
  - run: tox -e ${{ inputs.tox-env }}
60
- - uses: actions/upload-artifact@v3
75
+ - uses: actions/upload-artifact@v4
61
76
  if: ${{ inputs.coverage-report }}
62
77
  with:
63
78
  name: CoverageReport
@@ -1,6 +1,3 @@
1
- # SPDX-License-Identifier: BSD-3-Clause
2
- # Copyright (c) 2023 Scipp contributors (https://github.com/scipp)
3
-
4
1
  name: Unpinned tests at latest release
5
2
 
6
3
  on:
@@ -41,3 +38,4 @@ jobs:
41
38
  python-version: ${{ matrix.python.version }}
42
39
  tox-env: ${{ matrix.python.tox-env }}
43
40
  checkout_ref: ${{ needs.setup.outputs.release_tag }}
41
+ secrets: inherit
@@ -4,11 +4,13 @@ dist
4
4
  html
5
5
  .tox
6
6
  *.egg-info
7
+ uv.lock # we lock dependencies with pip-compile, not uv
7
8
 
8
9
  *.sw?
9
10
 
10
11
  # Environments
11
12
  venv
13
+ .venv
12
14
 
13
15
  # Caches
14
16
  .clangd/
@@ -20,6 +22,7 @@ __pycache__/
20
22
  .pytest_cache
21
23
  .mypy_cache
22
24
  docs/generated/
25
+ .ruff_cache
23
26
 
24
27
  # Editor settings
25
28
  .idea/
@@ -37,3 +40,5 @@ docs/generated/
37
40
  *.raw
38
41
  *.cif
39
42
  *.rcif
43
+ *.ort
44
+ *.zip
@@ -1,6 +1,6 @@
1
1
  repos:
2
2
  - repo: https://github.com/pre-commit/pre-commit-hooks
3
- rev: v4.5.0
3
+ rev: v4.6.0
4
4
  hooks:
5
5
  - id: check-added-large-files
6
6
  - id: check-json
@@ -13,36 +13,23 @@ repos:
13
13
  - id: trailing-whitespace
14
14
  args: [ --markdown-linebreak-ext=md ]
15
15
  exclude: '\.svg'
16
- - repo: https://github.com/pycqa/isort
17
- rev: 5.12.0
18
- hooks:
19
- - id: isort
20
- name: isort (python)
21
- - repo: https://github.com/psf/black-pre-commit-mirror
22
- rev: 23.11.0
23
- hooks:
24
- - id: black
25
16
  - repo: https://github.com/kynan/nbstripout
26
- rev: 0.6.0
17
+ rev: 0.7.1
27
18
  hooks:
28
19
  - id: nbstripout
29
20
  types: [ "jupyter" ]
30
21
  args: [ "--drop-empty-cells",
31
22
  "--extra-keys 'metadata.language_info.version cell.metadata.jp-MarkdownHeadingCollapsed cell.metadata.pycharm'" ]
32
- - repo: https://github.com/pycqa/flake8
33
- rev: 6.1.0
34
- hooks:
35
- - id: flake8
36
- types: ["python"]
37
- additional_dependencies: ["flake8-bugbear==23.9.16"]
38
- - repo: https://github.com/pycqa/bandit
39
- rev: 1.7.5
40
- hooks:
41
- - id: bandit
42
- additional_dependencies: ["bandit[toml]"]
43
- args: ["-c", "pyproject.toml"]
23
+ - repo: https://github.com/astral-sh/ruff-pre-commit
24
+ rev: v0.6.2
25
+ hooks:
26
+ - id: ruff
27
+ args: [ --fix ]
28
+ types_or: [ python, pyi, jupyter ]
29
+ - id: ruff-format
30
+ types_or: [ python, pyi ]
44
31
  - repo: https://github.com/codespell-project/codespell
45
- rev: v2.2.6
32
+ rev: v2.3.0
46
33
  hooks:
47
34
  - id: codespell
48
35
  additional_dependencies:
@@ -0,0 +1 @@
1
+ 3.10
@@ -1,6 +1,6 @@
1
1
  BSD 3-Clause License
2
2
 
3
- Copyright (c) 2023, Scipp contributors (https://github.com/scipp)
3
+ Copyright (c) 2024, Scipp contributors (https://github.com/scipp)
4
4
  All rights reserved.
5
5
 
6
6
  Redistribution and use in source and binary forms, with or without
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: essdiffraction
3
- Version: 23.12.0
3
+ Version: 24.9.0
4
4
  Summary: Diffraction data reduction for the European Spallation Source
5
5
  Author: Scipp contributors
6
6
  License: BSD 3-Clause License
7
7
 
8
- Copyright (c) 2023, Scipp contributors (https://github.com/scipp)
8
+ Copyright (c) 2024, Scipp contributors (https://github.com/scipp)
9
9
  All rights reserved.
10
10
 
11
11
  Redistribution and use in source and binary forms, with or without
@@ -42,22 +42,28 @@ Classifier: Natural Language :: English
42
42
  Classifier: Operating System :: OS Independent
43
43
  Classifier: Programming Language :: Python :: 3
44
44
  Classifier: Programming Language :: Python :: 3 :: Only
45
- Classifier: Programming Language :: Python :: 3.9
46
45
  Classifier: Programming Language :: Python :: 3.10
47
46
  Classifier: Programming Language :: Python :: 3.11
47
+ Classifier: Programming Language :: Python :: 3.12
48
48
  Classifier: Topic :: Scientific/Engineering
49
49
  Classifier: Typing :: Typed
50
- Requires-Python: >=3.9
50
+ Requires-Python: >=3.10
51
51
  Description-Content-Type: text/markdown
52
52
  License-File: LICENSE
53
53
  Requires-Dist: dask
54
+ Requires-Dist: essreduce>=24.08.2
54
55
  Requires-Dist: graphviz
56
+ Requires-Dist: numpy
55
57
  Requires-Dist: plopp
56
58
  Requires-Dist: pythreejs
57
- Requires-Dist: sciline>=23.9.1
58
- Requires-Dist: scipp>=23.8.0
59
- Requires-Dist: scippneutron>=23.9.0
59
+ Requires-Dist: sciline>=24.06.0
60
+ Requires-Dist: scipp>=24.09.1
61
+ Requires-Dist: scippneutron>=24.9.0
60
62
  Requires-Dist: scippnexus>=23.12.0
63
+ Provides-Extra: test
64
+ Requires-Dist: pandas; extra == "test"
65
+ Requires-Dist: pooch; extra == "test"
66
+ Requires-Dist: pytest; extra == "test"
61
67
 
62
68
  [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE_OF_CONDUCT.md)
63
69
  [![PyPI badge](http://img.shields.io/pypi/v/essdiffraction.svg)](https://pypi.python.org/pypi/essdiffraction)
@@ -6,27 +6,36 @@ package:
6
6
  source:
7
7
  path: ..
8
8
 
9
+
10
+ {% set pyproject = load_file_data('pyproject.toml') %}
11
+ {% set dependencies = pyproject.get('project', {}).get('dependencies', {}) %}
12
+ {% set test_dependencies = pyproject.get('project', {}).get('optional-dependencies', {}).get('test', {}) %}
13
+
14
+
9
15
  requirements:
10
16
  build:
11
17
  - setuptools
12
18
  - setuptools_scm
13
19
  run:
14
- - dask
15
- - python>=3.8
16
- - python-graphviz
17
- - plopp
18
- - pythreejs
19
- - sciline>=23.9.1
20
- - scipp>=23.8.0
21
- - scippneutron>=23.11.0
22
- - scippnexus>=23.12.0
23
- - python>=3.9
20
+ - python>=3.10
21
+
22
+ {# Conda does not allow spaces between package name and version, so remove them #}
23
+ {% for package in dependencies %}
24
+ - {% if package == "graphviz" %}python-graphviz{% else %}{{ package|replace(" ", "") }}{% endif %}
25
+ {% endfor %}
26
+
24
27
 
25
28
  test:
26
29
  imports:
27
30
  - ess.diffraction
28
31
  requires:
29
- - pytest
32
+
33
+ {# Conda does not allow spaces between package name and version, so remove them #}
34
+ {% for package in test_dependencies %}
35
+ - {% if package == "graphviz" %}python-graphviz{% else %}{{ package|replace(" ", "") }}{% endif %}
36
+ {% endfor %}
37
+
38
+
30
39
  source_files:
31
40
  - pyproject.toml
32
41
  - tests/
@@ -0,0 +1,2 @@
1
+ <!-- This will display the version of the docs -->
2
+ Current ESSdiffraction version: {{ version }} (<a href="https://github.com/scipp/essdiffraction/releases">older versions</a>).
@@ -0,0 +1,4 @@
1
+ Bibliography
2
+ ============
3
+
4
+ .. bibliography::
@@ -12,7 +12,7 @@ ESSdiffraction is available as open source under the [BSD-3 license](https://ope
12
12
 
13
13
  Please cite the following:
14
14
 
15
- [![DOI](https://zenodo.org/badge/FIXME.svg)](https://zenodo.org/doi/10.5281/zenodo.FIXME)
15
+ [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10369509.svg)](https://zenodo.org/doi/10.5281/zenodo.10369509)
16
16
 
17
17
  To cite a specific version of ESSdiffraction, select the desired version on Zenodo to get the corresponding DOI.
18
18
 
@@ -24,3 +24,11 @@ Simply download the archive, unzip and view locally in a web browser.
24
24
  ## Source code and development
25
25
 
26
26
  ESSdiffraction is hosted and developed [on GitHub](https://github.com/scipp/essdiffraction).
27
+
28
+ ```{toctree}
29
+ ---
30
+ hidden:
31
+ ---
32
+
33
+ bibliography
34
+ ```
@@ -0,0 +1,69 @@
1
+ # API Reference
2
+
3
+ ## ESSpowder
4
+
5
+ ### Module Attributes
6
+ ```{eval-rst}
7
+ .. currentmodule:: ess.powder
8
+
9
+ .. autosummary::
10
+ :toctree: ../generated/attributes
11
+
12
+ providers
13
+ with_pixel_mask_filenames
14
+ ```
15
+
16
+ ### Submodules
17
+
18
+ ```{eval-rst}
19
+ .. autosummary::
20
+ :toctree: ../generated/modules
21
+ :template: module-template.rst
22
+ :recursive:
23
+
24
+ conversion
25
+ correction
26
+ filtering
27
+ grouping
28
+ smoothing
29
+ types
30
+ ```
31
+
32
+ ## ESSdream
33
+
34
+ ### Top-level functions
35
+
36
+ ```{eval-rst}
37
+ .. currentmodule:: ess.dream
38
+
39
+ .. autosummary::
40
+ :toctree: ../generated/functions
41
+
42
+ instrument_view
43
+ DreamGeant4Workflow
44
+ ```
45
+
46
+ ### Submodules
47
+
48
+ ```{eval-rst}
49
+ .. autosummary::
50
+ :toctree: ../generated/modules
51
+ :template: module-template.rst
52
+ :recursive:
53
+
54
+ data
55
+ io
56
+ ```
57
+
58
+ ## SNS powder
59
+
60
+ ```{eval-rst}
61
+ .. currentmodule:: ess.snspowder
62
+
63
+ .. autosummary::
64
+ :toctree: ../generated/modules
65
+ :template: module-template.rst
66
+ :recursive:
67
+
68
+ powgen
69
+ ```
@@ -0,0 +1,8 @@
1
+ @book{Arblaster:2018,
2
+ author = {John W. Arblaster},
3
+ year = {2018},
4
+ title = {Selected Values of the Crystallographic Properties of the Elements},
5
+ publisher = {ASM International},
6
+ ISBN = {978-1-62708-154-2},
7
+ url = {https://www.asminternational.org/selected-values-of-the-crystallographic-properties-of-the-elements/results/-/journal_content/56/39867022/PUBLICATION/}
8
+ }