essdiffraction 23.12.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.
- essdiffraction-23.12.0/.copier-answers.yml +13 -0
- essdiffraction-23.12.0/.github/dependabot.yml +13 -0
- essdiffraction-23.12.0/.github/workflows/ci.yml +58 -0
- essdiffraction-23.12.0/.github/workflows/docs.yml +75 -0
- essdiffraction-23.12.0/.github/workflows/nightly_at_main.yml +36 -0
- essdiffraction-23.12.0/.github/workflows/nightly_at_release.yml +43 -0
- essdiffraction-23.12.0/.github/workflows/python-version-ci +1 -0
- essdiffraction-23.12.0/.github/workflows/release.yml +116 -0
- essdiffraction-23.12.0/.github/workflows/test.yml +64 -0
- essdiffraction-23.12.0/.github/workflows/unpinned.yml +43 -0
- essdiffraction-23.12.0/.gitignore +39 -0
- essdiffraction-23.12.0/.pre-commit-config.yaml +59 -0
- essdiffraction-23.12.0/CODE_OF_CONDUCT.md +134 -0
- essdiffraction-23.12.0/CONTRIBUTING.md +20 -0
- essdiffraction-23.12.0/LICENSE +29 -0
- essdiffraction-23.12.0/MANIFEST.in +1 -0
- essdiffraction-23.12.0/PKG-INFO +77 -0
- essdiffraction-23.12.0/README.md +16 -0
- essdiffraction-23.12.0/conda/meta.yaml +48 -0
- essdiffraction-23.12.0/docs/_static/anaconda-icon.js +13 -0
- essdiffraction-23.12.0/docs/_static/favicon.svg +88 -0
- essdiffraction-23.12.0/docs/_static/logo-dark.svg +101 -0
- essdiffraction-23.12.0/docs/_static/logo.svg +101 -0
- essdiffraction-23.12.0/docs/_templates/class-template.rst +31 -0
- essdiffraction-23.12.0/docs/_templates/doc_version.html +2 -0
- essdiffraction-23.12.0/docs/_templates/module-template.rst +66 -0
- essdiffraction-23.12.0/docs/about/index.md +26 -0
- essdiffraction-23.12.0/docs/api-reference/index.md +44 -0
- essdiffraction-23.12.0/docs/conf.py +240 -0
- essdiffraction-23.12.0/docs/developer/coding-conventions.md +117 -0
- essdiffraction-23.12.0/docs/developer/dependency-management.md +13 -0
- essdiffraction-23.12.0/docs/developer/getting-started.md +91 -0
- essdiffraction-23.12.0/docs/developer/index.md +16 -0
- essdiffraction-23.12.0/docs/examples/POWGEN_data_reduction.ipynb +423 -0
- essdiffraction-23.12.0/docs/examples/index.md +9 -0
- essdiffraction-23.12.0/docs/examples/preprocess_files.ipynb +257 -0
- essdiffraction-23.12.0/docs/index.md +17 -0
- essdiffraction-23.12.0/pyproject.toml +87 -0
- essdiffraction-23.12.0/requirements/base.in +15 -0
- essdiffraction-23.12.0/requirements/base.txt +169 -0
- essdiffraction-23.12.0/requirements/basetest.in +4 -0
- essdiffraction-23.12.0/requirements/basetest.txt +19 -0
- essdiffraction-23.12.0/requirements/ci.in +4 -0
- essdiffraction-23.12.0/requirements/ci.txt +56 -0
- essdiffraction-23.12.0/requirements/dev.in +11 -0
- essdiffraction-23.12.0/requirements/dev.txt +123 -0
- essdiffraction-23.12.0/requirements/docs.in +11 -0
- essdiffraction-23.12.0/requirements/docs.txt +164 -0
- essdiffraction-23.12.0/requirements/make_base.py +70 -0
- essdiffraction-23.12.0/requirements/mypy.in +2 -0
- essdiffraction-23.12.0/requirements/mypy.txt +14 -0
- essdiffraction-23.12.0/requirements/nightly.in +11 -0
- essdiffraction-23.12.0/requirements/nightly.txt +163 -0
- essdiffraction-23.12.0/requirements/static.in +1 -0
- essdiffraction-23.12.0/requirements/static.txt +28 -0
- essdiffraction-23.12.0/requirements/test.in +4 -0
- essdiffraction-23.12.0/requirements/test.txt +9 -0
- essdiffraction-23.12.0/requirements/wheels.in +1 -0
- essdiffraction-23.12.0/requirements/wheels.txt +21 -0
- essdiffraction-23.12.0/resources/logo.svg +100 -0
- essdiffraction-23.12.0/setup.cfg +8 -0
- essdiffraction-23.12.0/src/ess/diffraction/__init__.py +56 -0
- essdiffraction-23.12.0/src/ess/diffraction/correction.py +125 -0
- essdiffraction-23.12.0/src/ess/diffraction/external/__init__.py +141 -0
- essdiffraction-23.12.0/src/ess/diffraction/external/powgen/__init__.py +23 -0
- essdiffraction-23.12.0/src/ess/diffraction/external/powgen/beamline.py +65 -0
- essdiffraction-23.12.0/src/ess/diffraction/external/powgen/data.py +159 -0
- essdiffraction-23.12.0/src/ess/diffraction/external/powgen/instrument_view.py +42 -0
- essdiffraction-23.12.0/src/ess/diffraction/external/powgen/types.py +19 -0
- essdiffraction-23.12.0/src/ess/diffraction/filtering.py +126 -0
- essdiffraction-23.12.0/src/ess/diffraction/grouping.py +81 -0
- essdiffraction-23.12.0/src/ess/diffraction/logging.py +15 -0
- essdiffraction-23.12.0/src/ess/diffraction/powder/__init__.py +14 -0
- essdiffraction-23.12.0/src/ess/diffraction/powder/conversion.py +157 -0
- essdiffraction-23.12.0/src/ess/diffraction/powder/correction.py +46 -0
- essdiffraction-23.12.0/src/ess/diffraction/py.typed +0 -0
- essdiffraction-23.12.0/src/ess/diffraction/smoothing.py +87 -0
- essdiffraction-23.12.0/src/ess/diffraction/types.py +117 -0
- essdiffraction-23.12.0/src/ess/diffraction/uncertainty.py +18 -0
- essdiffraction-23.12.0/src/ess/dream/__init__.py +23 -0
- essdiffraction-23.12.0/src/ess/dream/data.py +34 -0
- essdiffraction-23.12.0/src/ess/dream/io.py +133 -0
- essdiffraction-23.12.0/src/essdiffraction.egg-info/PKG-INFO +77 -0
- essdiffraction-23.12.0/src/essdiffraction.egg-info/SOURCES.txt +98 -0
- essdiffraction-23.12.0/src/essdiffraction.egg-info/dependency_links.txt +1 -0
- essdiffraction-23.12.0/src/essdiffraction.egg-info/requires.txt +8 -0
- essdiffraction-23.12.0/src/essdiffraction.egg-info/top_level.txt +1 -0
- essdiffraction-23.12.0/tests/diffraction/__init__.py +2 -0
- essdiffraction-23.12.0/tests/diffraction/external/__init__.py +0 -0
- essdiffraction-23.12.0/tests/diffraction/external/powgen/__init__.py +0 -0
- essdiffraction-23.12.0/tests/diffraction/external/powgen/powgen_reduction_test.py +85 -0
- essdiffraction-23.12.0/tests/diffraction/filtering_test.py +163 -0
- essdiffraction-23.12.0/tests/diffraction/load_test.py +42 -0
- essdiffraction-23.12.0/tests/diffraction/powder/__init__.py +2 -0
- essdiffraction-23.12.0/tests/diffraction/powder/conversions_test.py +131 -0
- essdiffraction-23.12.0/tests/diffraction/powder/corrections_test.py +111 -0
- essdiffraction-23.12.0/tests/dream/io_test.py +77 -0
- essdiffraction-23.12.0/tests/package_test.py +7 -0
- essdiffraction-23.12.0/tox.ini +67 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
|
|
2
|
+
_commit: 8cfdb1b
|
|
3
|
+
_src_path: gh:scipp/copier_template
|
|
4
|
+
description: Diffraction data reduction for the European Spallation Source
|
|
5
|
+
max_python: '3.11'
|
|
6
|
+
min_python: '3.9'
|
|
7
|
+
namespace_package: ess
|
|
8
|
+
nightly_deps: scipp,scippnexus,sciline,plopp,scippneutron
|
|
9
|
+
orgname: scipp
|
|
10
|
+
prettyname: ESSdiffraction
|
|
11
|
+
projectname: essdiffraction
|
|
12
|
+
related_projects: Scipp,ScippNexus,ScippNeutron,Sciline,Plopp
|
|
13
|
+
year: 2023
|
|
@@ -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
|
+
# 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
|
+
- 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
|
|
34
|
+
with:
|
|
35
|
+
commit_message: Apply automatic formatting
|
|
36
|
+
|
|
37
|
+
tests:
|
|
38
|
+
name: Tests
|
|
39
|
+
needs: formatting
|
|
40
|
+
strategy:
|
|
41
|
+
matrix:
|
|
42
|
+
os: ['ubuntu-22.04']
|
|
43
|
+
python:
|
|
44
|
+
- version: '${{needs.formatting.outputs.min_python}}'
|
|
45
|
+
tox-env: '${{needs.formatting.outputs.min_tox_env}}'
|
|
46
|
+
uses: ./.github/workflows/test.yml
|
|
47
|
+
with:
|
|
48
|
+
os-variant: ${{ matrix.os }}
|
|
49
|
+
python-version: ${{ matrix.python.version }}
|
|
50
|
+
tox-env: ${{ matrix.python.tox-env }}
|
|
51
|
+
|
|
52
|
+
docs:
|
|
53
|
+
needs: tests
|
|
54
|
+
uses: ./.github/workflows/docs.yml
|
|
55
|
+
with:
|
|
56
|
+
publish: false
|
|
57
|
+
linkcheck: ${{ contains(matrix.variant.os, 'ubuntu') && github.ref == 'refs/heads/main' }}
|
|
58
|
+
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 @@
|
|
|
1
|
+
3.9
|
|
@@ -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,39 @@
|
|
|
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
|
|
@@ -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
|