essreduce 24.3.11__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 (71) hide show
  1. essreduce-24.3.11/.copier-answers.ess.yml +3 -0
  2. essreduce-24.3.11/.copier-answers.yml +13 -0
  3. essreduce-24.3.11/.github/ISSUE_TEMPLATE/blank.md +8 -0
  4. essreduce-24.3.11/.github/ISSUE_TEMPLATE/high-level-requirement.yml +89 -0
  5. essreduce-24.3.11/.github/dependabot.yml +13 -0
  6. essreduce-24.3.11/.github/workflows/ci.yml +59 -0
  7. essreduce-24.3.11/.github/workflows/docs.yml +75 -0
  8. essreduce-24.3.11/.github/workflows/nightly_at_main.yml +36 -0
  9. essreduce-24.3.11/.github/workflows/nightly_at_release.yml +43 -0
  10. essreduce-24.3.11/.github/workflows/python-version-ci +1 -0
  11. essreduce-24.3.11/.github/workflows/release.yml +116 -0
  12. essreduce-24.3.11/.github/workflows/test.yml +64 -0
  13. essreduce-24.3.11/.github/workflows/unpinned.yml +43 -0
  14. essreduce-24.3.11/.gitignore +40 -0
  15. essreduce-24.3.11/.pre-commit-config.yaml +59 -0
  16. essreduce-24.3.11/CODE_OF_CONDUCT.md +134 -0
  17. essreduce-24.3.11/CONTRIBUTING.md +20 -0
  18. essreduce-24.3.11/LICENSE +29 -0
  19. essreduce-24.3.11/MANIFEST.in +1 -0
  20. essreduce-24.3.11/PKG-INFO +71 -0
  21. essreduce-24.3.11/README.md +16 -0
  22. essreduce-24.3.11/conda/meta.yaml +41 -0
  23. essreduce-24.3.11/docs/_static/anaconda-icon.js +13 -0
  24. essreduce-24.3.11/docs/_templates/class-template.rst +31 -0
  25. essreduce-24.3.11/docs/_templates/doc_version.html +2 -0
  26. essreduce-24.3.11/docs/_templates/module-template.rst +66 -0
  27. essreduce-24.3.11/docs/about/index.md +26 -0
  28. essreduce-24.3.11/docs/api-reference/index.md +31 -0
  29. essreduce-24.3.11/docs/conf.py +254 -0
  30. essreduce-24.3.11/docs/developer/coding-conventions.md +117 -0
  31. essreduce-24.3.11/docs/developer/dependency-management.md +13 -0
  32. essreduce-24.3.11/docs/developer/getting-started.md +91 -0
  33. essreduce-24.3.11/docs/developer/index.md +16 -0
  34. essreduce-24.3.11/docs/index.md +17 -0
  35. essreduce-24.3.11/docs/user-guide/index.md +10 -0
  36. essreduce-24.3.11/docs/user-guide/reduction-workflow-guidelines.md +254 -0
  37. essreduce-24.3.11/pyproject.toml +81 -0
  38. essreduce-24.3.11/requirements/base.in +6 -0
  39. essreduce-24.3.11/requirements/base.txt +26 -0
  40. essreduce-24.3.11/requirements/basetest.in +4 -0
  41. essreduce-24.3.11/requirements/basetest.txt +19 -0
  42. essreduce-24.3.11/requirements/ci.in +4 -0
  43. essreduce-24.3.11/requirements/ci.txt +56 -0
  44. essreduce-24.3.11/requirements/dev.in +11 -0
  45. essreduce-24.3.11/requirements/dev.txt +137 -0
  46. essreduce-24.3.11/requirements/docs.in +10 -0
  47. essreduce-24.3.11/requirements/docs.txt +228 -0
  48. essreduce-24.3.11/requirements/make_base.py +70 -0
  49. essreduce-24.3.11/requirements/mypy.in +2 -0
  50. essreduce-24.3.11/requirements/mypy.txt +14 -0
  51. essreduce-24.3.11/requirements/nightly.in +5 -0
  52. essreduce-24.3.11/requirements/nightly.txt +27 -0
  53. essreduce-24.3.11/requirements/static.in +1 -0
  54. essreduce-24.3.11/requirements/static.txt +28 -0
  55. essreduce-24.3.11/requirements/test.in +4 -0
  56. essreduce-24.3.11/requirements/test.txt +9 -0
  57. essreduce-24.3.11/requirements/wheels.in +1 -0
  58. essreduce-24.3.11/requirements/wheels.txt +17 -0
  59. essreduce-24.3.11/setup.cfg +8 -0
  60. essreduce-24.3.11/src/ess/reduce/__init__.py +16 -0
  61. essreduce-24.3.11/src/ess/reduce/logging.py +17 -0
  62. essreduce-24.3.11/src/ess/reduce/nexus.py +391 -0
  63. essreduce-24.3.11/src/ess/reduce/py.typed +0 -0
  64. essreduce-24.3.11/src/essreduce.egg-info/PKG-INFO +71 -0
  65. essreduce-24.3.11/src/essreduce.egg-info/SOURCES.txt +70 -0
  66. essreduce-24.3.11/src/essreduce.egg-info/dependency_links.txt +1 -0
  67. essreduce-24.3.11/src/essreduce.egg-info/requires.txt +2 -0
  68. essreduce-24.3.11/src/essreduce.egg-info/top_level.txt +1 -0
  69. essreduce-24.3.11/tests/nexus_test.py +346 -0
  70. essreduce-24.3.11/tests/package_test.py +7 -0
  71. essreduce-24.3.11/tox.ini +67 -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.git
