diff --git a/.copier-answers.yml b/.copier-answers.yml index 56fd229..0739780 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,15 +1,15 @@ # Changes here will be overwritten by Copier; NEVER EDIT MANUALLY -_commit: 3f79959 +_commit: fb67133 _src_path: gh:scipp/copier_template description: 'Python package to read McStas data and export as python objects in different formats or as other files. ' -max_python: '3.12' +max_python: '3.13' min_python: '3.10' namespace_package: '' -nightly_deps: scipp,scippnexus,mcstasscript +nightly_deps: scipp,scippnexus,mccode-dev/mcstasscript@master orgname: mccode-dev prettyname: McStasToX projectname: mcstastox diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index f694327..2e53fc9 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -15,6 +15,11 @@ on: default: '' required: false type: string + linkcheck: + description: 'Run the link checker. If not set the link checker will not be run.' + default: false + required: false + type: boolean workflow_call: inputs: publish: @@ -61,7 +66,7 @@ jobs: init-shell: bash environment-name: mcstas create-args: >- - python=3.10 + python=3.11 # Manually building the docs. # We(I) couldn't figure out how we do it with `tox` yet... @@ -83,8 +88,9 @@ jobs: # Cleaned up the docs. # - run: tox -e docs # if: ${{ inputs.version == '' }} - - run: tox -e linkcheck - if: ${{ inputs.linkcheck }} + # Skipping linkcheck for now, as it is not working properly with the current setup. + # - run: tox -e linkcheck + # if: ${{ inputs.linkcheck }} - uses: actions/upload-artifact@v4 id: artifact-upload-step with: diff --git a/.github/workflows/python-version-ci b/.github/workflows/python-version-ci index c8cfe39..2c07333 100644 --- a/.github/workflows/python-version-ci +++ b/.github/workflows/python-version-ci @@ -1 +1 @@ -3.10 +3.11 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0f3f9a9..4f913e7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -36,6 +36,8 @@ repos: - id: codespell additional_dependencies: - tomli + exclude_types: + - svg - repo: https://github.com/pre-commit/pygrep-hooks rev: v1.10.0 hooks: diff --git a/pyproject.toml b/pyproject.toml index afdcd52..9fdf679 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,6 +20,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Topic :: Scientific/Engineering", "Typing :: Typed", ] diff --git a/requirements/base.txt b/requirements/base.txt index 1d9201b..c1f7d55 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,9 +1,9 @@ # SHA1:71599ba43d91f48fe12c77a04387fed02d7e5c52 # -# This file is autogenerated by pip-compile-multi +# This file was generated by pip-compile-multi. # To update, run: # -# pip-compile-multi +# requirements upgrade # asttokens==3.0.0 # via stack-data @@ -17,22 +17,22 @@ decorator==5.2.1 # via ipython dill==0.3.5.1 # via libpyvinyl -exceptiongroup==1.2.2 - # via ipython executing==2.2.0 # via stack-data flexcache==0.3 # via pint flexparser==0.4 # via pint -fonttools==4.57.0 +fonttools==4.58.1 # via matplotlib h5py==3.13.0 # via # -r base.in # libpyvinyl -ipython==8.36.0 +ipython==9.3.0 # via ipywidgets +ipython-pygments-lexers==1.1.1 + # via ipython ipywidgets==8.1.7 # via mcstasscript jedi==0.19.2 @@ -47,13 +47,13 @@ kiwisolver==1.4.8 # via matplotlib libpyvinyl==1.3.0 # via mcstasscript -matplotlib==3.10.1 +matplotlib==3.10.3 # via mcstasscript matplotlib-inline==0.1.7 # via ipython mcstasscript==0.0.74 # via -r base.in -numpy==2.2.5 +numpy==2.2.6 # via # -r base.in # contourpy @@ -73,7 +73,7 @@ pillow==11.2.1 # via matplotlib pint==0.24.4 # via libpyvinyl -platformdirs==4.3.7 +platformdirs==4.3.8 # via pint prompt-toolkit==3.0.51 # via ipython @@ -82,16 +82,18 @@ ptyprocess==0.7.0 pure-eval==0.2.3 # via stack-data pygments==2.19.1 - # via ipython + # via + # ipython + # ipython-pygments-lexers pyparsing==3.2.3 # via matplotlib python-dateutil==2.9.0.post0 # via matplotlib pyyaml==6.0.2 # via mcstasscript -scipp==25.5.0 +scipp==25.5.1 # via -r base.in -scipy==1.15.2 +scipy==1.15.3 # via libpyvinyl six==1.17.0 # via python-dateutil diff --git a/requirements/basetest.txt b/requirements/basetest.txt index 2b2b59b..5aa8a75 100644 --- a/requirements/basetest.txt +++ b/requirements/basetest.txt @@ -1,19 +1,15 @@ # SHA1:0eaa389e1fdb3a1917c0f987514bd561be5718ee # -# This file is autogenerated by pip-compile-multi +# This file was generated by pip-compile-multi. # To update, run: # -# pip-compile-multi +# requirements upgrade # -exceptiongroup==1.2.2 - # via pytest iniconfig==2.1.0 # via pytest packaging==25.0 # via pytest -pluggy==1.5.0 +pluggy==1.6.0 # via pytest pytest==8.3.5 # via -r basetest.in -tomli==2.2.1 - # via pytest diff --git a/requirements/ci.txt b/requirements/ci.txt index 27027cd..e2ef6a5 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -1,11 +1,11 @@ # SHA1:6344d52635ea11dca331a3bc6eb1833c4c64d585 # -# This file is autogenerated by pip-compile-multi +# This file was generated by pip-compile-multi. # To update, run: # -# pip-compile-multi +# requirements upgrade # -cachetools==5.5.2 +cachetools==6.0.0 # via tox certifi==2025.4.26 # via requests @@ -32,27 +32,21 @@ packaging==25.0 # -r ci.in # pyproject-api # tox -platformdirs==4.3.7 +platformdirs==4.3.8 # via # tox # virtualenv -pluggy==1.5.0 +pluggy==1.6.0 # via tox -pyproject-api==1.9.0 +pyproject-api==1.9.1 # via tox requests==2.32.3 # via -r ci.in smmap==5.0.2 # via gitdb -tomli==2.2.1 - # via - # pyproject-api - # tox -tox==4.25.0 +tox==4.26.0 # via -r ci.in -typing-extensions==4.13.2 - # via tox urllib3==2.4.0 # via requests -virtualenv==20.31.1 +virtualenv==20.31.2 # via tox diff --git a/requirements/dev.txt b/requirements/dev.txt index e53c2f6..7b0c4e0 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -1,9 +1,9 @@ # SHA1:efd19a3a98c69fc3d6d6233ed855de7e4a208f74 # -# This file is autogenerated by pip-compile-multi +# This file was generated by pip-compile-multi. # To update, run: # -# pip-compile-multi +# requirements upgrade # -r base.txt -r ci.txt @@ -28,13 +28,13 @@ async-lru==2.0.5 # via jupyterlab cffi==1.17.1 # via argon2-cffi-bindings -click==8.1.8 +click==8.2.1 # via # pip-compile-multi # pip-tools copier==9.7.1 # via -r dev.in -dunamai==1.23.1 +dunamai==1.24.1 # via copier fqdn==1.5.1 # via jsonschema @@ -54,7 +54,7 @@ json5==0.12.0 # via jupyterlab-server jsonpointer==3.0.0 # via jsonschema -jsonschema[format-nongpl]==4.23.0 +jsonschema[format-nongpl]==4.24.0 # via # jupyter-events # jupyterlab-server @@ -63,7 +63,7 @@ jupyter-events==0.12.0 # via jupyter-server jupyter-lsp==2.2.5 # via jupyterlab -jupyter-server==2.15.0 +jupyter-server==2.16.0 # via # jupyter-lsp # jupyterlab @@ -71,7 +71,7 @@ jupyter-server==2.15.0 # notebook-shim jupyter-server-terminals==0.5.3 # via jupyter-server -jupyterlab==4.4.1 +jupyterlab==4.4.3 # via -r dev.in jupyterlab-server==2.27.3 # via jupyterlab @@ -79,19 +79,17 @@ notebook-shim==0.2.4 # via jupyterlab overrides==7.7.0 # via jupyter-server -pathspec==0.12.1 - # via copier -pip-compile-multi==3.0.0 +pip-compile-multi==3.1.0 # via -r dev.in pip-tools==7.4.1 # via pip-compile-multi plumbum==1.9.0 # via copier -prometheus-client==0.21.1 +prometheus-client==0.22.0 # via jupyter-server pycparser==2.22 # via cffi -pydantic==2.11.4 +pydantic==2.11.5 # via copier pydantic-core==2.33.2 # via pydantic @@ -117,9 +115,9 @@ terminado==0.18.1 # jupyter-server-terminals toposort==1.10 # via pip-compile-multi -types-python-dateutil==2.9.0.20241206 +types-python-dateutil==2.9.0.20250516 # via arrow -typing-inspection==0.4.0 +typing-inspection==0.4.1 # via pydantic uri-template==1.3.0 # via jsonschema diff --git a/requirements/docs.in b/requirements/docs.in index 56b1460..6eb2b4d 100644 --- a/requirements/docs.in +++ b/requirements/docs.in @@ -11,3 +11,4 @@ sphinx-design matplotlib plopp[all] pythreejs # For instrument view. +tornado>=6.5 diff --git a/requirements/docs.txt b/requirements/docs.txt index eba42fd..edf55ad 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -1,9 +1,9 @@ -# SHA1:cae1ff02569954d20815f31620bae3df07ce2023 +# SHA1:0d52e50f6b796c56d033d1a298f9f2eb4686aed2 # -# This file is autogenerated by pip-compile-multi +# This file was generated by pip-compile-multi. # To update, run: # -# pip-compile-multi +# requirements upgrade # -r base.txt accessible-pygments==0.0.5 @@ -60,7 +60,7 @@ jinja2==3.1.6 # nbconvert # nbsphinx # sphinx -jsonschema==4.23.0 +jsonschema==4.24.0 # via nbformat jsonschema-specifications==2025.4.1 # via jsonschema @@ -68,7 +68,7 @@ jupyter-client==8.6.3 # via # ipykernel # nbclient -jupyter-core==5.7.2 +jupyter-core==5.8.1 # via # ipykernel # jupyter-client @@ -93,7 +93,7 @@ mdurl==0.1.2 # via markdown-it-py mistune==3.1.3 # via nbconvert -mpltoolbox==25.4.0 +mpltoolbox==25.5.0 # via plopp myst-parser==4.0.1 # via -r docs.in @@ -112,7 +112,7 @@ nest-asyncio==1.6.0 # via ipykernel pandocfilters==1.5.1 # via nbconvert -plopp[all]==25.4.1 +plopp[all]==25.6.0 # via -r docs.in psutil==7.0.0 # via ipykernel @@ -132,11 +132,11 @@ referencing==0.36.2 # jsonschema-specifications requests==2.32.3 # via sphinx -rpds-py==0.24.0 +rpds-py==0.25.1 # via # jsonschema # referencing -snowballstemmer==2.2.0 +snowballstemmer==3.0.1 # via sphinx soupsieve==2.7 # via beautifulsoup4 @@ -169,10 +169,9 @@ sphinxcontrib-serializinghtml==2.0.0 # via sphinx tinycss2==1.4.0 # via bleach -tomli==2.2.1 - # via sphinx -tornado==6.4.2 +tornado==6.5.1 # via + # -r docs.in # ipykernel # jupyter-client traittypes==0.2.1 diff --git a/requirements/make_base.py b/requirements/make_base.py index 2cda547..38845b9 100644 --- a/requirements/make_base.py +++ b/requirements/make_base.py @@ -56,6 +56,12 @@ def as_nightly(repo: str) -> str: org, repo = repo.split("/") else: org = "scipp" + + if "@" in repo: + repo, branch = repo.split("@") + else: + branch = "main" + if repo == "scipp": # With the standard pip resolver index-url takes precedence over # extra-index-url but with uv it's reversed, so if we move to tox-uv @@ -66,7 +72,7 @@ def as_nightly(repo: str) -> str: "--extra-index-url=https://pypi.org/simple\n" "--pre" ) - return f"{repo} @ git+https://github.com/{org}/{repo}@main" + return f"{repo} @ git+https://github.com/{org}/{repo}@{branch}" nightly = tuple(args.nightly.split(",") if args.nightly else []) diff --git a/requirements/mypy.txt b/requirements/mypy.txt index 77e99ca..bc58d80 100644 --- a/requirements/mypy.txt +++ b/requirements/mypy.txt @@ -1,12 +1,14 @@ # SHA1:859ef9c15e5e57c6c91510133c01f5751feee941 # -# This file is autogenerated by pip-compile-multi +# This file was generated by pip-compile-multi. # To update, run: # -# pip-compile-multi +# requirements upgrade # -r test.txt -mypy==1.15.0 +mypy==1.16.0 # via -r mypy.in mypy-extensions==1.1.0 # via mypy +pathspec==0.12.1 + # via mypy diff --git a/requirements/nightly.in b/requirements/nightly.in index 7e6d320..4601b9a 100644 --- a/requirements/nightly.in +++ b/requirements/nightly.in @@ -9,3 +9,4 @@ scipp --extra-index-url=https://pypi.org/simple --pre scippnexus @ git+https://github.com/scipp/scippnexus@main +mcstasscript @ git+https://github.com/mccode-dev/mcstasscript@master diff --git a/requirements/nightly.txt b/requirements/nightly.txt index 4ca8056..1334e40 100644 --- a/requirements/nightly.txt +++ b/requirements/nightly.txt @@ -1,44 +1,139 @@ -# SHA1:4dd742f716575e8b2a483edcff49618eff1db3c2 +# SHA1:bc3ab60b732fb6e1ee4a061b6f9f425d20aab628 # -# This file is autogenerated by pip-compile-multi +# This file was generated by pip-compile-multi. # To update, run: # -# pip-compile-multi +# requirements upgrade # --index-url https://pypi.anaconda.org/scipp-nightly-wheels/simple/ --extra-index-url https://pypi.org/simple -exceptiongroup==1.2.2 - # via pytest +asttokens==3.0.0 + # via stack-data +comm==0.2.2 + # via ipywidgets +contourpy==1.3.2 + # via matplotlib +cycler==0.12.1 + # via matplotlib +decorator==5.2.1 + # via ipython +dill==0.3.5.1 + # via libpyvinyl +executing==2.2.0 + # via stack-data +flexcache==0.3 + # via pint +flexparser==0.4 + # via pint +fonttools==4.58.1 + # via matplotlib h5py==3.13.0 # via # -r nightly.in + # libpyvinyl # scippnexus iniconfig==2.1.0 # via pytest -numpy==2.2.5 +ipython==9.3.0 + # via ipywidgets +ipython-pygments-lexers==1.1.1 + # via ipython +ipywidgets==8.1.7 + # via mcstasscript +jedi==0.19.2 + # via ipython +json-tricks==3.17.3 + # via libpyvinyl +jsons==1.6.3 + # via libpyvinyl +jupyterlab-widgets==3.0.15 + # via ipywidgets +kiwisolver==1.4.8 + # via matplotlib +libpyvinyl==1.3.0 + # via mcstasscript +matplotlib==3.10.3 + # via mcstasscript +matplotlib-inline==0.1.7 + # via ipython +mcstasscript @ git+https://github.com/mccode-dev/mcstasscript@master + # via -r nightly.in +numpy==2.3.0rc1 # via # -r nightly.in + # contourpy # h5py + # libpyvinyl + # matplotlib + # mcstasscript # scipp # scipy packaging==25.0 + # via + # matplotlib + # pytest +parso==0.8.4 + # via jedi +pexpect==4.9.0 + # via ipython +pillow==11.2.1 + # via matplotlib +pint==0.24.4 + # via libpyvinyl +platformdirs==4.3.8 + # via pint +pluggy==1.6.0 # via pytest -pluggy==1.5.0 - # via pytest +prompt-toolkit==3.0.51 + # via ipython +ptyprocess==0.7.0 + # via pexpect +pure-eval==0.2.3 + # via stack-data +pygments==2.19.1 + # via + # ipython + # ipython-pygments-lexers +pyparsing==3.2.3 + # via matplotlib pytest==8.3.5 # via -r nightly.in python-dateutil==2.9.0.post0 - # via scippnexus + # via + # matplotlib + # scippnexus +pyyaml==6.0.2 + # via mcstasscript scipp==100.0.0.dev0 # via # -r nightly.in # scippnexus scippnexus @ git+https://github.com/scipp/scippnexus@main # via -r nightly.in -scipy==1.15.2 - # via scippnexus +scipy==1.16.0rc1 + # via + # libpyvinyl + # scippnexus six==1.17.0 # via python-dateutil -tomli==2.2.1 - # via pytest +stack-data==0.6.3 + # via ipython +traitlets==5.14.3 + # via + # comm + # ipython + # ipywidgets + # matplotlib-inline +typing-extensions==4.14.0rc1 + # via + # flexcache + # flexparser + # ipython + # pint +typish==1.9.3 + # via jsons +wcwidth==0.2.13 + # via prompt-toolkit +widgetsnbextension==4.0.14 + # via ipywidgets diff --git a/requirements/static.txt b/requirements/static.txt index 3b11f10..7dbd603 100644 --- a/requirements/static.txt +++ b/requirements/static.txt @@ -1,9 +1,9 @@ # SHA1:5a0b1bb22ae805d8aebba0f3bf05ab91aceae0d8 # -# This file is autogenerated by pip-compile-multi +# This file was generated by pip-compile-multi. # To update, run: # -# pip-compile-multi +# requirements upgrade # cfgv==3.4.0 # via pre-commit @@ -11,15 +11,15 @@ distlib==0.3.9 # via virtualenv filelock==3.18.0 # via virtualenv -identify==2.6.10 +identify==2.6.12 # via pre-commit nodeenv==1.9.1 # via pre-commit -platformdirs==4.3.7 +platformdirs==4.3.8 # via virtualenv pre-commit==4.2.0 # via -r static.in pyyaml==6.0.2 # via pre-commit -virtualenv==20.31.1 +virtualenv==20.31.2 # via pre-commit diff --git a/requirements/test.txt b/requirements/test.txt index 3c7454d..6817392 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,9 +1,9 @@ # SHA1:ef2ee9576d8a9e65b44e2865a26887eed3fc49d1 # -# This file is autogenerated by pip-compile-multi +# This file was generated by pip-compile-multi. # To update, run: # -# pip-compile-multi +# requirements upgrade # -r base.txt -r basetest.txt diff --git a/requirements/wheels.txt b/requirements/wheels.txt index 21d3cb0..231e8f9 100644 --- a/requirements/wheels.txt +++ b/requirements/wheels.txt @@ -1,9 +1,9 @@ # SHA1:80754af91bfb6d1073585b046fe0a474ce868509 # -# This file is autogenerated by pip-compile-multi +# This file was generated by pip-compile-multi. # To update, run: # -# pip-compile-multi +# requirements upgrade # build==1.2.2.post1 # via -r wheels.in @@ -11,5 +11,3 @@ packaging==25.0 # via build pyproject-hooks==1.2.0 # via build -tomli==2.2.1 - # via build diff --git a/tox.ini b/tox.ini index adb8143..416b0b4 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py310 +envlist = py310,py311 isolated_build = true [testenv] @@ -70,5 +70,5 @@ deps = pip==24.2 skip_install = true changedir = requirements -commands = python ./make_base.py --nightly scipp,scippnexus,mcstasscript +commands = python ./make_base.py --nightly scipp,scippnexus,mccode-dev/mcstasscript@master pip-compile-multi -d . --backtracking --annotate-index