From 8b7bd00bc3ae4c5e3070c0679a36f51e502dc0c2 Mon Sep 17 00:00:00 2001 From: Jan-Lukas Wynen Date: Mon, 13 Oct 2025 15:24:24 +0200 Subject: [PATCH 1/3] Use data registry from essreduce --- pyproject.toml | 2 +- requirements/base.in | 2 +- requirements/base.txt | 58 ++++++++--------- requirements/basetest.txt | 28 ++++---- requirements/ci.txt | 20 +++--- requirements/dev.txt | 34 +++++----- requirements/docs.txt | 46 +++++++------- requirements/mypy.txt | 2 +- requirements/nightly.txt | 60 ++++++++--------- requirements/static.txt | 12 ++-- src/ess/beer/data.py | 84 +++++++++++------------- src/ess/dream/data.py | 100 +++++++++++++---------------- src/ess/snspowder/powgen/data.py | 106 +++++++++++++------------------ 13 files changed, 258 insertions(+), 296 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 9e43294f..2818a77c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,7 +31,7 @@ requires-python = ">=3.11" # Make sure to list one dependency per line. dependencies = [ "dask>=2022.1.0", - "essreduce>=25.07.0", + "essreduce>=25.10.0", "graphviz", "numpy>=1.25", "plopp>=25.07.0", diff --git a/requirements/base.in b/requirements/base.in index 807fbc2f..bd1182ad 100644 --- a/requirements/base.in +++ b/requirements/base.in @@ -3,7 +3,7 @@ # --- END OF CUSTOM SECTION --- # The following was generated by 'tox -e deps', DO NOT EDIT MANUALLY! dask>=2022.1.0 -essreduce>=25.07.0 +essreduce>=25.10.0 graphviz numpy>=1.25 plopp>=25.07.0 diff --git a/requirements/base.txt b/requirements/base.txt index fa1092f1..750ff85f 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,4 +1,4 @@ -# SHA1:14c6bcb4e6d6485d81209545674ad66d2bd9f82f +# SHA1:96ea0250e7f1afb29436f906350ce2458536f7e3 # # This file was generated by pip-compile-multi. # To update, run: @@ -9,7 +9,7 @@ annotated-types==0.7.0 # via pydantic asttokens==3.0.0 # via stack-data -click==8.2.1 +click==8.3.0 # via dask cloudpickle==3.1.1 # via dask @@ -21,35 +21,35 @@ cyclebane==24.10.0 # via sciline cycler==0.12.1 # via matplotlib -dask==2025.7.0 +dask==2025.9.1 # via -r base.in decorator==5.2.1 # via ipython -dnspython==2.7.0 +dnspython==2.8.0 # via email-validator -email-validator==2.2.0 +email-validator==2.3.0 # via scippneutron -essreduce==25.7.1 +essreduce==25.10.0 # via -r base.in -executing==2.2.0 +executing==2.2.1 # via stack-data -fonttools==4.59.0 +fonttools==4.60.1 # via matplotlib -fsspec==2025.7.0 +fsspec==2025.9.0 # via dask graphviz==0.21 # via -r base.in -h5py==3.14.0 +h5py==3.15.0 # via # scippneutron # scippnexus -idna==3.10 +idna==3.11 # via email-validator importlib-metadata==8.7.0 # via dask ipydatawidgets==4.3.5 # via pythreejs -ipython==9.4.0 +ipython==9.6.0 # via ipywidgets ipython-pygments-lexers==1.1.1 # via ipython @@ -61,7 +61,7 @@ jedi==0.19.2 # via ipython jupyterlab-widgets==3.0.15 # via ipywidgets -kiwisolver==1.4.8 +kiwisolver==1.4.9 # via matplotlib lazy-loader==0.4 # via @@ -70,17 +70,17 @@ lazy-loader==0.4 # tof locket==1.0.0 # via partd -matplotlib==3.10.5 +matplotlib==3.10.7 # via # mpltoolbox # plopp matplotlib-inline==0.1.7 # via ipython -mpltoolbox==25.5.0 +mpltoolbox==25.10.0 # via scippneutron networkx==3.5 # via cyclebane -numpy==2.3.2 +numpy==2.3.3 # via # -r base.in # contourpy @@ -96,7 +96,7 @@ packaging==25.0 # dask # lazy-loader # matplotlib -parso==0.8.4 +parso==0.8.5 # via jedi partd==1.4.2 # via dask @@ -104,26 +104,26 @@ pexpect==4.9.0 # via ipython pillow==11.3.0 # via matplotlib -plopp==25.7.1 +plopp==25.10.0 # via # -r base.in # scippneutron # tof -prompt-toolkit==3.0.51 +prompt-toolkit==3.0.52 # via ipython ptyprocess==0.7.0 # via pexpect pure-eval==0.2.3 # via stack-data -pydantic==2.11.7 +pydantic==2.12.0 # via scippneutron -pydantic-core==2.33.2 +pydantic-core==2.41.1 # via pydantic pygments==2.19.2 # via # ipython # ipython-pygments-lexers -pyparsing==3.2.3 +pyparsing==3.2.5 # via matplotlib python-dateutil==2.9.0.post0 # via @@ -132,9 +132,9 @@ python-dateutil==2.9.0.post0 # scippnexus pythreejs==2.4.2 # via -r base.in -pyyaml==6.0.2 +pyyaml==6.0.3 # via dask -sciline==25.5.2 +sciline==25.8.0 # via # -r base.in # essreduce @@ -154,7 +154,7 @@ scippnexus==25.6.0 # -r base.in # essreduce # scippneutron -scipy==1.16.1 +scipy==1.16.2 # via # scippneutron # scippnexus @@ -163,7 +163,7 @@ six==1.17.0 # via python-dateutil stack-data==0.6.3 # via ipython -tof==25.5.0 +tof==25.10.1 # via -r base.in toolz==1.0.0 # via @@ -178,16 +178,16 @@ traitlets==5.14.3 # traittypes traittypes==0.2.1 # via ipydatawidgets -typing-extensions==4.14.1 +typing-extensions==4.15.0 # via # ipython # pydantic # pydantic-core # sciline # typing-inspection -typing-inspection==0.4.1 +typing-inspection==0.4.2 # via pydantic -wcwidth==0.2.13 +wcwidth==0.2.14 # via prompt-toolkit widgetsnbextension==4.0.14 # via ipywidgets diff --git a/requirements/basetest.txt b/requirements/basetest.txt index 89f6bc73..bef50e80 100644 --- a/requirements/basetest.txt +++ b/requirements/basetest.txt @@ -7,21 +7,21 @@ # asttokens==3.0.0 # via stack-data -certifi==2025.8.3 +certifi==2025.10.5 # via requests -charset-normalizer==3.4.2 +charset-normalizer==3.4.3 # via requests comm==0.2.3 # via ipywidgets decorator==5.2.1 # via ipython -executing==2.2.0 +executing==2.2.1 # via stack-data -idna==3.10 +idna==3.11 # via requests iniconfig==2.1.0 # via pytest -ipython==9.4.0 +ipython==9.6.0 # via ipywidgets ipython-pygments-lexers==1.1.1 # via ipython @@ -33,25 +33,25 @@ jupyterlab-widgets==3.0.15 # via ipywidgets matplotlib-inline==0.1.7 # via ipython -numpy==2.3.2 +numpy==2.3.3 # via pandas packaging==25.0 # via # pooch # pytest -pandas==2.3.1 +pandas==2.3.3 # via -r basetest.in -parso==0.8.4 +parso==0.8.5 # via jedi pexpect==4.9.0 # via ipython -platformdirs==4.3.8 +platformdirs==4.5.0 # via pooch pluggy==1.6.0 # via pytest pooch==1.8.2 # via -r basetest.in -prompt-toolkit==3.0.51 +prompt-toolkit==3.0.52 # via ipython ptyprocess==0.7.0 # via pexpect @@ -62,13 +62,13 @@ pygments==2.19.2 # ipython # ipython-pygments-lexers # pytest -pytest==8.4.1 +pytest==8.4.2 # via -r basetest.in python-dateutil==2.9.0.post0 # via pandas pytz==2025.2 # via pandas -requests==2.32.4 +requests==2.32.5 # via pooch six==1.17.0 # via python-dateutil @@ -79,13 +79,13 @@ traitlets==5.14.3 # ipython # ipywidgets # matplotlib-inline -typing-extensions==4.14.1 +typing-extensions==4.15.0 # via ipython tzdata==2025.2 # via pandas urllib3==2.5.0 # via requests -wcwidth==0.2.13 +wcwidth==0.2.14 # via prompt-toolkit widgetsnbextension==4.0.14 # via ipywidgets diff --git a/requirements/ci.txt b/requirements/ci.txt index cf385f77..fbddba98 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -5,19 +5,19 @@ # # requirements upgrade # -cachetools==6.1.0 +cachetools==6.2.1 # via tox -certifi==2025.8.3 +certifi==2025.10.5 # via requests chardet==5.2.0 # via tox -charset-normalizer==3.4.2 +charset-normalizer==3.4.3 # via requests colorama==0.4.6 # via tox distlib==0.4.0 # via virtualenv -filelock==3.18.0 +filelock==3.20.0 # via # tox # virtualenv @@ -25,28 +25,28 @@ gitdb==4.0.12 # via gitpython gitpython==3.1.45 # via -r ci.in -idna==3.10 +idna==3.11 # via requests packaging==25.0 # via # -r ci.in # pyproject-api # tox -platformdirs==4.3.8 +platformdirs==4.5.0 # via # tox # virtualenv pluggy==1.6.0 # via tox -pyproject-api==1.9.1 +pyproject-api==1.10.0 # via tox -requests==2.32.4 +requests==2.32.5 # via -r ci.in smmap==5.0.2 # via gitdb -tox==4.28.4 +tox==4.31.0 # via -r ci.in urllib3==2.5.0 # via requests -virtualenv==20.33.1 +virtualenv==20.35.3 # via tox diff --git a/requirements/dev.txt b/requirements/dev.txt index 94aff0a8..9b850845 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -12,7 +12,7 @@ -r static.txt -r test.txt -r wheels.txt -anyio==4.10.0 +anyio==4.11.0 # via # httpx # jupyter-server @@ -24,9 +24,9 @@ arrow==1.3.0 # via isoduration async-lru==2.0.5 # via jupyterlab -cffi==1.17.1 +cffi==2.0.0 # via argon2-cffi-bindings -copier==9.9.0 +copier==9.10.2 # via -r dev.in dunamai==1.25.0 # via copier @@ -44,20 +44,20 @@ isoduration==20.11.0 # via jsonschema jinja2-ansible-filters==1.3.2 # via copier -json5==0.12.0 +json5==0.12.1 # via jupyterlab-server jsonpointer==3.0.0 # via jsonschema -jsonschema[format-nongpl]==4.25.0 +jsonschema[format-nongpl]==4.25.1 # via # jupyter-events # jupyterlab-server # nbformat jupyter-events==0.12.0 # via jupyter-server -jupyter-lsp==2.2.6 +jupyter-lsp==2.3.0 # via jupyterlab -jupyter-server==2.16.0 +jupyter-server==2.17.0 # via # jupyter-lsp # jupyterlab @@ -65,29 +65,29 @@ jupyter-server==2.16.0 # notebook-shim jupyter-server-terminals==0.5.3 # via jupyter-server -jupyterlab==4.4.5 +jupyterlab==4.4.9 # via -r dev.in jupyterlab-server==2.27.3 # via jupyterlab -lark==1.2.2 +lark==1.3.0 # via rfc3987-syntax notebook-shim==0.2.4 # via jupyterlab overrides==7.7.0 # via jupyter-server -pip-compile-multi==3.2.1 +pip-compile-multi==3.2.2 # via -r dev.in -pip-tools==7.5.0 +pip-tools==7.5.1 # via pip-compile-multi plumbum==1.9.0 # via copier -prometheus-client==0.22.1 +prometheus-client==0.23.1 # via jupyter-server -pycparser==2.22 +pycparser==2.23 # via cffi -python-json-logger==3.3.0 +python-json-logger==4.0.0 # via jupyter-events -questionary==2.1.0 +questionary==2.1.1 # via copier rfc3339-validator==0.1.4 # via @@ -109,13 +109,13 @@ terminado==0.18.1 # jupyter-server-terminals toposort==1.10 # via pip-compile-multi -types-python-dateutil==2.9.0.20250708 +types-python-dateutil==2.9.0.20251008 # via arrow uri-template==1.3.0 # via jsonschema webcolors==24.11.1 # via jsonschema -websocket-client==1.8.0 +websocket-client==1.9.0 # via jupyter-server wheel==0.45.1 # via pip-tools diff --git a/requirements/docs.txt b/requirements/docs.txt index d7f5618c..1ddc94cc 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -10,9 +10,7 @@ accessible-pygments==0.0.5 # via pydata-sphinx-theme alabaster==1.0.0 # via sphinx -appnope==0.1.4 - # via ipykernel -attrs==25.3.0 +attrs==25.4.0 # via # jsonschema # referencing @@ -22,17 +20,17 @@ babel==2.17.0 # via # pydata-sphinx-theme # sphinx -beautifulsoup4==4.13.4 +beautifulsoup4==4.14.2 # via # nbconvert # pydata-sphinx-theme bleach[css]==6.2.0 # via nbconvert -certifi==2025.8.3 +certifi==2025.10.5 # via requests -charset-normalizer==3.4.2 +charset-normalizer==3.4.3 # via requests -debugpy==1.8.15 +debugpy==1.8.17 # via ipykernel defusedxml==0.7.1 # via nbconvert @@ -44,13 +42,13 @@ docutils==0.21.2 # pydata-sphinx-theme # sphinx # sphinxcontrib-bibtex -fastjsonschema==2.21.1 +fastjsonschema==2.21.2 # via nbformat imagesize==1.4.1 # via sphinx -ipykernel==6.30.1 +ipykernel==7.0.0 # via -r docs.in -ipympl==0.9.7 +ipympl==0.9.8 # via -r docs.in jinja2==3.1.6 # via @@ -58,9 +56,9 @@ jinja2==3.1.6 # nbconvert # nbsphinx # sphinx -jsonschema==4.25.0 +jsonschema==4.25.1 # via nbformat -jsonschema-specifications==2025.4.1 +jsonschema-specifications==2025.9.1 # via jsonschema jupyter-client==8.6.3 # via @@ -81,15 +79,15 @@ markdown-it-py==3.0.0 # via # mdit-py-plugins # myst-parser -markupsafe==3.0.2 +markupsafe==3.0.3 # via # jinja2 # nbconvert -mdit-py-plugins==0.4.2 +mdit-py-plugins==0.5.0 # via myst-parser mdurl==0.1.2 # via markdown-it-py -mistune==3.1.3 +mistune==3.1.4 # via nbconvert myst-parser==4.0.1 # via -r docs.in @@ -106,17 +104,17 @@ nbsphinx==0.9.7 # via -r docs.in nest-asyncio==1.6.0 # via ipykernel -pandas==2.3.1 +pandas==2.3.3 # via -r docs.in pandocfilters==1.5.1 # via nbconvert -platformdirs==4.3.8 +platformdirs==4.5.0 # via # jupyter-core # pooch pooch==1.8.2 # via -r docs.in -psutil==7.0.0 +psutil==7.1.0 # via ipykernel pyarrow==21.0.0 # via -r docs.in @@ -126,7 +124,7 @@ pybtex==0.25.1 # sphinxcontrib-bibtex pybtex-docutils==1.0.3 # via sphinxcontrib-bibtex -pydantic-settings==2.10.1 +pydantic-settings==2.11.0 # via autodoc-pydantic pydata-sphinx-theme==0.16.1 # via -r docs.in @@ -134,7 +132,7 @@ python-dotenv==1.1.1 # via pydantic-settings pytz==2025.2 # via pandas -pyzmq==27.0.1 +pyzmq==27.1.0 # via # ipykernel # jupyter-client @@ -142,17 +140,17 @@ referencing==0.36.2 # via # jsonschema # jsonschema-specifications -requests==2.32.4 +requests==2.32.5 # via # pooch # sphinx -rpds-py==0.26.0 +rpds-py==0.27.1 # via # jsonschema # referencing snowballstemmer==3.0.1 # via sphinx -soupsieve==2.7 +soupsieve==2.8 # via beautifulsoup4 sphinx==8.1.3 # via @@ -187,7 +185,7 @@ sphinxcontrib-serializinghtml==2.0.0 # via sphinx tinycss2==1.4.0 # via bleach -tornado==6.5.1 +tornado==6.5.2 # via # ipykernel # jupyter-client diff --git a/requirements/mypy.txt b/requirements/mypy.txt index a2b4de29..088d0c28 100644 --- a/requirements/mypy.txt +++ b/requirements/mypy.txt @@ -6,7 +6,7 @@ # requirements upgrade # -r test.txt -mypy==1.17.1 +mypy==1.18.2 # via -r mypy.in mypy-extensions==1.1.0 # via mypy diff --git a/requirements/nightly.txt b/requirements/nightly.txt index 0a1ea3ee..9ad14c0c 100644 --- a/requirements/nightly.txt +++ b/requirements/nightly.txt @@ -12,11 +12,11 @@ annotated-types==0.7.0 # via pydantic asttokens==3.0.0 # via stack-data -certifi==2025.8.3 +certifi==2025.10.5 # via requests -charset-normalizer==3.4.2 +charset-normalizer==3.4.3 # via requests -click==8.2.1 +click==8.3.0 # via dask cloudpickle==3.1.1 # via dask @@ -28,29 +28,29 @@ cyclebane==24.10.0 # via sciline cycler==0.12.1 # via matplotlib -dask==2025.7.0 +dask==2025.9.1 # via -r nightly.in decorator==5.2.1 # via ipython -dnspython==2.7.0 +dnspython==2.8.0 # via email-validator -email-validator==2.2.0 +email-validator==2.3.0 # via scippneutron essreduce @ git+https://github.com/scipp/essreduce@main # via -r nightly.in -executing==2.2.0 +executing==2.2.1 # via stack-data -fonttools==4.59.0 +fonttools==4.60.1 # via matplotlib -fsspec==2025.7.0 +fsspec==2025.9.0 # via dask graphviz==0.21 # via -r nightly.in -h5py==3.14.0 +h5py==3.15.0 # via # scippneutron # scippnexus -idna==3.10 +idna==3.11 # via # email-validator # requests @@ -60,7 +60,7 @@ iniconfig==2.1.0 # via pytest ipydatawidgets==4.3.5 # via pythreejs -ipython==9.4.0 +ipython==9.6.0 # via ipywidgets ipython-pygments-lexers==1.1.1 # via ipython @@ -73,7 +73,7 @@ jedi==0.19.2 # via ipython jupyterlab-widgets==3.0.15 # via ipywidgets -kiwisolver==1.4.8 +kiwisolver==1.4.10rc0 # via matplotlib lazy-loader==0.4 # via @@ -82,17 +82,17 @@ lazy-loader==0.4 # tof locket==1.0.0 # via partd -matplotlib==3.10.5 +matplotlib==3.10.7 # via # mpltoolbox # plopp matplotlib-inline==0.1.7 # via ipython -mpltoolbox==25.5.0 +mpltoolbox==25.10.0 # via scippneutron networkx==3.5 # via cyclebane -numpy==2.3.2 +numpy==2.3.3 # via # -r nightly.in # contourpy @@ -111,9 +111,9 @@ packaging==25.0 # matplotlib # pooch # pytest -pandas==2.3.1 +pandas==2.3.3 # via -r nightly.in -parso==0.8.4 +parso==0.8.5 # via jedi partd==1.4.2 # via dask @@ -121,7 +121,7 @@ pexpect==4.9.0 # via ipython pillow==11.3.0 # via matplotlib -platformdirs==4.3.8 +platformdirs==4.5.0 # via pooch plopp @ git+https://github.com/scipp/plopp@main # via @@ -132,24 +132,24 @@ pluggy==1.6.0 # via pytest pooch==1.8.2 # via -r nightly.in -prompt-toolkit==3.0.51 +prompt-toolkit==3.0.52 # via ipython ptyprocess==0.7.0 # via pexpect pure-eval==0.2.3 # via stack-data -pydantic==2.12.0a1 +pydantic==2.12.0 # via scippneutron -pydantic-core==2.37.2 +pydantic-core==2.41.1 # via pydantic pygments==2.19.2 # via # ipython # ipython-pygments-lexers # pytest -pyparsing==3.2.3 +pyparsing==3.3.0a1 # via matplotlib -pytest==8.4.1 +pytest==8.4.2 # via -r nightly.in python-dateutil==2.9.0.post0 # via @@ -160,9 +160,9 @@ pythreejs==2.4.2 # via -r nightly.in pytz==2025.2 # via pandas -pyyaml==6.0.2 +pyyaml==6.0.3 # via dask -requests==2.32.4 +requests==2.32.5 # via pooch sciline @ git+https://github.com/scipp/sciline@main # via @@ -184,7 +184,7 @@ scippnexus @ git+https://github.com/scipp/scippnexus@main # -r nightly.in # essreduce # scippneutron -scipy==1.16.1 +scipy==1.16.2 # via # scippneutron # scippnexus @@ -208,20 +208,20 @@ traitlets==5.14.3 # traittypes traittypes==0.2.1 # via ipydatawidgets -typing-extensions==4.14.1 +typing-extensions==4.15.0 # via # ipython # pydantic # pydantic-core # sciline # typing-inspection -typing-inspection==0.4.1 +typing-inspection==0.4.2 # via pydantic tzdata==2025.2 # via pandas urllib3==2.5.0 # via requests -wcwidth==0.2.13 +wcwidth==0.2.14 # via prompt-toolkit widgetsnbextension==4.0.14 # via ipywidgets diff --git a/requirements/static.txt b/requirements/static.txt index 3e288557..aec8f4c8 100644 --- a/requirements/static.txt +++ b/requirements/static.txt @@ -9,17 +9,17 @@ cfgv==3.4.0 # via pre-commit distlib==0.4.0 # via virtualenv -filelock==3.18.0 +filelock==3.20.0 # via virtualenv -identify==2.6.12 +identify==2.6.15 # via pre-commit nodeenv==1.9.1 # via pre-commit -platformdirs==4.3.8 +platformdirs==4.5.0 # via virtualenv -pre-commit==4.2.0 +pre-commit==4.3.0 # via -r static.in -pyyaml==6.0.2 +pyyaml==6.0.3 # via pre-commit -virtualenv==20.33.1 +virtualenv==20.35.3 # via pre-commit diff --git a/src/ess/beer/data.py b/src/ess/beer/data.py index d3b6c934..70bd4391 100644 --- a/src/ess/beer/data.py +++ b/src/ess/beer/data.py @@ -2,79 +2,71 @@ # Copyright (c) 2025 Scipp contributors (https://github.com/scipp) """Data for tests and documentation with BEER.""" +from pathlib import Path + import scipp as sc -_version = "1" +from ess.reduce.data import make_registry __all__ = ["mcstas_duplex", "mcstas_silicon_medium_resolution"] - -def _make_pooch(): - import pooch - - return pooch.create( - path=pooch.os_cache("ess/beer"), - env="ESS_DATA_DIR", - base_url="https://public.esss.dk/groups/scipp/ess/beer/{version}/", - version=_version, - retry_if_failed=3, - registry={ - "duplex-mode07.h5": "md5:e8d44197e4bc6a84ab9265bfabd96efe", - "duplex-mode08.h5": "md5:7cd2cf86d5d98fe07097ff98b250ba9b", - "duplex-mode09.h5": "md5:ebb3f9694ffdd0949f342bd0deaaf627", - "duplex-mode10.h5": "md5:559e7fc0cce265f5102520e382ee5b26", - "duplex-mode16.h5": "md5:2ccd05832bbc8a087a731b37364b995d", - "silicon-mode09.h5": "md5:aa068d46dc7efc303b68a13e527e2607", - "mccode_quartz_mode10.h5": "md5:fd6ea529cad7cefdcb57bf57bc27668c", - "mccode_quartz_mode16.h5": "md5:b9bef04bd6e4c60a8a0d55d4d6ebb89f", - "mccode_quartz_mode7.h5": "md5:24c7006336f58c26689abec1645cfba1", - "mccode_quartz_mode8.h5": "md5:9a4606ce56a6397d05d70246d54407d6", - "mccode_quartz_mode9.h5": "md5:1394df47287ecd62bfa62c200203f214", - "silicon-dhkl.tab": "md5:59ee9ed57a7c039ce416c8df886da9cc", - "duplex-dhkl.tab": "md5:b4c6c2fcd66466ad291f306b2d6b346e", - "dhkl_quartz_nc.tab": "md5:40887d736e3acf859e44488bfd9a9213", - }, - ) - - -_pooch = _make_pooch() - - -def mcstas_duplex(mode: int) -> str: +_registry = make_registry( + "ess/beer", + version="1", + files={ + "duplex-mode07.h5": "md5:e8d44197e4bc6a84ab9265bfabd96efe", + "duplex-mode08.h5": "md5:7cd2cf86d5d98fe07097ff98b250ba9b", + "duplex-mode09.h5": "md5:ebb3f9694ffdd0949f342bd0deaaf627", + "duplex-mode10.h5": "md5:559e7fc0cce265f5102520e382ee5b26", + "duplex-mode16.h5": "md5:2ccd05832bbc8a087a731b37364b995d", + "silicon-mode09.h5": "md5:aa068d46dc7efc303b68a13e527e2607", + "mccode_quartz_mode10.h5": "md5:fd6ea529cad7cefdcb57bf57bc27668c", + "mccode_quartz_mode16.h5": "md5:b9bef04bd6e4c60a8a0d55d4d6ebb89f", + "mccode_quartz_mode7.h5": "md5:24c7006336f58c26689abec1645cfba1", + "mccode_quartz_mode8.h5": "md5:9a4606ce56a6397d05d70246d54407d6", + "mccode_quartz_mode9.h5": "md5:1394df47287ecd62bfa62c200203f214", + "silicon-dhkl.tab": "md5:59ee9ed57a7c039ce416c8df886da9cc", + "duplex-dhkl.tab": "md5:b4c6c2fcd66466ad291f306b2d6b346e", + "dhkl_quartz_nc.tab": "md5:40887d736e3acf859e44488bfd9a9213", + }, +) + + +def mcstas_duplex(mode: int) -> Path: """ Simulated intensity from duplex sample with ``mode`` chopper configuration. """ - return _pooch.fetch(f'duplex-mode{mode:02}.h5') + return _registry.get_path(f'duplex-mode{mode:02}.h5') -def mcstas_quartz(mode: int) -> str: +def mcstas_quartz(mode: int) -> Path: """ Simulated intensity from quartz sample with ``mode`` chopper configuration. """ - return _pooch.fetch(f'mccode_quartz_mode{mode}.h5') + return _registry.get_path(f'mccode_quartz_mode{mode}.h5') -def mcstas_silicon_medium_resolution() -> str: +def mcstas_silicon_medium_resolution() -> Path: """ Simulated intensity from silicon sample with medium resolution chopper configuration. """ - return _pooch.fetch('silicon-mode09.h5') + return _registry.get_path('silicon-mode09.h5') -def duplex_peaks() -> str: - return _pooch.fetch('duplex-dhkl.tab') +def duplex_peaks() -> Path: + return _registry.get_path('duplex-dhkl.tab') -def quartz_peaks() -> str: - return _pooch.fetch('dhkl_quartz_nc.tab') +def quartz_peaks() -> Path: + return _registry.get_path('dhkl_quartz_nc.tab') -def silicon_peaks() -> str: - return _pooch.fetch('silicon-dhkl.tab') +def silicon_peaks() -> Path: + return _registry.get_path('silicon-dhkl.tab') -def _read_peak_file_to_dataarray(name: str): +def _read_peak_file_to_dataarray(name: Path): with open(name) as f: return sc.array( dims='d', diff --git a/src/ess/dream/data.py b/src/ess/dream/data.py index fbdf0f21..6a3e8426 100644 --- a/src/ess/dream/data.py +++ b/src/ess/dream/data.py @@ -2,67 +2,57 @@ # Copyright (c) 2023 Scipp contributors (https://github.com/scipp) """Data for tests and documentation with DREAM.""" +from pathlib import Path from typing import Literal -_version = "2" +from ess.reduce.data import make_registry __all__ = ["get_path"] - -def _make_pooch(): - import pooch - - return pooch.create( - path=pooch.os_cache("ess/dream"), - env="ESS_DATA_DIR", - base_url="https://public.esss.dk/groups/scipp/ess/dream/{version}/", - version=_version, - registry={ - "data_dream_with_sectors.csv.zip": "md5:52ae6eb3705e5e54306a001bc0ae85d8", - "data_dream0_new_hkl_Si_pwd.csv.zip": "md5:d0ae518dc1b943bb817b3d18c354ed01", # noqa: E501 - "DREAM_nexus_sorted-2023-12-07.nxs": "md5:22824e14f6eb950d24a720b2a0e2cb66", - "DREAM_simple_pwd_workflow/data_dream_diamond_vana_container_sample_union.csv.zip": "md5:33302d0506b36aab74003b8aed4664cc", # noqa: E501 - "DREAM_simple_pwd_workflow/data_dream_diamond_vana_container_sample_union_run2.csv.zip": "md5:c7758682f978d162dcb91e47c79abb83", # noqa: E501 - "DREAM_simple_pwd_workflow/data_dream_vana_container_sample_union.csv.zip": "md5:b8bb7c4bdf74ad5f19342bced8670915", # noqa: E501 - "DREAM_simple_pwd_workflow/data_dream_vanadium.csv.zip": "md5:e5addfc06768140c76533946433fa2ec", # noqa: E501 - "DREAM_simple_pwd_workflow/data_dream_vanadium_inc_coh.csv.zip": "md5:39d1a44e248b12966b26f7c2f6c602a2", # noqa: E501 - "DREAM_simple_pwd_workflow/Cave_TOF_Monitor_diam_in_can.dat": "md5:ef24f4a4186c628574046e6629e31611", # noqa: E501 - "DREAM_simple_pwd_workflow/Cave_TOF_Monitor_van_can.dat": "md5:2cdef7ad9912652149b7e687381d2e99", # noqa: E501 - "DREAM_simple_pwd_workflow/Cave_TOF_Monitor_vana_inc_coh.dat": "md5:701d66792f20eb283a4ce76bae0c8f8f", # noqa: E501 - # BC215 - "DREAM-high-flux-tof-lookup-table.h5": "md5:1b95a359fa7b0d8b4277806ece9bf279", # noqa: E501 - "DREAM-high-flux-tof-lookup-table-BC240-new0.h5": "md5:2cc9dc802082101933429a2ea3624126", # noqa: E501 - # Smaller files for unit tests - "DREAM_simple_pwd_workflow/TEST_data_dream_diamond_vana_container_sample_union.csv.zip": "md5:405df9b5ade9d61ab71fe8d8c19bb51b", # noqa: E501 - "DREAM_simple_pwd_workflow/TEST_data_dream_vana_container_sample_union.csv.zip": "md5:20186119d1debfb0c2352f9db384cd0a", # noqa: E501 - "DREAM_simple_pwd_workflow/TEST_data_dream_vanadium.csv.zip": "md5:e5624a973f30dfe440642319c5bf0da6", # noqa: E501 - "DREAM_simple_pwd_workflow/TEST_data_dream_vanadium_inc_coh.csv.zip": "md5:a2e7756b264f65ab5ed7ff7fb5eca280", # noqa: E501 - "TEST_data_dream0_new_hkl_Si_pwd.csv.zip": "md5:df6c41f4b7b21e129915808f625828f6", # noqa: E501 - "TEST_data_dream_with_sectors.csv.zip": "md5:2a6b5e40e6b67f6c71b25373bf4b11a1", # noqa: E501 - # The TEST_DREAM_nexus_sorted-2023-12-07.nxs file was created using the - # `shrink_nexus.py` script in the `tools` folder at the top level of the - # `essdiffraction` repository. - "TEST_DREAM_nexus_sorted-2023-12-07.nxs": "md5:599b426a93c46a7b4b09a874bf288c53", # noqa: E501 - }, - ) - - -_pooch = _make_pooch() - - -def get_path(name: str, unzip: bool = False) -> str: +_registry = make_registry( + "ess/dream", + version="2", + files={ + "data_dream_with_sectors.csv.zip": "md5:52ae6eb3705e5e54306a001bc0ae85d8", + "data_dream0_new_hkl_Si_pwd.csv.zip": "md5:d0ae518dc1b943bb817b3d18c354ed01", + "DREAM_nexus_sorted-2023-12-07.nxs": "md5:22824e14f6eb950d24a720b2a0e2cb66", + "DREAM_simple_pwd_workflow/data_dream_diamond_vana_container_sample_union.csv.zip": "md5:33302d0506b36aab74003b8aed4664cc", # noqa: E501 + "DREAM_simple_pwd_workflow/data_dream_diamond_vana_container_sample_union_run2.csv.zip": "md5:c7758682f978d162dcb91e47c79abb83", # noqa: E501 + "DREAM_simple_pwd_workflow/data_dream_vana_container_sample_union.csv.zip": "md5:b8bb7c4bdf74ad5f19342bced8670915", # noqa: E501 + "DREAM_simple_pwd_workflow/data_dream_vanadium.csv.zip": "md5:e5addfc06768140c76533946433fa2ec", # noqa: E501 + "DREAM_simple_pwd_workflow/data_dream_vanadium_inc_coh.csv.zip": "md5:39d1a44e248b12966b26f7c2f6c602a2", # noqa: E501 + "DREAM_simple_pwd_workflow/Cave_TOF_Monitor_diam_in_can.dat": "md5:ef24f4a4186c628574046e6629e31611", # noqa: E501 + "DREAM_simple_pwd_workflow/Cave_TOF_Monitor_van_can.dat": "md5:2cdef7ad9912652149b7e687381d2e99", # noqa: E501 + "DREAM_simple_pwd_workflow/Cave_TOF_Monitor_vana_inc_coh.dat": "md5:701d66792f20eb283a4ce76bae0c8f8f", # noqa: E501 + # BC215 + "DREAM-high-flux-tof-lookup-table.h5": "md5:1b95a359fa7b0d8b4277806ece9bf279", + "DREAM-high-flux-tof-lookup-table-BC240-new0.h5": "md5:2cc9dc802082101933429a2ea3624126", # noqa: E501 + # Smaller files for unit tests + "DREAM_simple_pwd_workflow/TEST_data_dream_diamond_vana_container_sample_union.csv.zip": "md5:405df9b5ade9d61ab71fe8d8c19bb51b", # noqa: E501 + "DREAM_simple_pwd_workflow/TEST_data_dream_vana_container_sample_union.csv.zip": "md5:20186119d1debfb0c2352f9db384cd0a", # noqa: E501 + "DREAM_simple_pwd_workflow/TEST_data_dream_vanadium.csv.zip": "md5:e5624a973f30dfe440642319c5bf0da6", # noqa: E501 + "DREAM_simple_pwd_workflow/TEST_data_dream_vanadium_inc_coh.csv.zip": "md5:a2e7756b264f65ab5ed7ff7fb5eca280", # noqa: E501 + "TEST_data_dream0_new_hkl_Si_pwd.csv.zip": "md5:df6c41f4b7b21e129915808f625828f6", # noqa: E501 + "TEST_data_dream_with_sectors.csv.zip": "md5:2a6b5e40e6b67f6c71b25373bf4b11a1", + # The TEST_DREAM_nexus_sorted-2023-12-07.nxs file was created using the + # `shrink_nexus.py` script in the `tools` folder at the top level of the + # `essdiffraction` repository. + "TEST_DREAM_nexus_sorted-2023-12-07.nxs": "md5:599b426a93c46a7b4b09a874bf288c53", # noqa: E501 + }, +) + + +def get_path(name: str) -> Path: """ Return the path to a data file bundled with ess.dream. This function only works with example data and cannot handle paths to custom files. """ - import pooch - - return _pooch.fetch(name, processor=pooch.Unzip() if unzip else None) + return _registry.get_path(name) -def simulated_diamond_sample(*, small: bool = False) -> str: +def simulated_diamond_sample(*, small: bool = False) -> Path: """Path to a GEANT4 CSV file for a diamond sample. SciCat: @@ -114,7 +104,7 @@ def simulated_diamond_sample(*, small: bool = False) -> str: ) -def simulated_vanadium_sample(*, small: bool = False) -> str: +def simulated_vanadium_sample(*, small: bool = False) -> Path: """Path to a GEANT4 CSV file for a vanadium sample. SciCat: @@ -156,7 +146,7 @@ def simulated_vanadium_sample(*, small: bool = False) -> str: ) -def simulated_vanadium_sample_incoherent(*, small: bool = False) -> str: +def simulated_vanadium_sample_incoherent(*, small: bool = False) -> Path: """Path to a GEANT4 CSV file for a vanadium sample with only incoherent scattering. SciCat: @@ -190,7 +180,7 @@ def simulated_vanadium_sample_incoherent(*, small: bool = False) -> str: return get_path(f"DREAM_simple_pwd_workflow/{prefix}data_dream_vanadium.csv.zip") -def simulated_empty_can(*, small: bool = False) -> str: +def simulated_empty_can(*, small: bool = False) -> Path: """Path to a GEANT4 CSV file for an empty can measurement. SciCat: @@ -231,7 +221,7 @@ def simulated_empty_can(*, small: bool = False) -> str: ) -def simulated_monitor_diamond_sample() -> str: +def simulated_monitor_diamond_sample() -> Path: """Path to a Mcstas file for a monitor for the diamond measurement. SciCat: @@ -244,7 +234,7 @@ def simulated_monitor_diamond_sample() -> str: return get_path("DREAM_simple_pwd_workflow/Cave_TOF_Monitor_diam_in_can.dat") -def simulated_monitor_vanadium_sample() -> str: +def simulated_monitor_vanadium_sample() -> Path: """Path to a Mcstas file for a monitor for the vanadium measurement. SciCat: @@ -257,7 +247,7 @@ def simulated_monitor_vanadium_sample() -> str: return get_path("DREAM_simple_pwd_workflow/Cave_TOF_Monitor_vana_inc_coh.dat") -def simulated_monitor_empty_can() -> str: +def simulated_monitor_empty_can() -> Path: """Path to a Mcstas file for a monitor for the empty can measurement. SciCat: @@ -270,7 +260,7 @@ def simulated_monitor_empty_can() -> str: return get_path("DREAM_simple_pwd_workflow/Cave_TOF_Monitor_van_can.dat") -def tof_lookup_table_high_flux(bc: Literal[215, 240] = 215) -> str: +def tof_lookup_table_high_flux(bc: Literal[215, 240] = 215) -> Path: """Path to a HDF5 file containing a lookup table for high-flux ToF. The table was created using the ``tof`` package and the chopper settings for the diff --git a/src/ess/snspowder/powgen/data.py b/src/ess/snspowder/powgen/data.py index 67065382..276f4ed1 100644 --- a/src/ess/snspowder/powgen/data.py +++ b/src/ess/snspowder/powgen/data.py @@ -3,6 +3,8 @@ """Utilities for loading example data for POWGEN.""" +from pathlib import Path + import scipp as sc from ess.powder.types import ( @@ -16,73 +18,53 @@ RawDataAndMetadata, RunType, ) - -_version = "1" - - -def _make_pooch(): - import pooch - - return pooch.create( - path=pooch.os_cache("ess/powgen"), - env="ESS_DATA_DIR", - base_url="https://public.esss.dk/groups/scipp/ess/powgen/{version}/", - version=_version, - registry={ - # Files loadable with Mantid - "PG3_4844_event.nxs": "md5:d5ae38871d0a09a28ae01f85d969de1e", - "PG3_4866_event.nxs": "md5:3d543bc6a646e622b3f4542bc3435e7e", - "PG3_5226_event.nxs": "md5:58b386ebdfeb728d34fd3ba00a2d4f1e", - "PG3_FERNS_d4832_2011_08_24.cal": "md5:c181221ebef9fcf30114954268c7a6b6", - # Zipped Scipp HDF5 files - "PG3_4844_event.zip": "md5:a644c74f5e740385469b67431b690a3e", - "PG3_4866_event.zip": "md5:5bc49def987f0faeb212a406b92b548e", - "PG3_FERNS_d4832_2011_08_24.zip": "md5:0fef4ed5f61465eaaa3f87a18f5bb80d", - "PG3_FERNS_d4832_2011_08_24_spectrum.h5": "md5:7aee0b40deee22d57e21558baa7a6a1a", # noqa: E501 - # Smaller files for unit tests - "TEST_PG3_4844_event.h5": "md5:03ea1018c825b0d90a67b4fc7932ea3d", - "TEST_PG3_4866_event.h5": "md5:4a8df454871cec7de9ac624ebdc97095", - "TEST_PG3_FERNS_d4832_2011_08_24_spectrum.h5": "md5:b577a054e9aa7b372df79bf4489947d0", # noqa: E501 - }, - ) - - -_pooch = _make_pooch() - - -def _get_path(name: str) -> str: - """ - Return the path to a data file bundled with scippneutron. - - This function only works with example data and cannot handle - paths to custom files. - """ - import pooch - - if name.endswith(".zip"): - (path,) = _pooch.fetch(name, processor=pooch.Unzip()) - else: - path = _pooch.fetch(name) - return path +from ess.reduce.data import Entry, make_registry + +_registry = make_registry( + "ess/powgen", + version="1", + files={ + # Files loadable with Mantid + "PG3_4844_event.nxs": "md5:d5ae38871d0a09a28ae01f85d969de1e", + "PG3_4866_event.nxs": "md5:3d543bc6a646e622b3f4542bc3435e7e", + "PG3_5226_event.nxs": "md5:58b386ebdfeb728d34fd3ba00a2d4f1e", + "PG3_FERNS_d4832_2011_08_24.cal": "md5:c181221ebef9fcf30114954268c7a6b6", + # Zipped Scipp HDF5 files + "PG3_4844_event.zip": Entry( + alg="md5", chk="a644c74f5e740385469b67431b690a3e", unzip=True + ), + "PG3_4866_event.zip": Entry( + alg="md5", chk="5bc49def987f0faeb212a406b92b548e", unzip=True + ), + "PG3_FERNS_d4832_2011_08_24.zip": Entry( + alg="md5", chk="0fef4ed5f61465eaaa3f87a18f5bb80d", unzip=True + ), + "PG3_FERNS_d4832_2011_08_24_spectrum.h5": "md5:7aee0b40deee22d57e21558baa7a6a1a", # noqa: E501 + # Smaller files for unit tests + "TEST_PG3_4844_event.h5": "md5:03ea1018c825b0d90a67b4fc7932ea3d", + "TEST_PG3_4866_event.h5": "md5:4a8df454871cec7de9ac624ebdc97095", + "TEST_PG3_FERNS_d4832_2011_08_24_spectrum.h5": "md5:b577a054e9aa7b372df79bf4489947d0", # noqa: E501 + }, +) -def powgen_tutorial_mantid_sample_file() -> str: - return _get_path("PG3_4844_event.nxs") +def powgen_tutorial_mantid_sample_file() -> Path: + return _registry.get_path("PG3_4844_event.nxs") -def powgen_tutorial_mantid_vanadium_file() -> str: - return _get_path("PG3_4866_event.nxs") +def powgen_tutorial_mantid_vanadium_file() -> Path: + return _registry.get_path("PG3_4866_event.nxs") -def powgen_tutorial_mantid_empty_instrument_file() -> str: - return _get_path("PG3_5226_event.nxs") +def powgen_tutorial_mantid_empty_instrument_file() -> Path: + return _registry.get_path("PG3_5226_event.nxs") -def powgen_tutorial_mantid_calibration_file() -> str: - return _get_path("PG3_FERNS_d4832_2011_08_24.cal") +def powgen_tutorial_mantid_calibration_file() -> Path: + return _registry.get_path("PG3_FERNS_d4832_2011_08_24.cal") -def powgen_tutorial_sample_file(*, small: bool = False) -> str: +def powgen_tutorial_sample_file(*, small: bool = False) -> Path: """ Return the path to the POWGEN sample file. @@ -116,10 +98,10 @@ def foldme(x, dim): """ prefix = "TEST_" if small else "" ext = ".h5" if small else ".zip" - return _get_path(f"{prefix}PG3_4844_event{ext}") + return _registry.get_path(f"{prefix}PG3_4844_event{ext}") -def powgen_tutorial_vanadium_file(*, small: bool = False) -> str: +def powgen_tutorial_vanadium_file(*, small: bool = False) -> Path: """ Return the path to the POWGEN vanadium file. @@ -151,10 +133,10 @@ def foldme(x, dim): """ prefix = "TEST_" if small else "" ext = ".h5" if small else ".zip" - return _get_path(f"{prefix}PG3_4866_event{ext}") + return _registry.get_path(f"{prefix}PG3_4866_event{ext}") -def powgen_tutorial_calibration_file(*, small: bool = False) -> str: +def powgen_tutorial_calibration_file(*, small: bool = False) -> Path: """ Return the path to the POWGEN calibration file. @@ -185,7 +167,7 @@ def foldme(x, dim): sc.io.save_hdf5(small, 'TEST_PG3_FERNS_d4832_2011_08_24_spectrum.h5') """ prefix = "TEST_" if small else "" - return _get_path(f"{prefix}PG3_FERNS_d4832_2011_08_24_spectrum.h5") + return _registry.get_path(f"{prefix}PG3_FERNS_d4832_2011_08_24_spectrum.h5") def pooch_load(filename: Filename[RunType]) -> RawDataAndMetadata[RunType]: From 32c7775500857d2d4216712bfffea58c9e15a64e Mon Sep 17 00:00:00 2001 From: Jan-Lukas Wynen Date: Tue, 14 Oct 2025 13:05:14 +0200 Subject: [PATCH 2/3] Require essreduce >= 25.10.1 --- pyproject.toml | 2 +- requirements/base.in | 2 +- requirements/base.txt | 8 ++++---- requirements/basetest.txt | 2 +- requirements/ci.txt | 2 +- requirements/docs.txt | 4 ++-- requirements/nightly.txt | 6 +++--- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 2818a77c..f0217cc4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,7 +31,7 @@ requires-python = ">=3.11" # Make sure to list one dependency per line. dependencies = [ "dask>=2022.1.0", - "essreduce>=25.10.0", + "essreduce>=25.10.1", "graphviz", "numpy>=1.25", "plopp>=25.07.0", diff --git a/requirements/base.in b/requirements/base.in index bd1182ad..2b63d77f 100644 --- a/requirements/base.in +++ b/requirements/base.in @@ -3,7 +3,7 @@ # --- END OF CUSTOM SECTION --- # The following was generated by 'tox -e deps', DO NOT EDIT MANUALLY! dask>=2022.1.0 -essreduce>=25.10.0 +essreduce>=25.10.1 graphviz numpy>=1.25 plopp>=25.07.0 diff --git a/requirements/base.txt b/requirements/base.txt index 750ff85f..ed25765b 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,4 +1,4 @@ -# SHA1:96ea0250e7f1afb29436f906350ce2458536f7e3 +# SHA1:dafd19c2a4469467ec27644d1e4d28d14f6e4e7b # # This file was generated by pip-compile-multi. # To update, run: @@ -29,7 +29,7 @@ dnspython==2.8.0 # via email-validator email-validator==2.3.0 # via scippneutron -essreduce==25.10.0 +essreduce==25.10.1 # via -r base.in executing==2.2.1 # via stack-data @@ -115,9 +115,9 @@ ptyprocess==0.7.0 # via pexpect pure-eval==0.2.3 # via stack-data -pydantic==2.12.0 +pydantic==2.12.1 # via scippneutron -pydantic-core==2.41.1 +pydantic-core==2.41.3 # via pydantic pygments==2.19.2 # via diff --git a/requirements/basetest.txt b/requirements/basetest.txt index bef50e80..2b33d55a 100644 --- a/requirements/basetest.txt +++ b/requirements/basetest.txt @@ -9,7 +9,7 @@ asttokens==3.0.0 # via stack-data certifi==2025.10.5 # via requests -charset-normalizer==3.4.3 +charset-normalizer==3.4.4 # via requests comm==0.2.3 # via ipywidgets diff --git a/requirements/ci.txt b/requirements/ci.txt index fbddba98..0e48c7f7 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -11,7 +11,7 @@ certifi==2025.10.5 # via requests chardet==5.2.0 # via tox -charset-normalizer==3.4.3 +charset-normalizer==3.4.4 # via requests colorama==0.4.6 # via tox diff --git a/requirements/docs.txt b/requirements/docs.txt index 1ddc94cc..bb837c8d 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -28,7 +28,7 @@ bleach[css]==6.2.0 # via nbconvert certifi==2025.10.5 # via requests -charset-normalizer==3.4.3 +charset-normalizer==3.4.4 # via requests debugpy==1.8.17 # via ipykernel @@ -136,7 +136,7 @@ pyzmq==27.1.0 # via # ipykernel # jupyter-client -referencing==0.36.2 +referencing==0.37.0 # via # jsonschema # jsonschema-specifications diff --git a/requirements/nightly.txt b/requirements/nightly.txt index 9ad14c0c..2f3be96f 100644 --- a/requirements/nightly.txt +++ b/requirements/nightly.txt @@ -14,7 +14,7 @@ asttokens==3.0.0 # via stack-data certifi==2025.10.5 # via requests -charset-normalizer==3.4.3 +charset-normalizer==3.4.4 # via requests click==8.3.0 # via dask @@ -138,9 +138,9 @@ ptyprocess==0.7.0 # via pexpect pure-eval==0.2.3 # via stack-data -pydantic==2.12.0 +pydantic==2.12.1 # via scippneutron -pydantic-core==2.41.1 +pydantic-core==2.41.3 # via pydantic pygments==2.19.2 # via From 6b1bd216f1269be9932b9d03cf7ac376bcb4b25a Mon Sep 17 00:00:00 2001 From: Jan-Lukas Wynen Date: Tue, 14 Oct 2025 13:45:04 +0200 Subject: [PATCH 3/3] Convert Paht to str --- docs/user-guide/dream/workflow-widget-dream.ipynb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/user-guide/dream/workflow-widget-dream.ipynb b/docs/user-guide/dream/workflow-widget-dream.ipynb index 7070389c..f214e992 100644 --- a/docs/user-guide/dream/workflow-widget-dream.ipynb +++ b/docs/user-guide/dream/workflow-widget-dream.ipynb @@ -65,8 +65,8 @@ "pbox = wfw.parameter_box\n", "pbox.parameter_refresh_button.click()\n", "# Set parameters\n", - "pbox._input_widgets[Filename[SampleRun]].children[0].value = dream.data.simulated_diamond_sample()\n", - "pbox._input_widgets[Filename[VanadiumRun]].children[0].value = dream.data.simulated_vanadium_sample()\n", + "pbox._input_widgets[Filename[SampleRun]].children[0].value = str(dream.data.simulated_diamond_sample())\n", + "pbox._input_widgets[Filename[VanadiumRun]].children[0].value = str(dream.data.simulated_vanadium_sample())\n", "pbox._input_widgets[InstrumentConfiguration].value = InstrumentConfiguration.high_flux\n", "pbox._input_widgets[DspacingBins].fields[\"stop\"].value = 2.3434\n", "# Run the workflow\n", @@ -135,7 +135,8 @@ "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython3" + "pygments_lexer": "ipython3", + "version": "3.11.10" } }, "nbformat": 4,