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
6 changes: 3 additions & 3 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: 6848c57
_commit: 86a1e5c
_src_path: gh:scipp/copier_template
description: Diffraction data reduction for the European Spallation Source
max_python: '3.12'
min_python: '3.10'
namespace_package: ess
nightly_deps: scipp,scippnexus,sciline,plopp,scippneutron
nightly_deps: scipp,scippnexus,sciline,plopp,scippneutron,essreduce
orgname: scipp
prettyname: ESSdiffraction
projectname: essdiffraction
related_projects: Scipp,ScippNexus,ScippNeutron,Sciline,Plopp
related_projects: Scipp,ScippNexus,ScippNeutron,Sciline,Plopp,ESSreduce
year: 2024
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ jobs:
os-variant: ${{ matrix.os }}
python-version: ${{ matrix.python.version }}
tox-env: ${{ matrix.python.tox-env }}
secrets: inherit

docs:
needs: tests
Expand All @@ -54,3 +55,4 @@ jobs:
publish: false
linkcheck: ${{ contains(matrix.variant.os, 'ubuntu') && github.ref == 'refs/heads/main' }}
branch: ${{ github.head_ref == '' && github.ref_name || github.head_ref }}
secrets: inherit
6 changes: 5 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ jobs:
docs:
name: Build documentation
runs-on: 'ubuntu-22.04'
env:
ESS_PROTECTED_FILESTORE_USERNAME: ${{ secrets.ESS_PROTECTED_FILESTORE_USERNAME }}
ESS_PROTECTED_FILESTORE_PASSWORD: ${{ secrets.ESS_PROTECTED_FILESTORE_PASSWORD }}

steps:
- run: sudo apt install --yes graphviz pandoc
- uses: actions/checkout@v4
Expand All @@ -65,7 +69,7 @@ jobs:
name: docs_html
path: html/

- uses: JamesIves/github-pages-deploy-action@v4.6.1
- uses: JamesIves/github-pages-deploy-action@v4.6.3
if: ${{ inputs.publish }}
with:
branch: gh-pages
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/nightly_at_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ jobs:
os-variant: ${{ matrix.os }}
python-version: ${{ matrix.python.version }}
tox-env: ${{ matrix.python.tox-env }}
secrets: inherit
1 change: 1 addition & 0 deletions .github/workflows/nightly_at_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ jobs:
python-version: ${{ matrix.python.version }}
tox-env: ${{ matrix.python.tox-env }}
checkout_ref: ${{ needs.setup.outputs.release_tag }}
secrets: inherit
18 changes: 18 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,26 @@ on:
type: string

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

steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.checkout_ref }}
- uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
- run: python -m pip install --upgrade pip
- run: python -m pip install .
- run: python tests/package_test.py
name: Run package tests

test:
runs-on: ${{ inputs.os-variant }}
env:
ESS_PROTECTED_FILESTORE_USERNAME: ${{ secrets.ESS_PROTECTED_FILESTORE_USERNAME }}
ESS_PROTECTED_FILESTORE_PASSWORD: ${{ secrets.ESS_PROTECTED_FILESTORE_PASSWORD }}

steps:
- uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/unpinned.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ jobs:
python-version: ${{ matrix.python.version }}
tox-env: ${{ matrix.python.tox-env }}
checkout_ref: ${{ needs.setup.outputs.release_tag }}
secrets: inherit
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ __pycache__/
.pytest_cache
.mypy_cache
docs/generated/
.ruff_cache

