Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: 0c002dc
_commit: d9ab46a
_src_path: gh:scipp/copier_template
description: Reflectometry data reduction for the European Spallation Source
github_linux_image: ubuntu-20.04
max_python: '3.11'
min_python: '3.10'
max_python: '3.12'
min_python: '3.8'
namespace_package: ''
nightly_deps: plopp,sciline,scippneutron,scippnexus,scipp
orgname: scipp
projectname: essreflectometry
related_projects: Scipp,ScippNexus,ScippNeutron,Sciline,Plopp
year: 2023
12 changes: 4 additions & 8 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
ignore:
# Optional: Official actions have moving tags like v1;
# if you use those, you don't need updates.
- dependency-name: "actions/*"
# Note: We are not listing package-ecosystem: "github-actions". This causes
# noise in all template instances. Instead dependabot.yml in scipp/copier_template
# triggers updates of github-actions in the *template*. We then use `copier update`
# in template instances.
- package-ecosystem: "pip"
directory: "/requirements"
schedule:
Expand Down
19 changes: 13 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,19 @@ jobs:
formatting:
name: Formatting and static analysis
runs-on: 'ubuntu-20.04'
outputs:
min_python: ${{ steps.vars.outputs.min_python }}
min_tox_env: ${{ steps.vars.outputs.min_tox_env }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/checkout@v4
- name: Get Python version for other CI jobs
id: vars
run: |
echo "min_python=$(cat .github/workflows/python-version-ci)" >> $GITHUB_OUTPUT
echo "min_tox_env=py$(cat .github/workflows/python-version-ci | sed 's/\.//g')" >> $GITHUB_OUTPUT
- uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version-file: '.github/workflows/python-version-ci'
- run: python -m pip install --upgrade pip
- run: python -m pip install -r requirements/ci.txt
- run: tox -e static
Expand All @@ -33,9 +41,8 @@ jobs:
matrix:
os: ['ubuntu-20.04']
python:
- version: '3.8'
tox-env: 'py38'

- version: '${{needs.formatting.outputs.min_python}}'
tox-env: '${{needs.formatting.outputs.min_tox_env}}'
uses: ./.github/workflows/test.yml
with:
os-variant: ${{ matrix.os }}
Expand Down
12 changes: 3 additions & 9 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2023 Scipp contributors (https://github.com/scipp)


name: Docs

on:
Expand Down Expand Up @@ -42,21 +41,17 @@ jobs:
name: Build documentation
runs-on: 'ubuntu-20.04'
steps:

- run: sudo apt install --yes graphviz pandoc
- uses: actions/checkout@v3
with:
ref: ${{ inputs.branch == '' && github.ref_name || inputs.branch }}
fetch-depth: 0 # history required so cmake can determine version
- uses: actions/setup-python@v3
- uses: actions/setup-python@v4
with:

python-version: '3.8'
python-version-file: '.github/workflows/python-version-ci'
- run: python -m pip install --upgrade pip
- run: python -m pip install -r requirements/ci.txt
- run: |
tox --skip-pkg-install -e docs -- essreflectometry==${VERSION}

- run: tox -e releasedocs -- ${VERSION}
if: ${{ inputs.version != '' }}
- run: tox -e docs
if: ${{ inputs.version == '' }}
Expand All @@ -72,4 +67,3 @@ jobs:
folder: html
single-commit: true
ssh-key: ${{ secrets.GH_PAGES_DEPLOY_KEY }}

36 changes: 36 additions & 0 deletions .github/workflows/nightly_at_main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2023 Scipp contributors (https://github.com/scipp)

name: Nightly test at main branch

on:
workflow_dispatch:
schedule:
- cron: '30 23 * * *'

jobs:
setup:
name: Setup variables
runs-on: 'ubuntu-20.04'
outputs:
min_python: ${{ steps.vars.outputs.min_python }}
steps:
- uses: actions/checkout@v4
- name: Get Python version for other CI jobs
id: vars
run: echo "min_python=$(cat .github/workflows/python-version-ci)" >> $GITHUB_OUTPUT

tests:
name: Tests
needs: setup
strategy:
matrix:
os: ['ubuntu-20.04']
python:
- version: '${{needs.setup.outputs.min_python}}'
tox-env: 'nightly'
uses: ./.github/workflows/test.yml
with:
os-variant: ${{ matrix.os }}
python-version: ${{ matrix.python.version }}
tox-env: ${{ matrix.python.tox-env }}
43 changes: 43 additions & 0 deletions .github/workflows/nightly_at_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2023 Scipp contributors (https://github.com/scipp)

name: Nightly tests at latest release

on:
workflow_dispatch:
schedule:
- cron: '0 23 * * *'

jobs:
setup:
name: Setup variables
runs-on: 'ubuntu-20.04'
outputs:
min_python: ${{ steps.vars.outputs.min_python }}
release_tag: ${{ steps.release.outputs.release_tag }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # history required so we can determine latest release tag
- name: Get last release tag from git
id: release
run: echo "release_tag=$(git describe --tags --abbrev=0 --match '[0-9]*.[0-9]*.[0-9]*')" >> $GITHUB_OUTPUT
- name: Get Python version for other CI jobs
id: vars
run: echo "min_python=$(cat .github/workflows/python-version-ci)" >> $GITHUB_OUTPUT

tests:
name: Tests
needs: setup
strategy:
matrix:
os: ['ubuntu-20.04']
python:
- version: '${{needs.setup.outputs.min_python}}'
tox-env: 'nightly'
uses: ./.github/workflows/test.yml
with:
os-variant: ${{ matrix.os }}
python-version: ${{ matrix.python.version }}
tox-env: ${{ matrix.python.tox-env }}
checkout_ref: ${{ needs.setup.outputs.release_tag }}
1 change: 1 addition & 0 deletions .github/workflows/python-version-ci
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.8
20 changes: 8 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,20 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0 # history required so cmake can determine version
fetch-depth: 0 # history required so setuptools_scm can determine version

- uses: mamba-org/setup-micromamba@v1
with:
environment-name: build-env
create-args: >-
python=3.8
conda-build
boa
- run: conda mambabuild --channel conda-forge --channel scipp --python=3.8 --no-anaconda-upload --override-channels --output-folder conda/package conda
- run: conda mambabuild --channel conda-forge --channel scipp --no-anaconda-upload --override-channels --output-folder conda/package conda

- uses: actions/upload-artifact@v3
with:
name: conda-package-noarch
path: conda/package/*/essreflectometry*.tar.bz2
path: conda/package/noarch/*.tar.bz2

build_wheels:
name: Wheels
Expand All @@ -46,9 +45,9 @@ jobs:
with:
fetch-depth: 0 # history required so setuptools_scm can determine version

- uses: actions/setup-python@v3
- uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version-file: '.github/workflows/python-version-ci'

- run: python -m pip install --upgrade pip
- run: python -m pip install -r requirements/wheels.txt
Expand Down Expand Up @@ -85,11 +84,11 @@ jobs:
- uses: mamba-org/setup-micromamba@v1
with:
environment-name: upload-env
# frozen python due to breaking removal of 'imp' in 3.12
create-args: >-
python=3.8
anaconda-client

- run: anaconda --token ${{ secrets.ANACONDATOKEN }} upload --user scipp --label main $(ls conda-package-*/*/*.tar.bz2)
python=3.11
- run: anaconda --token ${{ secrets.ANACONDATOKEN }} upload --user scipp --label main $(ls conda-package-noarch/*.tar.bz2)

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


assets:
name: Upload docs
needs: docs
runs-on: 'ubuntu-20.04'
permissions:
contents: write # This is needed so that the action can upload the asset

steps:
- uses: actions/download-artifact@v3
- name: Zip documentation
Expand All @@ -117,4 +114,3 @@ jobs:
with:
file: ./documentation-${{ github.ref_name }}.zip
overwrite: false

11 changes: 8 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ on:
default: 'ubuntu-20.04'
type: string
python-version:
default: '3.8'
type: string
tox-env:
default: 'test'
Expand All @@ -21,13 +20,15 @@ on:
coverage-report:
default: false
type: boolean
checkout_ref:
default: ''
type: string
workflow_call:
inputs:
os-variant:
default: 'ubuntu-20.04'
type: string
python-version:
default: '3.8'
type: string
tox-env:
default: 'test'
Expand All @@ -38,13 +39,18 @@ on:
coverage-report:
default: false
type: boolean
checkout_ref:
default: ''
type: string

jobs:
test:
runs-on: ${{ inputs.os-variant }}

steps:
- uses: actions/checkout@v3
with:
ref: ${{ inputs.checkout_ref }}
- uses: actions/setup-python@v3
with:
python-version: ${{ inputs.python-version }}
Expand All @@ -56,4 +62,3 @@ jobs:
with:
name: CoverageReport
path: coverage_html/

8 changes: 8 additions & 0 deletions docs/about/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ Essreflectometry is an open source project by the [European Spallation Source ER

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

## Citing Essreflectometry

Please cite the following:

[![DOI](https://zenodo.org/badge/FIXME.svg)](https://zenodo.org/doi/10.5281/zenodo.FIXME)

To cite a specific version of Essreflectometry, select the desired version on Zenodo to get the corresponding DOI.

## Older versions of the documentation

Older versions of the documentation pages can be found under the assets of each [release](https://github.com/scipp/essreflectometry/releases).
Expand Down
9 changes: 8 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,21 @@
"primary_sidebar_end": ["edit-this-page", "sourcelink"],
"secondary_sidebar_items": [],
"show_nav_level": 1,
# Adjust this to ensure external links are moved to "Move" menu
"header_links_before_dropdown": 4,
"pygment_light_style": "github-light-high-contrast",
"pygment_dark_style": "github-dark-high-contrast",
"logo": {
"image_light": "_static/logo.svg",
"image_dark": "_static/logo-dark.svg",
},
"external_links": [],
"external_links": [
{"name": "Plopp", "url": "https://scipp.github.io/plopp"},
{"name": "Sciline", "url": "https://scipp.github.io/sciline"},
{"name": "Scipp", "url": "https://scipp.github.io"},
{"name": "ScippNeutron", "url": "https://scipp.github.io/scippneutron"},
{"name": "ScippNexus", "url": "https://scipp.github.io/scippnexus"},
],
"icon_links": [
{
"name": "GitHub",
Expand Down
2 changes: 1 addition & 1 deletion docs/developer/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Alternatively, if you want a different workflow, take a look at ``tox.ini`` or `
Run the tests using

```sh
tox -e py310
tox -e py38
```

(or just `tox` if you want to run all environments).
Expand Down
10 changes: 8 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[build-system]
requires = [
"setuptools>=67",
"setuptools_scm[toml]>=7.0",
"setuptools>=68",
"setuptools_scm[toml]>=8.0",
]
build-backend = "setuptools.build_meta"

Expand All @@ -22,10 +22,15 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering",
"Typing :: Typed",
]
requires-python = ">=3.8"

# IMPORTANT:
# Run 'tox -e deps' after making changes here. This will update requirement files.
# Make sure to list one dependency per line.
dependencies = [
"dask",
"graphviz",
Expand All @@ -36,6 +41,7 @@ dependencies = [
"scipp>=23.8.0",
"scippneutron>=23.9.0",
]

dynamic = ["version"]

[project.urls]
Expand Down
Loading