Skip to content
Open
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
52 changes: 0 additions & 52 deletions .buildconfig/ci-linux.yml

This file was deleted.

23 changes: 1 addition & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,29 +48,8 @@ jobs:
tox-env: ${{ matrix.python.tox-env }}
secrets: inherit

mantid:
name: Mantid tests
needs: formatting
runs-on: 'ubuntu-22.04'
defaults:
run:
shell: bash -l {0} # required for conda env
steps:
- uses: actions/checkout@v4
- name: Setup conda environment
uses: mamba-org/setup-micromamba@v2
with:
micromamba-version: 2.0.4-0
environment-file: .buildconfig/ci-linux.yml
cache-environment: true
create-args: >-
python=3.10
conda-build
- run: conda develop src
- run: python -m pytest tests/mantid_*

docs:
needs: [tests, mantid]
needs: tests
uses: ./.github/workflows/docs.yml
with:
publish: false
Expand Down
36 changes: 14 additions & 22 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,14 @@ on:
env:
VERSION: ${{ inputs.version }}

defaults:
run:
shell: bash -leo pipefail {0}

jobs:
docs:
name: Build documentation
runs-on: 'ubuntu-24.04'
defaults:
run:
shell: bash -l {0} # required for conda env
env:
ESS_PROTECTED_FILESTORE_USERNAME: ${{ secrets.ESS_PROTECTED_FILESTORE_USERNAME }}
ESS_PROTECTED_FILESTORE_PASSWORD: ${{ secrets.ESS_PROTECTED_FILESTORE_PASSWORD }}
Expand All @@ -57,28 +58,19 @@ jobs:
repository: ${{ github.event.pull_request.head.repo.full_name }}
fetch-depth: 0 # history required so cmake can determine version
- uses: mamba-org/setup-micromamba@v2
if: ${{ inputs.version != '' }}
with:
environment-file: .buildconfig/ci-linux.yml
cache-environment: true
create-args: >-
python=3.10
scippneutron==${{ inputs.version }}
- uses: mamba-org/setup-micromamba@v2
if: ${{ inputs.version == '' }}
with:
environment-file: .buildconfig/ci-linux.yml
cache-environment: true
create-args: >-
python=3.10
conda-build
environment-name: ci-docs
condarc: |
channels:
- mantid
- conda-forge
create-args: >-
python=3.10
mantid=6.11.0
- run: pip install --no-build-isolation --no-deps -e .
if: ${{ inputs.version == '' }}
- run: python -m sphinx -W -v -b doctest -d doctrees docs html
- run: python -m sphinx -W -v -b html -d doctrees docs html
- run: python -m sphinx -W -v -b linkcheck -d doctrees docs html
if: ${{ inputs.linkcheck }}
- run: find html -type f -name "*.ipynb" -not -path "html/_sources/*" -delete
- run: python -m pip install -r requirements/docs.txt
- run: tox -e docs --current-env
- uses: actions/upload-artifact@v4
id: artifact-upload-step
with:
Expand Down
19 changes: 16 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ on:
default: ''
type: string

defaults:
run:
shell: bash -leo pipefail {0}

jobs:
package-test:
runs-on: ${{ inputs.os-variant }}
Expand Down Expand Up @@ -72,12 +76,21 @@ jobs:
release: R2023b
cache: true
products: "MATLAB_Compiler_SDK"
- uses: actions/setup-python@v5
- uses: mamba-org/setup-micromamba@v2
with:
python-version: ${{ inputs.python-version }}
environment-name: ci-test
condarc: |
channels:
- mantid
- conda-forge
create-args: >-
python=${{ inputs.python-version }}
mantid=6.11.0
- run: python -m pip install --upgrade pip
- run: python -m pip install -r ${{ inputs.pip-recipe }}
- run: tox -e ${{ inputs.tox-env }}
- run: python -m pip install -r requirements/test.txt
- run: pip install --no-build-isolation --no-deps -e .
- run: tox -e ${{ inputs.tox-env }} --current-env
- uses: actions/upload-artifact@v4
if: ${{ inputs.coverage-report }}
with:
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ name = "scippneutron"
description = "Neutron scattering tools for Data Reduction"
authors = [{ name = "Scipp contributors" }]
license = "BSD-3-Clause"
license-files = ["LICENSE"]
readme = "README.md"
classifiers = [
"Intended Audience :: Science/Research",
Expand Down
1 change: 1 addition & 0 deletions requirements/ci.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ gitpython
packaging
requests
tox
tox-current-env
1 change: 1 addition & 0 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,4 @@ urllib3==2.3.0
# via requests
virtualenv==20.29.3
# via tox
tox-current-env==0.0.16
8 changes: 8 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ deps =
tof
commands = pytest {posargs}

[testenv:docs]
description = invoke sphinx-build to build the HTML docs
deps = -r requirements/docs.txt
allowlist_externals=find
commands = python -m sphinx -j2 -v -b html -d {toxworkdir}/docs_doctrees docs html
python -m sphinx -v -b doctest -d {toxworkdir}/docs_doctrees docs html
find html -type f -name "*.ipynb" -not -path "html/_sources/*" -delete

[testenv:static]
description = Code formatting and static analysis
skip_install = true
Expand Down
Loading