essimaging 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 (81) hide show
  1. essimaging-24.9.0/.copier-answers.ess.yml +3 -0
  2. essimaging-24.9.0/.copier-answers.yml +13 -0
  3. essimaging-24.9.0/.github/ISSUE_TEMPLATE/high-level-requirement.yml +89 -0
  4. essimaging-24.9.0/.github/dependabot.yml +13 -0
  5. essimaging-24.9.0/.github/workflows/ci.yml +58 -0
  6. essimaging-24.9.0/.github/workflows/docs.yml +77 -0
  7. essimaging-24.9.0/.github/workflows/nightly_at_main.yml +34 -0
  8. essimaging-24.9.0/.github/workflows/nightly_at_release.yml +41 -0
  9. essimaging-24.9.0/.github/workflows/python-version-ci +1 -0
  10. essimaging-24.9.0/.github/workflows/release.yml +113 -0
  11. essimaging-24.9.0/.github/workflows/test.yml +79 -0
  12. essimaging-24.9.0/.github/workflows/unpinned.yml +41 -0
  13. essimaging-24.9.0/.gitignore +44 -0
  14. essimaging-24.9.0/.pre-commit-config.yaml +46 -0
  15. essimaging-24.9.0/.python-version +1 -0
  16. essimaging-24.9.0/CODE_OF_CONDUCT.md +134 -0
  17. essimaging-24.9.0/CONTRIBUTING.md +20 -0
  18. essimaging-24.9.0/LICENSE +29 -0
  19. essimaging-24.9.0/MANIFEST.in +1 -0
  20. essimaging-24.9.0/PKG-INFO +80 -0
  21. essimaging-24.9.0/README.md +16 -0
  22. essimaging-24.9.0/conda/meta.yaml +57 -0
  23. essimaging-24.9.0/docs/_static/anaconda-icon.js +13 -0
  24. essimaging-24.9.0/docs/_static/favicon.ico +0 -0
  25. essimaging-24.9.0/docs/_static/logo-dark.svg +684 -0
  26. essimaging-24.9.0/docs/_static/logo.svg +684 -0
  27. essimaging-24.9.0/docs/_templates/class-template.rst +31 -0
  28. essimaging-24.9.0/docs/_templates/doc_version.html +2 -0
  29. essimaging-24.9.0/docs/_templates/module-template.rst +66 -0
  30. essimaging-24.9.0/docs/about/index.md +26 -0
  31. essimaging-24.9.0/docs/api-reference/index.md +33 -0
  32. essimaging-24.9.0/docs/conf.py +268 -0
  33. essimaging-24.9.0/docs/developer/coding-conventions.md +117 -0
  34. essimaging-24.9.0/docs/developer/dependency-management.md +13 -0
  35. essimaging-24.9.0/docs/developer/getting-started.md +91 -0
  36. essimaging-24.9.0/docs/developer/index.md +16 -0
  37. essimaging-24.9.0/docs/index.md +29 -0
  38. essimaging-24.9.0/docs/user-guide/histogram_mode_detector.ipynb +298 -0
  39. essimaging-24.9.0/docs/user-guide/index.md +10 -0
  40. essimaging-24.9.0/docs/user-guide/installation.md +16 -0
  41. essimaging-24.9.0/pyproject.toml +126 -0
  42. essimaging-24.9.0/requirements/base.in +12 -0
  43. essimaging-24.9.0/requirements/base.txt +171 -0
  44. essimaging-24.9.0/requirements/basetest.in +11 -0
  45. essimaging-24.9.0/requirements/basetest.txt +35 -0
  46. essimaging-24.9.0/requirements/ci.in +4 -0
  47. essimaging-24.9.0/requirements/ci.txt +56 -0
  48. essimaging-24.9.0/requirements/dev.in +11 -0
  49. essimaging-24.9.0/requirements/dev.txt +131 -0
  50. essimaging-24.9.0/requirements/docs.in +12 -0
  51. essimaging-24.9.0/requirements/docs.txt +177 -0
  52. essimaging-24.9.0/requirements/make_base.py +73 -0
  53. essimaging-24.9.0/requirements/mypy.in +2 -0
  54. essimaging-24.9.0/requirements/mypy.txt +12 -0
  55. essimaging-24.9.0/requirements/nightly.in +11 -0
  56. essimaging-24.9.0/requirements/nightly.txt +87 -0
  57. essimaging-24.9.0/requirements/static.in +1 -0
  58. essimaging-24.9.0/requirements/static.txt +25 -0
  59. essimaging-24.9.0/requirements/test.in +4 -0
  60. essimaging-24.9.0/requirements/test.txt +9 -0
  61. essimaging-24.9.0/requirements/wheels.in +1 -0
  62. essimaging-24.9.0/requirements/wheels.txt +15 -0
  63. essimaging-24.9.0/resources/logo-text-dark.svg +677 -0
  64. essimaging-24.9.0/resources/logo-text.svg +677 -0
  65. essimaging-24.9.0/setup.cfg +4 -0
  66. essimaging-24.9.0/src/ess/imaging/__init__.py +12 -0
  67. essimaging-24.9.0/src/ess/imaging/data.py +44 -0
  68. essimaging-24.9.0/src/ess/imaging/io.py +360 -0
  69. essimaging-24.9.0/src/ess/imaging/normalize.py +262 -0
  70. essimaging-24.9.0/src/ess/imaging/py.typed +0 -0
  71. essimaging-24.9.0/src/ess/imaging/types.py +24 -0
  72. essimaging-24.9.0/src/ess/imaging/workflow.py +121 -0
  73. essimaging-24.9.0/src/essimaging.egg-info/PKG-INFO +80 -0
  74. essimaging-24.9.0/src/essimaging.egg-info/SOURCES.txt +79 -0
  75. essimaging-24.9.0/src/essimaging.egg-info/dependency_links.txt +1 -0
  76. essimaging-24.9.0/src/essimaging.egg-info/requires.txt +12 -0
  77. essimaging-24.9.0/src/essimaging.egg-info/top_level.txt +1 -0
  78. essimaging-24.9.0/tests/image_normalize_test.py +287 -0
  79. essimaging-24.9.0/tests/io_test.py +38 -0
  80. essimaging-24.9.0/tests/package_test.py +20 -0
  81. essimaging-24.9.0/tox.ini +67 -0