# Editor settings
.idea/
Expand Down
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@
"image_dark": "_static/logo-dark.svg",
},
"external_links": [
{"name": "ESSreduce", "url": "https://scipp.github.io/essreduce"},
{"name": "Plopp", "url": "https://scipp.github.io/plopp"},
{"name": "Sciline", "url": "https://scipp.github.io/sciline"},
{"name": "Scipp", "url": "https://scipp.github.io"},
Expand Down
16 changes: 13 additions & 3 deletions docs/user-guide/dream/dream-data-reduction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
"id": "f47beab6-47c9-4cfb-a70e-c00bc8daebef",
"metadata": {},
"source": [
"# DREAM data reduction"
"# DREAM data reduction\n",
"\n",
"We begin with relevant imports.\n",
"We will be using tutorial data downloaded with `pooch`.\n",
"If you get an error about a missing module `pooch`, you can install it with `!pip install pooch`:"
]
},
{
Expand All @@ -17,7 +21,10 @@
"source": [
"import scipp as sc\n",
"import scippneutron as scn\n",
"import scippneutron.io\n",
"\n",
"from ess import dream, powder\n",
"import ess.dream.data # noqa: F401\n",
"from ess.powder.types import *"
]
},
Expand Down Expand Up @@ -67,7 +74,9 @@
"# Edges for binning in d-spacing\n",
"workflow[DspacingBins] = sc.linspace(\"dspacing\", 0.0, 2.3434, 201, unit=\"angstrom\")\n",
"# Mask in time-of-flight to crop to valid range\n",
"workflow[TofMask] = lambda x: (x < sc.scalar(0.0, unit=\"ns\")) | (x > sc.scalar(86e6, unit=\"ns\"))\n",
"workflow[TofMask] = lambda x: (x < sc.scalar(0.0, unit=\"ns\")) | (\n",
" x > sc.scalar(86e6, unit=\"ns\")\n",
")\n",
"workflow[TwoThetaMask] = None\n",
"workflow[WavelengthMask] = None\n",
"# No pixel masks\n",
Expand Down Expand Up @@ -265,7 +274,8 @@
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3"
"pygments_lexer": "ipython3",
"version": "3.10.14"
}
},
"nbformat": 4,
Expand Down
9 changes: 7 additions & 2 deletions docs/user-guide/dream/dream-instrument-view.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
"This notebook is a simple example of how to use the instrument view for the DREAM instrument.\n",
"\n",
"- The DREAM-specific instrument view is capable of slicing the data with a slider widget along a dimension (e.g. `tof`) by using the `dim` argument.\n",
"- There are also checkboxes to hide/show the different elements that make up the DREAM detectors."
"- There are also checkboxes to hide/show the different elements that make up the DREAM detectors.\n",
"\n",
"We begin with relevant imports.\n",
"We will be using tutorial data downloaded with `pooch`.\n",
"If you get an error about a missing module `pooch`, you can install it with `!pip install pooch`:"
]
},
{
Expand All @@ -21,7 +25,8 @@
"outputs": [],
"source": [
"import scipp as sc\n",
"from ess import dream"
"from ess import dream\n",
"import ess.dream.data # noqa: F401"
]
},
{
Expand Down
12 changes: 9 additions & 3 deletions docs/user-guide/sns-instruments/POWGEN_data_reduction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
"This notebook gives a concise overview of how to use the ESSDiffraction package with Sciline.\n",
"It uses a simple reduction workflow for the SNS [POWGEN](https://sns.gov/powgen) experiment.\n",
"\n",
"We begin with relevant imports:"
"We begin with relevant imports.\n",
"We will be using tutorial data downloaded with `pooch`.\n",
"If you get an error about a missing module `pooch`, you can install it with `!pip install pooch`:"
]
},
{
Expand All @@ -24,9 +26,11 @@
"source": [
"import scipp as sc\n",
"import scippneutron as scn\n",
"import scippneutron.io\n",
"\n",
"from ess import powder\n",
"from ess.snspowder import powgen\n",
"import ess.snspowder.powgen.data # noqa: F401\n",
"from ess.powder.types import *"
]
},
Expand Down Expand Up @@ -74,7 +78,9 @@
"# Edges for binning in d-spacing\n",
"workflow[DspacingBins] = sc.linspace(\"dspacing\", 0.0, 2.3434, 201, unit=\"angstrom\")\n",
"# Mask in time-of-flight to crop to valid range\n",
"workflow[TofMask] = lambda x: (x < sc.scalar(0.0, unit=\"us\")) | (x > sc.scalar(16666.67, unit=\"us\"))\n",
"workflow[TofMask] = lambda x: (x < sc.scalar(0.0, unit=\"us\")) | (\n",
" x > sc.scalar(16666.67, unit=\"us\")\n",
")\n",
"workflow[TwoThetaMask] = None\n",
"workflow[WavelengthMask] = None\n",
"# No pixel masks\n",
Expand Down Expand Up @@ -388,7 +394,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.12"
"version": "3.10.14"
}
},
"nbformat": 4,
Expand Down
35 changes: 10 additions & 25 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
#
asttokens==2.4.1
# via stack-data
certifi==2024.7.4
# via requests
charset-normalizer==3.3.2
# via requests
click==8.1.7
# via dask
cloudpickle==3.0.0
Expand All @@ -23,13 +19,13 @@ cyclebane==24.6.0
# via sciline
cycler==0.12.1
# via matplotlib
dask==2024.7.0
dask==2024.8.0
# via -r base.in
decorator==5.1.1
# via ipython
essreduce==24.7.1
essreduce==24.8.0
# via -r base.in
exceptiongroup==1.2.1
exceptiongroup==1.2.2
# via ipython
executing==2.0.1
# via stack-data
Expand All @@ -43,9 +39,7 @@ h5py==3.11.0
# via
# scippneutron
# scippnexus
idna==3.7
# via requests
importlib-metadata==8.0.0
importlib-metadata==8.2.0
# via dask
ipydatawidgets==4.3.5
# via pythreejs
Expand All @@ -63,7 +57,7 @@ kiwisolver==1.4.5
# via matplotlib
locket==1.0.0
# via partd
matplotlib==3.9.1
matplotlib==3.9.1.post1
# via
# mpltoolbox
# plopp
Expand All @@ -73,7 +67,7 @@ mpltoolbox==24.5.1
# via scippneutron
networkx==3.3
# via cyclebane
numpy==2.0.0
numpy==2.0.1
# via
# -r base.in
# contourpy
Expand All @@ -89,7 +83,6 @@ packaging==24.1
# via
# dask
# matplotlib
# pooch
parso==0.8.4
# via jedi
partd==1.4.2
Expand All @@ -98,19 +91,15 @@ pexpect==4.9.0
# via ipython
pillow==10.4.0
# via matplotlib
platformdirs==4.2.2
# via pooch
plopp==24.6.0
# via
# -r base.in
# scippneutron
pooch==1.8.2
# via scippneutron
prompt-toolkit==3.0.47
# via ipython
ptyprocess==0.7.0
# via pexpect
pure-eval==0.2.2
pure-eval==0.2.3
# via stack-data
pygments==2.18.0
# via ipython
Expand All @@ -122,10 +111,8 @@ python-dateutil==2.9.0.post0
# scippnexus
pythreejs==2.4.2
# via -r base.in
pyyaml==6.0.1
pyyaml==6.0.2
# via dask
requests==2.32.3
# via pooch
sciline==24.6.2
# via -r base.in
scipp==24.6.0
Expand All @@ -134,9 +121,9 @@ scipp==24.6.0
# essreduce
# scippneutron
# scippnexus
scippneutron==24.7.0
scippneutron==24.8.0
# via -r base.in
scippnexus==24.6.0
scippnexus==24.8.1
# via
# -r base.in
# essreduce
Expand Down Expand Up @@ -167,8 +154,6 @@ traittypes==0.2.1
# via ipydatawidgets
typing-extensions==4.12.2
# via ipython
urllib3==2.2.2
# via requests
wcwidth==0.2.13
# via prompt-toolkit
widgetsnbextension==4.0.11
Expand Down
1 change: 1 addition & 0 deletions requirements/basetest.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@