@@ -0,0 +1,13 @@
1
+ # Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2
+ _commit: 6770edb
3
+ _src_path: gh:scipp/copier_template
4
+ description: Common data reduction tools for the ESS facility
5
+ max_python: '3.12'
6
+ min_python: '3.10'
7
+ namespace_package: ess
8
+ nightly_deps: ''
9
+ orgname: scipp
10
+ prettyname: ESSreduce
11
+ projectname: essreduce
12
+ related_projects: ESSdiffraction,ESSimaging,ESSnmx,ESSpolarization,ESSreflectometry,ESSsans,ESSspectroscopy
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
@@ -0,0 +1,13 @@
1
+ version: 2
2
+ updates:
3
+ # Note: We are not listing package-ecosystem: "github-actions". This causes
4
+ # noise in all template instances. Instead dependabot.yml in scipp/copier_template
5
+ # triggers updates of github-actions in the *template*. We then use `copier update`
6
+ # in template instances.
7
+ - package-ecosystem: "pip"
8
+ directory: "/requirements"
9
+ schedule:
10
+ interval: "daily"
11
+ allow:
12
+ - dependency-name: "scipp"
13
+ dependency-type: "direct"
@@ -0,0 +1,59 @@
1
+ # SPDX-License-Identifier: BSD-3-Clause
2
+ # Copyright (c) 2023 Scipp contributors (https://github.com/scipp)
3
+
4
+ name: CI
5
+
6
+ on:
7
+ push:
8
+ branches:
9
+ - main
10
+ - release
11
+ pull_request:
12
+
13
+ jobs:
14
+ formatting:
15
+ name: Formatting and static analysis
16
+ runs-on: 'ubuntu-22.04'
17
+ outputs:
18
+ min_python: ${{ steps.vars.outputs.min_python }}
19
+ min_tox_env: ${{ steps.vars.outputs.min_tox_env }}
20
+ steps:
21
+ - uses: actions/checkout@v4
22
+ - name: Get Python version for other CI jobs
23
+ id: vars
24
+ run: |
25
+ echo "min_python=$(cat .github/workflows/python-version-ci)" >> $GITHUB_OUTPUT
26
+ echo "min_tox_env=py$(cat .github/workflows/python-version-ci | sed 's/\.//g')" >> $GITHUB_OUTPUT
27
+ - uses: actions/setup-python@v4
28
+ with:
29
+ python-version-file: '.github/workflows/python-version-ci'
30
+ - uses: pre-commit/action@v3.0.1
31
+ with:
32
+ extra_args: --all-files
33
+ - uses: pre-commit-ci/lite-action@v1.0.1
34
+ if: always()
35
+ with:
36
+ msg: Apply automatic formatting
37
+
38
+ tests:
39
+ name: Tests
40
+ needs: formatting
41
+ strategy:
42
+ matrix:
43
+ os: ['ubuntu-22.04']
44
+ python:
45
+ - version: '${{needs.formatting.outputs.min_python}}'
46
+ tox-env: '${{needs.formatting.outputs.min_tox_env}}'
47
+ uses: ./.github/workflows/test.yml
48
+ with:
49
+ os-variant: ${{ matrix.os }}
50
+ python-version: ${{ matrix.python.version }}
51
+ tox-env: ${{ matrix.python.tox-env }}
52
+
53
+ docs:
54
+ needs: tests
55
+ uses: ./.github/workflows/docs.yml
56
+ with:
57
+ publish: false
58
+ linkcheck: ${{ contains(matrix.variant.os, 'ubuntu') && github.ref == 'refs/heads/main' }}
59
+ branch: ${{ github.head_ref == '' && github.ref_name || github.head_ref }}
@@ -0,0 +1,75 @@
1
+ # SPDX-License-Identifier: BSD-3-Clause
2
+ # Copyright (c) 2023 Scipp contributors (https://github.com/scipp)
3
+
4
+ name: Docs
5
+
6
+ on:
7
+ workflow_dispatch:
8
+ inputs:
9
+ publish:
10
+ default: false
11
+ type: boolean
12
+ version:
13
+ default: ''
14
+ required: false
15
+ type: string
16
+ branch:
17
+ description: 'Branch/tag with documentation source. If not set, the current branch will be used.'
18
+ default: ''
19
+ required: false
20
+ type: string
21
+ workflow_call:
22
+ inputs:
23
+ publish:
24
+ default: false
25
+ type: boolean
26
+ version:
27
+ default: ''
28
+ required: false
29
+ type: string
30
+ branch:
31
+ description: 'Branch/tag with documentation source. If not set, the current branch will be used.'
32
+ default: ''
33
+ required: false
34
+ type: string
35
+ linkcheck:
36
+ description: 'Run the link checker. If not set the link checker will not be run.'
37
+ default: false
38
+ required: false
39
+ type: boolean
40
+
41
+ env:
42
+ VERSION: ${{ inputs.version }}
43
+
44
+ jobs:
45
+ docs:
46
+ name: Build documentation
47
+ runs-on: 'ubuntu-22.04'
48
+ steps:
49
+ - run: sudo apt install --yes graphviz pandoc
50
+ - uses: actions/checkout@v3
51
+ with:
52
+ ref: ${{ inputs.branch == '' && github.ref_name || inputs.branch }}
53
+ fetch-depth: 0 # history required so cmake can determine version
54
+ - uses: actions/setup-python@v4
55
+ with:
56
+ python-version-file: '.github/workflows/python-version-ci'
57
+ - run: python -m pip install --upgrade pip
58
+ - run: python -m pip install -r requirements/ci.txt
59
+ - run: tox -e releasedocs -- ${VERSION}
60
+ if: ${{ inputs.version != '' }}
61
+ - run: tox -e docs
62
+ if: ${{ inputs.version == '' }}
63
+ - run: tox -e linkcheck
64
+ if: ${{ inputs.linkcheck }}
65
+ - uses: actions/upload-artifact@v3
66
+ with:
67
+ name: docs_html
68
+ path: html/
69
+
70
+ - uses: JamesIves/github-pages-deploy-action@v4.4.3
71
+ if: ${{ inputs.publish }}
72
+ with:
73
+ branch: gh-pages
74
+ folder: html
75
+ single-commit: true
@@ -0,0 +1,36 @@
1
+ # SPDX-License-Identifier: BSD-3-Clause
2
+ # Copyright (c) 2023 Scipp contributors (https://github.com/scipp)
3
+
4
+ name: Nightly test at main branch
5
+
6
+ on:
7
+ workflow_dispatch:
8
+ schedule:
9
+ - cron: '30 1 * * 1-5'
10
+
11
+ jobs:
12
+ setup:
13
+ name: Setup variables
14
+ runs-on: 'ubuntu-22.04'
15
+ outputs:
16
+ min_python: ${{ steps.vars.outputs.min_python }}
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+ - name: Get Python version for other CI jobs
20
+ id: vars
21
+ run: echo "min_python=$(cat .github/workflows/python-version-ci)" >> $GITHUB_OUTPUT
22
+
23
+ tests:
24
+ name: Tests
25
+ needs: setup
26
+ strategy:
27
+ matrix:
28
+ os: ['ubuntu-22.04']
29
+ python:
30
+ - version: '${{needs.setup.outputs.min_python}}'
31
+ tox-env: 'nightly'
32
+ uses: ./.github/workflows/test.yml
33
+ with:
34
+ os-variant: ${{ matrix.os }}
35
+ python-version: ${{ matrix.python.version }}
36
+ tox-env: ${{ matrix.python.tox-env }}
@@ -0,0 +1,43 @@
1
+ # SPDX-License-Identifier: BSD-3-Clause
2
+ # Copyright (c) 2023 Scipp contributors (https://github.com/scipp)
3
+
4
+ name: Nightly tests at latest release
5
+
6
+ on:
7
+ workflow_dispatch:
8
+ schedule:
9
+ - cron: '0 1 * * 1-5'
10
+
11
+ jobs:
12
+ setup:
13
+ name: Setup variables
14
+ runs-on: 'ubuntu-22.04'
15
+ outputs:
16
+ min_python: ${{ steps.vars.outputs.min_python }}
17
+ release_tag: ${{ steps.release.outputs.release_tag }}
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+ with:
21
+ fetch-depth: 0 # history required so we can determine latest release tag
22
+ - name: Get last release tag from git
23
+ id: release
24
+ run: echo "release_tag=$(git describe --tags --abbrev=0 --match '[0-9]*.[0-9]*.[0-9]*')" >> $GITHUB_OUTPUT
25
+ - name: Get Python version for other CI jobs
26
+ id: vars
27
+ run: echo "min_python=$(cat .github/workflows/python-version-ci)" >> $GITHUB_OUTPUT
28
+
29
+ tests:
30
+ name: Tests
31
+ needs: setup
32
+ strategy:
33
+ matrix:
34
+ os: ['ubuntu-22.04']
35
+ python:
36
+ - version: '${{needs.setup.outputs.min_python}}'
37
+ tox-env: 'nightly'
38
+ uses: ./.github/workflows/test.yml
39
+ with:
40
+ os-variant: ${{ matrix.os }}
41
+ python-version: ${{ matrix.python.version }}
42
+ tox-env: ${{ matrix.python.tox-env }}
43
+ checkout_ref: ${{ needs.setup.outputs.release_tag }}
@@ -0,0 +1,116 @@
1
+ # SPDX-License-Identifier: BSD-3-Clause
2
+ # Copyright (c) 2023 Scipp contributors (https://github.com/scipp)
3
+
4
+ name: Release
5
+
6
+ on:
7
+ release:
8
+ types: [published]
9
+ workflow_dispatch:
10
+
11
+ defaults:
12
+ run:
13
+ shell: bash -l {0} # required for conda env
14
+
15
+ jobs:
16
+ build_conda:
17
+ name: Conda build
18
+ runs-on: 'ubuntu-22.04'
19
+
20
+ steps:
21
+ - uses: actions/checkout@v3
22
+ with:
23
+ submodules: true
24
+ fetch-depth: 0 # history required so setuptools_scm can determine version
25
+
26
+ - uses: mamba-org/setup-micromamba@v1
27
+ with:
28
+ environment-name: build-env
29
+ create-args: >-
30
+ conda-build
31
+ boa
32
+ - run: conda mambabuild --channel conda-forge --channel scipp --no-anaconda-upload --override-channels --output-folder conda/package conda
33
+
34
+ - uses: actions/upload-artifact@v3
35
+ with:
36
+ name: conda-package-noarch
37
+ path: conda/package/noarch/*.tar.bz2
38
+
39
+ build_wheels:
40
+ name: Wheels
41
+ runs-on: 'ubuntu-22.04'
42
+
43
+ steps:
44
+ - uses: actions/checkout@v3
45
+ with:
46
+ fetch-depth: 0 # history required so setuptools_scm can determine version
47
+
48
+ - uses: actions/setup-python@v4
49
+ with:
50
+ python-version-file: '.github/workflows/python-version-ci'
51
+
52
+ - run: python -m pip install --upgrade pip
53
+ - run: python -m pip install -r requirements/wheels.txt
54
+
55
+ - name: Build wheels
56
+ run: python -m build
57
+
58
+ - name: Upload wheels
59
+ uses: actions/upload-artifact@v3
60
+ with:
61
+ name: dist
62
+ path: dist
63
+
64
+ upload_pypi:
65
+ name: Deploy PyPI
66
+ needs: [build_wheels, build_conda]
67
+ runs-on: 'ubuntu-22.04'
68
+ environment: release
69
+ permissions:
70
+ id-token: write
71
+ if: github.event_name == 'release' && github.event.action == 'published'
72
+ steps:
73
+ - uses: actions/download-artifact@v3
74
+ - uses: pypa/gh-action-pypi-publish@v1.8.10
75
+
76
+ upload_conda:
77
+ name: Deploy Conda
78
+ needs: [build_wheels, build_conda]
79
+ runs-on: 'ubuntu-22.04'
80
+ if: github.event_name == 'release' && github.event.action == 'published'
81
+
82
+ steps:
83
+ - uses: actions/download-artifact@v3
84
+ - uses: mamba-org/setup-micromamba@v1
85
+ with:
86
+ environment-name: upload-env
87
+ # frozen python due to breaking removal of 'imp' in 3.12
88
+ create-args: >-
89
+ anaconda-client
90
+ python=3.11
91
+ - run: anaconda --token ${{ secrets.ANACONDATOKEN }} upload --user scipp --label main $(ls conda-package-noarch/*.tar.bz2)
92
+
93
+ docs:
94
+ needs: [upload_conda, upload_pypi]
95
+ uses: ./.github/workflows/docs.yml
96
+ with:
97
+ publish: ${{ github.event_name == 'release' && github.event.action == 'published' }}
98
+ secrets: inherit
99
+
100
+ assets:
101
+ name: Upload docs
102
+ needs: docs
103
+ runs-on: 'ubuntu-22.04'
104
+ permissions:
105
+ contents: write # This is needed so that the action can upload the asset
106
+ steps:
107
+ - uses: actions/download-artifact@v3
108
+ - name: Zip documentation
109
+ run: |
110
+ mv docs_html documentation-${{ github.ref_name }}
111
+ zip -r documentation-${{ github.ref_name }}.zip documentation-${{ github.ref_name }}
112
+ - name: Upload release assets
113
+ uses: svenstaro/upload-release-action@v2
114
+ with:
115
+ file: ./documentation-${{ github.ref_name }}.zip
116
+ overwrite: false
@@ -0,0 +1,64 @@
1
+ # SPDX-License-Identifier: BSD-3-Clause
2
+ # Copyright (c) 2023 Scipp contributors (https://github.com/scipp)
3
+
4
+ name: Test
5
+
6
+ on:
7
+ workflow_dispatch:
8
+ inputs:
9
+ os-variant:
10
+ default: 'ubuntu-22.04'
11
+ type: string
12
+ python-version:
13
+ type: string
14
+ tox-env:
15
+ default: 'test'
16
+ type: string
17
+ pip-recipe:
18
+ default: 'requirements/ci.txt'
19
+ type: string
20
+ coverage-report:
21
+ default: false
22
+ type: boolean
23
+ checkout_ref:
24
+ default: ''
25
+ type: string
26
+ workflow_call:
27
+ inputs:
28
+ os-variant:
29
+ default: 'ubuntu-22.04'
30
+ type: string
31
+ python-version:
32
+ type: string
33
+ tox-env:
34
+ default: 'test'
35
+ type: string
36
+ pip-recipe:
37
+ default: 'requirements/ci.txt'
38
+ type: string
39
+ coverage-report:
40
+ default: false
41
+ type: boolean
42
+ checkout_ref:
43
+ default: ''
44
+ type: string
45
+
46
+ jobs:
47
+ test:
48
+ runs-on: ${{ inputs.os-variant }}
49
+
50
+ steps:
51
+ - uses: actions/checkout@v3
52
+ with:
53
+ ref: ${{ inputs.checkout_ref }}
54
+ - uses: actions/setup-python@v3
55
+ with:
56
+ python-version: ${{ inputs.python-version }}
57
+ - run: python -m pip install --upgrade pip
58
+ - run: python -m pip install -r ${{ inputs.pip-recipe }}
59
+ - run: tox -e ${{ inputs.tox-env }}
60
+ - uses: actions/upload-artifact@v3
61
+ if: ${{ inputs.coverage-report }}
62
+ with:
63
+ name: CoverageReport
64
+ path: coverage_html/
@@ -0,0 +1,43 @@
1
+ # SPDX-License-Identifier: BSD-3-Clause
2
+ # Copyright (c) 2023 Scipp contributors (https://github.com/scipp)
3
+
4
+ name: Unpinned tests at latest release
5
+
6
+ on:
7
+ workflow_dispatch:
8
+ schedule:
9
+ - cron: '0 2 * * 1'
10
+
11
+ jobs:
12
+ setup:
13
+ name: Setup variables
14
+ runs-on: 'ubuntu-22.04'
15
+ outputs:
16
+ min_python: ${{ steps.vars.outputs.min_python }}
17
+ release_tag: ${{ steps.release.outputs.release_tag }}
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+ with:
21
+ fetch-depth: 0 # history required so we can determine latest release tag
22
+ - name: Get last release tag from git
23
+ id: release
24
+ run: echo "release_tag=$(git describe --tags --abbrev=0 --match '[0-9]*.[0-9]*.[0-9]*')" >> $GITHUB_OUTPUT
25
+ - name: Get Python version for other CI jobs
26
+ id: vars
27
+ run: echo "min_python=$(cat .github/workflows/python-version-ci)" >> $GITHUB_OUTPUT
28
+
29
+ tests:
30
+ name: Tests
31
+ needs: setup
32
+ strategy:
33
+ matrix:
34
+ os: ['ubuntu-22.04']
35
+ python:
36
+ - version: '${{needs.setup.outputs.min_python}}'
37
+ tox-env: 'unpinned'
38
+ uses: ./.github/workflows/test.yml
39
+ with:
40
+ os-variant: ${{ matrix.os }}
41
+ python-version: ${{ matrix.python.version }}
42
+ tox-env: ${{ matrix.python.tox-env }}
43
+ checkout_ref: ${{ needs.setup.outputs.release_tag }}
@@ -0,0 +1,40 @@
1
+ # Build artifacts
2
+ build
3
+ dist
4
+ html
5
+ .tox
6
+ *.egg-info
7
+
8
+ *.sw?
9
+
10
+ # Environments
11
+ venv
12
+
13
+ # Caches
14
+ .clangd/
15
+ *.ipynb_checkpoints
16
+ __pycache__/
17
+ .vs/
18
+ .virtual_documents
19
+ .hypothesis
20
+ .pytest_cache
21
+ .mypy_cache
22
+ docs/generated/
23
+
24
+ # Editor settings
25
+ .idea/
26
+ .vscode/
27
+
28
+ # Data files
29
+ *.data
30
+ *.dat
31
+ *.csv
32
+ *.xye
33
+ *.h5
34
+ *.hdf5
35
+ *.hdf
36
+ *.nxs
37
+ *.raw
38
+ *.cif
39
+ *.rcif
40
+ *.ort
@@ -0,0 +1,59 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v4.5.0
4
+ hooks:
5
+ - id: check-added-large-files
6
+ - id: check-json
7
+ exclude: asv.conf.json
8
+ - id: check-merge-conflict
9
+ - id: check-toml
10
+ - id: check-yaml
11
+ exclude: conda/meta.yaml
12
+ - id: detect-private-key
13
+ - id: trailing-whitespace
14
+ args: [ --markdown-linebreak-ext=md ]
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
+ - repo: https://github.com/kynan/nbstripout
26
+ rev: 0.6.0
27
+ hooks:
28
+ - id: nbstripout
29
+ types: [ "jupyter" ]
30
+ args: [ "--drop-empty-cells",
31
+ "--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"]
44
+ - repo: https://github.com/codespell-project/codespell
45
+ rev: v2.2.6
46
+ hooks:
47
+ - id: codespell
48
+ additional_dependencies:
49
+ - tomli
50
+ - repo: https://github.com/pre-commit/pygrep-hooks
51
+ rev: v1.10.0
52
+ hooks:
53
+ - id: python-no-eval
54
+ - id: python-no-log-warn
55
+ - id: python-use-type-annotations
56
+ - id: rst-backticks
57
+ - id: rst-directive-colons
58
+ - id: rst-inline-touching-normal
59
+ - id: text-unicode-replacement-char