Skip to content

Commit dfdac3e

Browse files
Merge pull request #11 from scipp/copier-update
Run copier update, adding nightly builds
2 parents 7058109 + 4a1867c commit dfdac3e

27 files changed

+603
-201
lines changed

.copier-answers.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2-
_commit: 0c002dc
2+
_commit: d9ab46a
33
_src_path: gh:scipp/copier_template
44
description: Reflectometry data reduction for the European Spallation Source
5-
github_linux_image: ubuntu-20.04
6-
max_python: '3.11'
7-
min_python: '3.10'
5+
max_python: '3.12'
6+
min_python: '3.8'
7+
namespace_package: ''
8+
nightly_deps: plopp,sciline,scippneutron,scippnexus,scipp
89
orgname: scipp
910
projectname: essreflectometry
11+
related_projects: Scipp,ScippNexus,ScippNeutron,Sciline,Plopp
1012
year: 2023

.github/dependabot.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
version: 2
22
updates:
3-
- package-ecosystem: "github-actions"
4-
directory: "/"
5-
schedule:
6-
interval: "weekly"
7-
ignore:
8-
# Optional: Official actions have moving tags like v1;
9-
# if you use those, you don't need updates.
10-
- dependency-name: "actions/*"
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.
117
- package-ecosystem: "pip"
128
directory: "/requirements"
139
schedule:

.github/workflows/ci.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,19 @@ jobs:
1414
formatting:
1515
name: Formatting and static analysis
1616
runs-on: 'ubuntu-20.04'
17+
outputs:
18+
min_python: ${{ steps.vars.outputs.min_python }}
19+
min_tox_env: ${{ steps.vars.outputs.min_tox_env }}
1720
steps:
18-
- uses: actions/checkout@v3
19-
- uses: actions/setup-python@v3
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
2028
with:
21-
python-version: '3.8'
29+
python-version-file: '.github/workflows/python-version-ci'
2230
- run: python -m pip install --upgrade pip
2331
- run: python -m pip install -r requirements/ci.txt
2432
- run: tox -e static
@@ -33,9 +41,8 @@ jobs:
3341
matrix:
3442
os: ['ubuntu-20.04']
3543
python:
36-
- version: '3.8'
37-
tox-env: 'py38'
38-
44+
- version: '${{needs.formatting.outputs.min_python}}'
45+
tox-env: '${{needs.formatting.outputs.min_tox_env}}'
3946
uses: ./.github/workflows/test.yml
4047
with:
4148
os-variant: ${{ matrix.os }}

.github/workflows/docs.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# SPDX-License-Identifier: BSD-3-Clause
22
# Copyright (c) 2023 Scipp contributors (https://github.com/scipp)
33

4-
54
name: Docs
65

76
on:
@@ -42,21 +41,17 @@ jobs:
4241
name: Build documentation
4342
runs-on: 'ubuntu-20.04'
4443
steps:
45-
4644
- run: sudo apt install --yes graphviz pandoc
4745
- uses: actions/checkout@v3
4846
with:
4947
ref: ${{ inputs.branch == '' && github.ref_name || inputs.branch }}
5048
fetch-depth: 0 # history required so cmake can determine version
51-
- uses: actions/setup-python@v3
49+
- uses: actions/setup-python@v4
5250
with:
53-
54-
python-version: '3.8'
51+
python-version-file: '.github/workflows/python-version-ci'
5552
- run: python -m pip install --upgrade pip
5653
- run: python -m pip install -r requirements/ci.txt
57-
- run: |
58-
tox --skip-pkg-install -e docs -- essreflectometry==${VERSION}
59-
54+
- run: tox -e releasedocs -- ${VERSION}
6055
if: ${{ inputs.version != '' }}
6156
- run: tox -e docs
6257
if: ${{ inputs.version == '' }}
@@ -72,4 +67,3 @@ jobs:
7267
folder: html
7368
single-commit: true
7469
ssh-key: ${{ secrets.GH_PAGES_DEPLOY_KEY }}
75-
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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 23 * * *'
10+
11+
jobs:
12+
setup:
13+
name: Setup variables
14+
runs-on: 'ubuntu-20.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-20.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 }}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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 23 * * *'
10+
11+
jobs:
12+
setup:
13+
name: Setup variables
14+
runs-on: 'ubuntu-20.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-20.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 }}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.8

.github/workflows/release.yml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,20 @@ jobs:
2121
- uses: actions/checkout@v3
2222
with:
2323
submodules: true
24-
fetch-depth: 0 # history required so cmake can determine version
24+
fetch-depth: 0 # history required so setuptools_scm can determine version
2525