numpy
pandas
pooch
pytest
26 changes: 21 additions & 5 deletions requirements/basetest.txt
Original file line number Diff line number Diff line change
@@ -1,33 +1,49 @@
# SHA1:ddff3f126978358816fc9518b85c5efc1ff00444
# SHA1:71bfa26144d7bd59b7128e5f32727ebae47f0168
#
# This file is autogenerated by pip-compile-multi
# To update, run:
#
# pip-compile-multi
#
exceptiongroup==1.2.1
certifi==2024.7.4
# via requests
charset-normalizer==3.3.2
# via requests
exceptiongroup==1.2.2
# via pytest
idna==3.7
# via requests
iniconfig==2.0.0
# via pytest
numpy==2.0.0
numpy==2.0.1
# via
# -r basetest.in
# pandas
packaging==24.1
# via pytest
# via
# pooch
# pytest
pandas==2.2.2
# via -r basetest.in
platformdirs==4.2.2
# via pooch
pluggy==1.5.0
# via pytest
pytest==8.2.2
pooch==1.8.2
# via -r basetest.in
pytest==8.3.2
# via -r basetest.in
python-dateutil==2.9.0.post0
# via pandas
pytz==2024.1
# via pandas
requests==2.32.3
# via pooch
six==1.16.0
# via python-dateutil
tomli==2.0.1
# via pytest
tzdata==2024.1
# via pandas
urllib3==2.2.2
# via requests
Loading