@@ -0,0 +1,3 @@
1
+ # Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2
+ _commit: 815268a
3
+ _src_path: https://github.com/scipp/ess_template
@@ -0,0 +1,13 @@
1
+ # Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2
+ _commit: 75b9a8f
3
+ _src_path: gh:scipp/copier_template
4
+ description: Imaging data reduction for the European Spallation Source
5
+ max_python: '3.12'
6
+ min_python: '3.10'
7
+ namespace_package: ess
8
+ nightly_deps: scipp,sciline,scippnexus,plopp,essreduce
9
+ orgname: scipp
10
+ prettyname: ESSimaging
11
+ projectname: essimaging
12
+ related_projects: Scipp,Sciline,ScippNexus,Plopp,Essreduce
13
+ year: 2024
@@ -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,58 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ - release
8
+ pull_request:
9
+
10
+ jobs:
11
+ formatting:
12
+ name: Formatting and static analysis
13
+ runs-on: 'ubuntu-22.04'
14
+ outputs:
15
+ min_python: ${{ steps.vars.outputs.min_python }}
16
+ min_tox_env: ${{ steps.vars.outputs.min_tox_env }}
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+ - name: Get Python version for other CI jobs
20
+ id: vars
21
+ run: |
22
+ echo "min_python=$(cat .github/workflows/python-version-ci)" >> $GITHUB_OUTPUT
23
+ echo "min_tox_env=py$(cat .github/workflows/python-version-ci | sed 's/\.//g')" >> $GITHUB_OUTPUT
24
+ - uses: actions/setup-python@v5
25
+ with:
26
+ python-version-file: '.github/workflows/python-version-ci'
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()
32
+ with:
33
+ msg: Apply automatic formatting
34
+
35
+ tests:
36
+ name: Tests
37
+ needs: formatting
38
+ strategy:
39
+ matrix:
40
+ os: ['ubuntu-22.04']
41
+ python:
42
+ - version: '${{needs.formatting.outputs.min_python}}'
43
+ tox-env: '${{needs.formatting.outputs.min_tox_env}}'
44
+ uses: ./.github/workflows/test.yml
45
+ with:
46
+ os-variant: ${{ matrix.os }}
47
+ python-version: ${{ matrix.python.version }}
48
+ tox-env: ${{ matrix.python.tox-env }}
49
+ secrets: inherit
50
+
51
+ docs:
52
+ needs: tests
53
+ uses: ./.github/workflows/docs.yml
54
+ with:
55
+ publish: false
56
+ linkcheck: ${{ contains(matrix.variant.os, 'ubuntu') && github.ref == 'refs/heads/main' }}
57
+ branch: ${{ github.head_ref == '' && github.ref_name || github.head_ref }}
58
+ secrets: inherit
@@ -0,0 +1,77 @@
1
+ name: Docs
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ publish:
7
+ default: false
8
+ type: boolean
9
+ version:
10
+ default: ''
11
+ required: false
12
+ type: string
13
+ branch:
14
+ description: 'Branch/tag with documentation source. If not set, the current branch will be used.'
15
+ default: ''
16
+ required: false
17
+ type: string
18
+ workflow_call:
19
+ inputs:
20
+ publish:
21
+ default: false
22
+ type: boolean
23
+ version:
24
+ default: ''
25
+ required: false
26
+ type: string
27
+ branch:
28
+ description: 'Branch/tag with documentation source. If not set, the current branch will be used.'
29
+ default: ''
30
+ required: false
31
+ type: string
32
+ linkcheck:
33
+ description: 'Run the link checker. If not set the link checker will not be run.'
34
+ default: false
35
+ required: false
36
+ type: boolean
37
+
38
+ env:
39
+ VERSION: ${{ inputs.version }}
40
+
41
+ jobs:
42
+ docs:
43
+ name: Build documentation
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
+
49
+ steps:
50
+ - run: sudo apt install --yes graphviz pandoc
51
+ - uses: actions/checkout@v4
52
+ with:
53
+ ref: ${{ inputs.branch == '' && github.ref_name || inputs.branch }}
54
+ repository: ${{ github.event.pull_request.head.repo.full_name }}
55
+ fetch-depth: 0 # history required so cmake can determine version
56
+ - uses: actions/setup-python@v5
57
+ with:
58
+ python-version-file: '.github/workflows/python-version-ci'
59
+ - run: python -m pip install --upgrade pip
60
+ - run: python -m pip install -r requirements/ci.txt
61
+ - run: tox -e releasedocs -- ${VERSION}
62
+ if: ${{ inputs.version != '' }}
63
+ - run: tox -e docs
64
+ if: ${{ inputs.version == '' }}
65
+ - run: tox -e linkcheck
66
+ if: ${{ inputs.linkcheck }}
67
+ - uses: actions/upload-artifact@v4
68
+ with:
69
+ name: docs_html
70
+ path: html/
71
+
72
+ - uses: JamesIves/github-pages-deploy-action@v4.6.4
73
+ if: ${{ inputs.publish }}
74
+ with:
75
+ branch: gh-pages
76
+ folder: html
77
+ single-commit: true
@@ -0,0 +1,34 @@
1
+ name: Nightly test at main branch
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ schedule:
6
+ - cron: '30 1 * * 1-5'
7
+
8
+ jobs:
9
+ setup:
10
+ name: Setup variables
11
+ runs-on: 'ubuntu-22.04'
12
+ outputs:
13
+ min_python: ${{ steps.vars.outputs.min_python }}
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ - name: Get Python version for other CI jobs
17
+ id: vars
18
+ run: echo "min_python=$(cat .github/workflows/python-version-ci)" >> $GITHUB_OUTPUT
19
+
20
+ tests:
21
+ name: Tests
22
+ needs: setup
23
+ strategy:
24
+ matrix:
25
+ os: ['ubuntu-22.04']
26
+ python:
27
+ - version: '${{needs.setup.outputs.min_python}}'
28
+ tox-env: 'nightly'
29
+ uses: ./.github/workflows/test.yml
30
+ with:
31
+ os-variant: ${{ matrix.os }}
32
+ python-version: ${{ matrix.python.version }}
33
+ tox-env: ${{ matrix.python.tox-env }}
34
+ secrets: inherit
@@ -0,0 +1,41 @@
1
+ name: Nightly tests at latest release
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ schedule:
6
+ - cron: '0 1 * * 1-5'
7
+
8
+ jobs:
9
+ setup:
10
+ name: Setup variables
11
+ runs-on: 'ubuntu-22.04'
12
+ outputs:
13
+ min_python: ${{ steps.vars.outputs.min_python }}
14
+ release_tag: ${{ steps.release.outputs.release_tag }}
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+ with:
18
+ fetch-depth: 0 # history required so we can determine latest release tag
19
+ - name: Get last release tag from git
20
+ id: release
21
+ run: echo "release_tag=$(git describe --tags --abbrev=0 --match '[0-9]*.[0-9]*.[0-9]*')" >> $GITHUB_OUTPUT
22
+ - name: Get Python version for other CI jobs
23
+ id: vars
24
+ run: echo "min_python=$(cat .github/workflows/python-version-ci)" >> $GITHUB_OUTPUT
25
+
26
+ tests:
27
+ name: Tests
28
+ needs: setup
29
+ strategy:
30
+ matrix:
31
+ os: ['ubuntu-22.04']
32
+ python:
33
+ - version: '${{needs.setup.outputs.min_python}}'
34
+ tox-env: 'nightly'
35
+ uses: ./.github/workflows/test.yml
36
+ with:
37
+ os-variant: ${{ matrix.os }}
38
+ python-version: ${{ matrix.python.version }}
39
+ tox-env: ${{ matrix.python.tox-env }}
40
+ checkout_ref: ${{ needs.setup.outputs.release_tag }}
41
+ secrets: inherit
@@ -0,0 +1,113 @@
1
+ name: Release
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+ workflow_dispatch:
7
+
8
+ defaults:
9
+ run:
10
+ shell: bash -l {0} # required for conda env
11
+
12
+ jobs:
13
+ build_conda:
14
+ name: Conda build
15
+ runs-on: 'ubuntu-22.04'
16
+
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+ with:
20
+ submodules: true
21
+ fetch-depth: 0 # history required so setuptools_scm can determine version
22
+
23
+ - uses: mamba-org/setup-micromamba@v1
24
+ with:
25
+ environment-name: build-env
26
+ create-args: >-
27
+ conda-build
28
+ boa
29
+ - run: conda mambabuild --channel conda-forge --channel scipp --no-anaconda-upload --override-channels --output-folder conda/package conda
30
+
31
+ - uses: actions/upload-artifact@v4
32
+ with:
33
+ name: conda-package-noarch
34
+ path: conda/package/noarch/*.tar.bz2
35
+
36
+ build_wheels:
37
+ name: Wheels
38
+ runs-on: 'ubuntu-22.04'
39
+
40
+ steps:
41
+ - uses: actions/checkout@v4
42
+ with:
43
+ fetch-depth: 0 # history required so setuptools_scm can determine version
44
+
45
+ - uses: actions/setup-python@v5
46
+ with:
47
+ python-version-file: '.github/workflows/python-version-ci'
48
+
49
+ - run: python -m pip install --upgrade pip
50
+ - run: python -m pip install -r requirements/wheels.txt
51
+
52
+ - name: Build wheels
53
+ run: python -m build
54
+
55
+ - name: Upload wheels
56
+ uses: actions/upload-artifact@v4
57
+ with:
58
+ name: dist
59
+ path: dist
60
+
61
+ upload_pypi:
62
+ name: Deploy PyPI
63
+ needs: [build_wheels, build_conda]
64
+ runs-on: 'ubuntu-22.04'
65
+ environment: release
66
+ permissions:
67
+ id-token: write
68
+ if: github.event_name == 'release' && github.event.action == 'published'
69
+ steps:
70
+ - uses: actions/download-artifact@v4
71
+ - uses: pypa/gh-action-pypi-publish@v1.8.14
72
+
73
+ upload_conda:
74
+ name: Deploy Conda
75
+ needs: [build_wheels, build_conda]
76
+ runs-on: 'ubuntu-22.04'
77
+ if: github.event_name == 'release' && github.event.action == 'published'
78
+
79
+ steps:
80
+ - uses: actions/download-artifact@v4
81
+ - uses: mamba-org/setup-micromamba@v1
82
+ with:
83
+ environment-name: upload-env
84
+ # frozen python due to breaking removal of 'imp' in 3.12
85
+ create-args: >-
86
+ anaconda-client
87
+ python=3.11
88
+ - run: anaconda --token ${{ secrets.ANACONDATOKEN }} upload --user scipp --label main $(ls conda-package-noarch/*.tar.bz2)
89
+
90
+ docs:
91
+ needs: [upload_conda, upload_pypi]
92
+ uses: ./.github/workflows/docs.yml
93
+ with:
94
+ publish: ${{ github.event_name == 'release' && github.event.action == 'published' }}
95
+ secrets: inherit
96
+
97
+ assets:
98
+ name: Upload docs
99
+ needs: docs
100
+ runs-on: 'ubuntu-22.04'
101
+ permissions:
102
+ contents: write # This is needed so that the action can upload the asset
103
+ steps:
104
+ - uses: actions/download-artifact@v4
105
+ - name: Zip documentation
106
+ run: |
107
+ mv docs_html documentation-${{ github.ref_name }}
108
+ zip -r documentation-${{ github.ref_name }}.zip documentation-${{ github.ref_name }}
109
+ - name: Upload release assets
110
+ uses: svenstaro/upload-release-action@v2
111
+ with:
112
+ file: ./documentation-${{ github.ref_name }}.zip
113
+ overwrite: false
@@ -0,0 +1,79 @@
1
+ name: Test
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ os-variant:
7
+ default: 'ubuntu-22.04'
8
+ type: string
9
+ python-version:
10
+ type: string
11
+ tox-env:
12
+ default: 'test'
13
+ type: string
14
+ pip-recipe:
15
+ default: 'requirements/ci.txt'
16
+ type: string
17
+ coverage-report:
18
+ default: false
19
+ type: boolean
20
+ checkout_ref:
21
+ default: ''
22
+ type: string
23
+ workflow_call:
24
+ inputs:
25
+ os-variant:
26
+ default: 'ubuntu-22.04'
27
+ type: string
28
+ python-version:
29
+ type: string
30
+ tox-env:
31
+ default: 'test'
32
+ type: string
33
+ pip-recipe:
34
+ default: 'requirements/ci.txt'
35
+ type: string
36
+ coverage-report:
37
+ default: false
38
+ type: boolean
39
+ checkout_ref:
40
+ default: ''
41
+ type: string
42
+
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
+
59
+ test:
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 }}
64
+
65
+ steps:
66
+ - uses: actions/checkout@v4
67
+ with:
68
+ ref: ${{ inputs.checkout_ref }}
69
+ - uses: actions/setup-python@v5
70
+ with:
71
+ python-version: ${{ inputs.python-version }}
72
+ - run: python -m pip install --upgrade pip
73
+ - run: python -m pip install -r ${{ inputs.pip-recipe }}
74
+ - run: tox -e ${{ inputs.tox-env }}
75
+ - uses: actions/upload-artifact@v4
76
+ if: ${{ inputs.coverage-report }}
77
+ with:
78
+ name: CoverageReport
79
+ path: coverage_html/
@@ -0,0 +1,41 @@
1
+ name: Unpinned tests at latest release
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ schedule:
6
+ - cron: '0 2 * * 1'
7
+
8
+ jobs:
9
+ setup:
10
+ name: Setup variables
11
+ runs-on: 'ubuntu-22.04'
12
+ outputs:
13
+ min_python: ${{ steps.vars.outputs.min_python }}
14
+ release_tag: ${{ steps.release.outputs.release_tag }}
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+ with:
18
+ fetch-depth: 0 # history required so we can determine latest release tag
19
+ - name: Get last release tag from git
20
+ id: release
21
+ run: echo "release_tag=$(git describe --tags --abbrev=0 --match '[0-9]*.[0-9]*.[0-9]*')" >> $GITHUB_OUTPUT
22
+ - name: Get Python version for other CI jobs
23
+ id: vars
24
+ run: echo "min_python=$(cat .github/workflows/python-version-ci)" >> $GITHUB_OUTPUT
25
+
26
+ tests:
27
+ name: Tests
28
+ needs: setup
29
+ strategy:
30
+ matrix:
31
+ os: ['ubuntu-22.04']
32
+ python:
33
+ - version: '${{needs.setup.outputs.min_python}}'
34
+ tox-env: 'unpinned'
35
+ uses: ./.github/workflows/test.yml
36
+ with:
37
+ os-variant: ${{ matrix.os }}
38
+ python-version: ${{ matrix.python.version }}
39
+ tox-env: ${{ matrix.python.tox-env }}
40
+ checkout_ref: ${{ needs.setup.outputs.release_tag }}
41
+ secrets: inherit
@@ -0,0 +1,44 @@
1
+ # Build artifacts
2
+ build
3
+ dist
4
+ html
5
+ .tox
6
+ *.egg-info
7
+ uv.lock # we lock dependencies with pip-compile, not uv
8
+
9
+ *.sw?
10
+
11
+ # Environments
12
+ venv
13
+ .venv
14
+
15
+ # Caches
16
+ .clangd/
17
+ *.ipynb_checkpoints
18
+ __pycache__/
19
+ .vs/
20
+ .virtual_documents
21
+ .hypothesis
22
+ .pytest_cache
23
+ .mypy_cache
24
+ docs/generated/
25
+ .ruff_cache
26
+
27
+ # Editor settings
28
+ .idea/
29
+ .vscode/
30
+
31
+ # Data files
32
+ *.data
33
+ *.dat
34
+ *.csv
35
+ *.xye
36
+ *.h5
37
+ *.hdf5
38
+ *.hdf
39
+ *.nxs
40
+ *.raw
41
+ *.cif
42
+ *.rcif
43
+ *.ort
44
+ *.zip
@@ -0,0 +1,46 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v4.6.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/kynan/nbstripout
17
+ rev: 0.7.1
18
+ hooks:
19
+ - id: nbstripout
20
+ types: [ "jupyter" ]
21
+ args: [ "--drop-empty-cells",
22
+ "--extra-keys 'metadata.language_info.version cell.metadata.jp-MarkdownHeadingCollapsed cell.metadata.pycharm'" ]
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 ]
31
+ - repo: https://github.com/codespell-project/codespell
32
+ rev: v2.3.0
33
+ hooks:
34
+ - id: codespell
35
+ additional_dependencies:
36
+ - tomli
37
+ - repo: https://github.com/pre-commit/pygrep-hooks
38
+ rev: v1.10.0
39
+ hooks:
40
+ - id: python-no-eval
41
+ - id: python-no-log-warn
42
+ - id: python-use-type-annotations
43
+ - id: rst-backticks
44
+ - id: rst-directive-colons
45
+ - id: rst-inline-touching-normal
46
+ - id: text-unicode-replacement-char
@@ -0,0 +1 @@
1
+ 3.10