diff --git a/.copier-answers.yml b/.copier-answers.yml index acaaed37..306bd5d7 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,9 +1,9 @@ # Changes here will be overwritten by Copier; NEVER EDIT MANUALLY -_commit: 3561fcd +_commit: 024a41b _src_path: gh:scipp/copier_template description: Reflectometry data reduction for the European Spallation Source max_python: '3.13' -min_python: '3.10' +min_python: '3.11' namespace_package: ess nightly_deps: plopp,sciline,scippneutron,scippnexus,scipp orgname: scipp diff --git a/.github/workflows/python-version-ci b/.github/workflows/python-version-ci index c8cfe395..2c073331 100644 --- a/.github/workflows/python-version-ci +++ b/.github/workflows/python-version-ci @@ -1 +1 @@ -3.10 +3.11 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f88b3447..66b8a942 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,29 +10,6 @@ defaults: shell: bash -l {0} # required for conda env jobs: - build_conda: - name: Conda build - runs-on: 'ubuntu-24.04' - - steps: - - uses: actions/checkout@v4 - with: - submodules: true - fetch-depth: 0 # history required so setuptools_scm can determine version - - - uses: mamba-org/setup-micromamba@v1 - with: - environment-name: build-env - create-args: >- - conda-build - boa - - run: conda mambabuild --channel conda-forge --channel scipp --no-anaconda-upload --override-channels --output-folder conda/package conda - - - uses: actions/upload-artifact@v4 - with: - name: conda-package-noarch - path: conda/package/noarch/*.tar.bz2 - build_wheels: name: Wheels runs-on: 'ubuntu-24.04' @@ -60,7 +37,7 @@ jobs: upload_pypi: name: Deploy PyPI - needs: [build_wheels, build_conda] + needs: [build_wheels] runs-on: 'ubuntu-24.04' environment: release permissions: @@ -70,25 +47,8 @@ jobs: - uses: actions/download-artifact@v4 - uses: pypa/gh-action-pypi-publish@v1.12.4 - upload_conda: - name: Deploy Conda - needs: [build_wheels, build_conda] - runs-on: 'ubuntu-24.04' - if: github.event_name == 'release' && github.event.action == 'published' - - steps: - - uses: actions/download-artifact@v4 - - uses: mamba-org/setup-micromamba@v1 - with: - environment-name: upload-env - # frozen python due to breaking removal of 'imp' in 3.12 - create-args: >- - anaconda-client - 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] + needs: [upload_pypi] uses: ./.github/workflows/docs.yml with: publish: ${{ github.event_name == 'release' && github.event.action == 'published' }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f8e71574..7bc8c5c1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,7 +10,6 @@ repos: - id: check-merge-conflict - id: check-toml - id: check-yaml - exclude: conda/meta.yaml - id: detect-private-key - id: trailing-whitespace args: [ --markdown-linebreak-ext=md ] diff --git a/.python-version b/.python-version index c8cfe395..2c073331 100644 --- a/.python-version +++ b/.python-version @@ -1 +1 @@ -3.10 +3.11 diff --git a/README.md b/README.md index b9d8c114..08da2752 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE_OF_CONDUCT.md) [![PyPI badge](http://img.shields.io/pypi/v/essreflectometry.svg)](https://pypi.python.org/pypi/essreflectometry) -[![Anaconda-Server Badge](https://anaconda.org/scipp/essreflectometry/badges/version.svg)](https://anaconda.org/scipp/essreflectometry) +[![Anaconda-Server Badge](https://anaconda.org/conda-forge/essreflectometry/badges/version.svg)](https://anaconda.org/conda-forge/essreflectometry) [![License: BSD 3-Clause](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](LICENSE) # ESSreflectometry diff --git a/conda/meta.yaml b/conda/meta.yaml deleted file mode 100644 index a6e6d095..00000000 --- a/conda/meta.yaml +++ /dev/null @@ -1,57 +0,0 @@ -package: - name: essreflectometry - - version: {{ GIT_DESCRIBE_TAG }} - -source: - path: .. - - -{% set pyproject = load_file_data('pyproject.toml') %} -{% set dependencies = pyproject.get('project', {}).get('dependencies', {}) %} -{% set test_dependencies = pyproject.get('project', {}).get('optional-dependencies', {}).get('test', {}) %} - - -requirements: - build: - - setuptools - - setuptools_scm - run: - - python>=3.10 - - {# Conda does not allow spaces between package name and version, so remove them #} - {% for package in dependencies %} - - {% if package == "graphviz" %}python-graphviz{% else %}{{ package|replace(" ", "") }}{% endif %} - {% endfor %} - - -test: - imports: - - ess.reflectometry - - ess.amor - requires: - - {# Conda does not allow spaces between package name and version, so remove them #} - {% for package in test_dependencies %} - - {% if package == "graphviz" %}python-graphviz{% else %}{{ package|replace(" ", "") }}{% endif %} - {% endfor %} - - source_files: - - pyproject.toml - - tests/ - commands: - # We ignore warnings during release package builds - - python -m pytest -Wignore tests - -build: - noarch: python - script: - - python -m pip install . - -about: - home: https://github.com/scipp/essreflectometry - license: BSD-3-Clause - summary: Reflectometry data reduction for the European Spallation Source - description: Reflectometry data reduction for the European Spallation Source - dev_url: https://github.com/scipp/essreflectometry - doc_url: https://scipp.github.io/essreflectometry diff --git a/docs/conf.py b/docs/conf.py index 78c47943..4d8675cf 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -188,7 +188,7 @@ }, { "name": "Conda", - "url": "https://anaconda.org/scipp/essreflectometry", + "url": "https://anaconda.org/conda-forge/essreflectometry", "icon": "fa-custom fa-anaconda", "type": "fontawesome", }, @@ -268,7 +268,8 @@ def do_not_plot(*args, **kwargs): r'https?://github\.com/.*?/blob/[a-f0-9]+/.+?#', # Linkcheck seems to be denied access by some DOI resolvers. # Since DOIs are supposed to be permanent, we don't need to check them.' - r'https://doi\.org/', + r'https?://doi\.org/', + r'https?://dx\.doi\.org/', ] # -- Options for Matplotlib in notebooks ---------------------------------- diff --git a/docs/developer/getting-started.md b/docs/developer/getting-started.md index 84479713..92fe0b2e 100644 --- a/docs/developer/getting-started.md +++ b/docs/developer/getting-started.md @@ -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 py311 ``` (or just `tox` if you want to run all environments). diff --git a/docs/user-guide/installation.md b/docs/user-guide/installation.md index a8dd90c1..70ca8950 100644 --- a/docs/user-guide/installation.md +++ b/docs/user-guide/installation.md @@ -10,7 +10,7 @@ pip install essreflectometry ```` ````{tab-item} conda ```sh -conda install -c conda-forge -c scipp essreflectometry +conda install -c conda-forge essreflectometry ``` ```` ````` diff --git a/pyproject.toml b/pyproject.toml index 4c99a567..63600d7e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,14 +18,13 @@ classifiers = [ "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", - "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", ] -requires-python = ">=3.10" +requires-python = ">=3.11" # IMPORTANT: # Run 'tox -e deps' after making changes here. This will update requirement files. diff --git a/requirements/base.txt b/requirements/base.txt index 80fae5a5..f03ac928 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -11,7 +11,7 @@ click==8.2.1 # via dask cloudpickle==3.1.1 # via dask -contourpy==1.3.2 +contourpy==1.3.3 # via matplotlib cyclebane==24.10.0 # via sciline @@ -47,15 +47,15 @@ lazy-loader==0.4 # scippneutron locket==1.0.0 # via partd -matplotlib==3.10.3 +matplotlib==3.10.5 # via # mpltoolbox # plopp mpltoolbox==25.5.0 # via scippneutron -networkx==3.4.2 +networkx==3.5 # via cyclebane -numpy==2.2.6 +numpy==2.3.2 # via # contourpy # h5py @@ -119,7 +119,7 @@ scippnexus==25.6.0 # -r base.in # essreduce # scippneutron -scipy==1.15.3 +scipy==1.16.1 # via # scippneutron # scippnexus diff --git a/requirements/basetest.txt b/requirements/basetest.txt index 1602ae96..411b708c 100644 --- a/requirements/basetest.txt +++ b/requirements/basetest.txt @@ -5,12 +5,10 @@ # # requirements upgrade # -certifi==2025.7.14 +certifi==2025.8.3 # via requests charset-normalizer==3.4.2 # via requests -exceptiongroup==1.3.0 - # via pytest idna==3.10 # via requests iniconfig==2.1.0 @@ -31,9 +29,5 @@ pytest==8.4.1 # via -r basetest.in requests==2.32.4 # via pooch -tomli==2.2.1 - # via pytest -typing-extensions==4.14.1 - # via exceptiongroup urllib3==2.5.0 # via requests diff --git a/requirements/ci.txt b/requirements/ci.txt index 59e34147..cf385f77 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -7,7 +7,7 @@ # cachetools==6.1.0 # via tox -certifi==2025.7.14 +certifi==2025.8.3 # via requests chardet==5.2.0 # via tox @@ -23,7 +23,7 @@ filelock==3.18.0 # virtualenv gitdb==4.0.12 # via gitpython -gitpython==3.1.44 +gitpython==3.1.45 # via -r ci.in idna==3.10 # via requests @@ -44,15 +44,9 @@ requests==2.32.4 # via -r ci.in smmap==5.0.2 # via gitdb -tomli==2.2.1 - # via - # pyproject-api - # tox -tox==4.27.0 +tox==4.28.4 # via -r ci.in -typing-extensions==4.14.1 - # via tox urllib3==2.5.0 # via requests -virtualenv==20.31.2 +virtualenv==20.33.1 # via tox diff --git a/requirements/dev.txt b/requirements/dev.txt index 8359489e..94aff0a8 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -12,13 +12,13 @@ -r static.txt -r test.txt -r wheels.txt -anyio==4.9.0 +anyio==4.10.0 # via # httpx # jupyter-server argon2-cffi==25.1.0 # via jupyter-server -argon2-cffi-bindings==21.2.0 +argon2-cffi-bindings==25.1.0 # via argon2-cffi arrow==1.3.0 # via isoduration @@ -26,7 +26,7 @@ async-lru==2.0.5 # via jupyterlab cffi==1.17.1 # via argon2-cffi-bindings -copier==9.8.0 +copier==9.9.0 # via -r dev.in dunamai==1.25.0 # via copier @@ -48,14 +48,14 @@ json5==0.12.0 # via jupyterlab-server jsonpointer==3.0.0 # via jsonschema -jsonschema[format-nongpl]==4.24.1 +jsonschema[format-nongpl]==4.25.0 # via # jupyter-events # jupyterlab-server # nbformat jupyter-events==0.12.0 # via jupyter-server -jupyter-lsp==2.2.5 +jupyter-lsp==2.2.6 # via jupyterlab jupyter-server==2.16.0 # via @@ -65,17 +65,19 @@ jupyter-server==2.16.0 # notebook-shim jupyter-server-terminals==0.5.3 # via jupyter-server -jupyterlab==4.4.4 +jupyterlab==4.4.5 # via -r dev.in jupyterlab-server==2.27.3 # via jupyterlab +lark==1.2.2 + # via rfc3987-syntax notebook-shim==0.2.4 # via jupyterlab overrides==7.7.0 # via jupyter-server pip-compile-multi==3.2.1 # via -r dev.in -pip-tools==7.4.1 +pip-tools==7.5.0 # via pip-compile-multi plumbum==1.9.0 # via copier @@ -95,6 +97,8 @@ rfc3986-validator==0.1.1 # via # jsonschema # jupyter-events +rfc3987-syntax==1.1.0 + # via jsonschema send2trash==1.8.3 # via jupyter-server sniffio==1.3.1 diff --git a/requirements/docs.txt b/requirements/docs.txt index 6d5679c7..dccc773d 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -10,6 +10,8 @@ accessible-pygments==0.0.5 # via pydata-sphinx-theme alabaster==1.0.0 # via sphinx +appnope==0.1.4 + # via ipykernel asttokens==3.0.0 # via stack-data attrs==25.3.0 @@ -30,11 +32,11 @@ bleach[css]==6.2.0 # via nbconvert bqplot==0.12.45 # via ipydatagrid -certifi==2025.7.14 +certifi==2025.8.3 # via requests charset-normalizer==3.4.2 # via requests -comm==0.2.2 +comm==0.2.3 # via # ipykernel # ipywidgets @@ -52,8 +54,6 @@ docutils==0.21.2 # pydata-sphinx-theme # sphinx # sphinxcontrib-bibtex -exceptiongroup==1.3.0 - # via ipython executing==2.2.0 # via stack-data fastjsonschema==2.21.1 @@ -64,16 +64,18 @@ imagesize==1.4.1 # via sphinx ipydatagrid==1.4.0 # via -r docs.in -ipykernel==6.29.5 +ipykernel==6.30.1 # via -r docs.in ipympl==0.9.7 # via -r docs.in -ipython==8.37.0 +ipython==9.4.0 # via # -r docs.in # ipykernel # ipympl # ipywidgets +ipython-pygments-lexers==1.1.1 + # via ipython ipytree==0.2.2 # via -r docs.in ipywidgets==8.1.7 @@ -91,7 +93,7 @@ jinja2==3.1.6 # nbconvert # nbsphinx # sphinx -jsonschema==4.24.1 +jsonschema==4.25.0 # via nbformat jsonschema-specifications==2025.4.1 # via jsonschema @@ -181,12 +183,13 @@ pygments==2.19.2 # via # accessible-pygments # ipython + # ipython-pygments-lexers # nbconvert # pydata-sphinx-theme # sphinx python-dotenv==1.1.1 # via pydantic-settings -pyzmq==27.0.0 +pyzmq==27.0.1 # via # ipykernel # jupyter-client @@ -241,8 +244,6 @@ stack-data==0.6.3 # via ipython tinycss2==1.4.0 # via bleach -tomli==2.2.1 - # via sphinx tornado==6.5.1 # via # ipykernel @@ -250,7 +251,6 @@ tornado==6.5.1 traitlets==5.14.3 # via # bqplot - # comm # ipykernel # ipympl # ipython diff --git a/requirements/mypy.txt b/requirements/mypy.txt index 3c79935b..a2b4de29 100644 --- a/requirements/mypy.txt +++ b/requirements/mypy.txt @@ -6,7 +6,7 @@ # requirements upgrade # -r test.txt -mypy==1.17.0 +mypy==1.17.1 # via -r mypy.in mypy-extensions==1.1.0 # via mypy diff --git a/requirements/nightly.txt b/requirements/nightly.txt index a7fb79d8..a3c0c5a7 100644 --- a/requirements/nightly.txt +++ b/requirements/nightly.txt @@ -10,7 +10,7 @@ annotated-types==0.7.0 # via pydantic -certifi==2025.7.14 +certifi==2025.8.3 # via requests charset-normalizer==3.4.2 # via requests @@ -18,7 +18,7 @@ click==8.2.1 # via dask cloudpickle==3.1.1 # via dask -contourpy==1.3.2 +contourpy==1.3.3 # via matplotlib cyclebane==24.10.0 # via sciline @@ -32,8 +32,6 @@ email-validator==2.2.0 # via scippneutron essreduce==25.7.1 # via -r nightly.in -exceptiongroup==1.3.0 - # via pytest fonttools==4.59.0 # via matplotlib fsspec==2025.7.0 @@ -60,15 +58,15 @@ lazy-loader==0.4 # scippneutron locket==1.0.0 # via partd -matplotlib==3.10.3 +matplotlib==3.10.5 # via # mpltoolbox # plopp mpltoolbox==25.5.0 # via scippneutron -networkx==3.4.2 +networkx==3.5 # via cyclebane -numpy==2.2.6 +numpy==2.3.2 # via # contourpy # h5py @@ -102,9 +100,9 @@ pluggy==1.6.0 # via pytest pooch==1.8.2 # via -r nightly.in -pydantic==2.11.7 +pydantic==2.12.0a1 # via scippneutron -pydantic-core==2.33.2 +pydantic-core==2.37.2 # via pydantic pygments==2.19.2 # via pytest @@ -118,7 +116,6 @@ python-dateutil==2.9.0.post0 # matplotlib # pandas # scippneutron - # scippnexus pytz==2025.2 # via pandas pyyaml==6.0.2 @@ -146,21 +143,18 @@ scippnexus @ git+https://github.com/scipp/scippnexus@main # -r nightly.in # essreduce # scippneutron -scipy==1.15.3 +scipy==1.16.1 # via # scippneutron # scippnexus six==1.17.0 # via python-dateutil -tomli==2.2.1 - # via pytest toolz==1.0.0 # via # dask # partd typing-extensions==4.14.1 # via - # exceptiongroup # pydantic # pydantic-core # sciline diff --git a/requirements/static.txt b/requirements/static.txt index 463662ca..3e288557 100644 --- a/requirements/static.txt +++ b/requirements/static.txt @@ -21,5 +21,5 @@ pre-commit==4.2.0 # via -r static.in pyyaml==6.0.2 # via pre-commit -virtualenv==20.31.2 +virtualenv==20.33.1 # via pre-commit diff --git a/requirements/wheels.txt b/requirements/wheels.txt index 651191e5..3558aae2 100644 --- a/requirements/wheels.txt +++ b/requirements/wheels.txt @@ -5,11 +5,9 @@ # # requirements upgrade # -build==1.2.2.post1 +build==1.3.0 # via -r wheels.in packaging==25.0 # via build pyproject-hooks==1.2.0 # via build -tomli==2.2.1 - # via build diff --git a/src/ess/reflectometry/orso.py b/src/ess/reflectometry/orso.py index 25b6e5db..436a33ae 100644 --- a/src/ess/reflectometry/orso.py +++ b/src/ess/reflectometry/orso.py @@ -6,9 +6,9 @@ of reference runs and only use the metadata of the sample run. """ +import datetime import os import platform -from datetime import datetime, timezone from typing import NewType import numpy as np @@ -152,7 +152,7 @@ def build_orso_reduction(creator: OrsoCreator) -> OrsoReduction: version=str(__version__), platform=platform.system(), ), - timestamp=datetime.now(tz=timezone.utc), + timestamp=datetime.datetime.now(tz=datetime.UTC), creator=creator, corrections=[], ) diff --git a/tox.ini b/tox.ini index a30118d0..db2eff21 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py310 +envlist = py311 isolated_build = true [testenv]