2626
- uses: mamba-org/setup-micromamba@v1
2727
with:
2828
environment-name: build-env
2929
create-args: >-
30-
python=3.8
3130
conda-build
3231
boa
33-
- run: conda mambabuild --channel conda-forge --channel scipp --python=3.8 --no-anaconda-upload --override-channels --output-folder conda/package conda
32+
- run: conda mambabuild --channel conda-forge --channel scipp --no-anaconda-upload --override-channels --output-folder conda/package conda
3433

3534
- uses: actions/upload-artifact@v3
3635
with:
3736
name: conda-package-noarch
38-
path: conda/package/*/essreflectometry*.tar.bz2
37+
path: conda/package/noarch/*.tar.bz2
3938

4039
build_wheels:
4140
name: Wheels
@@ -46,9 +45,9 @@ jobs:
4645
with:
4746
fetch-depth: 0 # history required so setuptools_scm can determine version
4847

49-
- uses: actions/setup-python@v3
48+
- uses: actions/setup-python@v4
5049
with:
51-
python-version: '3.8'
50+
python-version-file: '.github/workflows/python-version-ci'
5251

5352
- run: python -m pip install --upgrade pip
5453
- run: python -m pip install -r requirements/wheels.txt
@@ -85,11 +84,11 @@ jobs:
8584
- uses: mamba-org/setup-micromamba@v1
8685
with:
8786
environment-name: upload-env
87+
# frozen python due to breaking removal of 'imp' in 3.12
8888
create-args: >-
89-
python=3.8
9089
anaconda-client
91-
92-
- run: anaconda --token ${{ secrets.ANACONDATOKEN }} upload --user scipp --label main $(ls conda-package-*/*/*.tar.bz2)
90+
python=3.11
91+
- run: anaconda --token ${{ secrets.ANACONDATOKEN }} upload --user scipp --label main $(ls conda-package-noarch/*.tar.bz2)
9392

9493
docs:
9594
needs: [upload_conda, upload_pypi]
@@ -98,14 +97,12 @@ jobs:
9897
publish: ${{ github.event_name == 'release' && github.event.action == 'published' }}
9998
secrets: inherit
10099

101-
102100
assets:
103101
name: Upload docs
104102
needs: docs
105103
runs-on: 'ubuntu-20.04'
106104
permissions:
107105
contents: write # This is needed so that the action can upload the asset
108-
109106
steps:
110107
- uses: actions/download-artifact@v3
111108
- name: Zip documentation
@@ -117,4 +114,3 @@ jobs:
117114
with:
118115
file: ./documentation-${{ github.ref_name }}.zip
119116
overwrite: false
120-

.github/workflows/test.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ on:
1010
default: 'ubuntu-20.04'
1111
type: string
1212
python-version:
13-
default: '3.8'
1413
type: string
1514
tox-env:
1615
default: 'test'
@@ -21,13 +20,15 @@ on:
2120
coverage-report:
2221
default: false
2322
type: boolean
23+
checkout_ref:
24+
default: ''
25+
type: string
2426
workflow_call:
2527
inputs:
2628
os-variant:
2729
default: 'ubuntu-20.04'
2830
type: string
2931
python-version:
30-
default: '3.8'
3132
type: string
3233
tox-env:
3334
default: 'test'
@@ -38,13 +39,18 @@ on:
3839
coverage-report:
3940
default: false
4041
type: boolean
42+
checkout_ref:
43+
default: ''
44+
type: string
4145

4246
jobs:
4347
test:
4448
runs-on: ${{ inputs.os-variant }}
4549

4650
steps:
4751
- uses: actions/checkout@v3
52+
with:
53+
ref: ${{ inputs.checkout_ref }}
4854
- uses: actions/setup-python@v3
4955
with:
5056
python-version: ${{ inputs.python-version }}
@@ -56,4 +62,3 @@ jobs:
5662
with:
5763
name: CoverageReport
5864
path: coverage_html/
59-

docs/about/index.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ Essreflectometry is an open source project by the [European Spallation Source ER
88

99
Essreflectometry is available as open source under the [BSD-3 license](https://opensource.org/licenses/BSD-3-Clause).
1010

11+
## Citing Essreflectometry
12+
13+
Please cite the following:
14+
15+
[![DOI](https://zenodo.org/badge/FIXME.svg)](https://zenodo.org/doi/10.5281/zenodo.FIXME)
16+
17+
To cite a specific version of Essreflectometry, select the desired version on Zenodo to get the corresponding DOI.
18+
1119
## Older versions of the documentation
1220

1321
Older versions of the documentation pages can be found under the assets of each [release](https://github.com/scipp/essreflectometry/releases).

0 commit comments

Comments
 (0)