Skip to content

Commit 1c814cd

Browse files
committed
copier bump
1 parent 7c2bcb1 commit 1c814cd

File tree

9 files changed

+65
-17
lines changed

9 files changed

+65
-17
lines changed

.copier-answers.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2-
_commit: aa5dc5e
2+
_commit: 5c4fd02
33
_src_path: gh:scipp/copier_template
44
description: Common data reduction tools for the ESS facility
55
max_python: '3.13'

.github/workflows/docs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
name: docs_html
7070
path: html/
7171

72-
- uses: JamesIves/github-pages-deploy-action@v4.6.9
72+
- uses: JamesIves/github-pages-deploy-action@v4.7.2
7373
if: ${{ inputs.publish }}
7474
with:
7575
branch: gh-pages
+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Windows and MacOS weekly tests
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '0 2 * * 1'
7+
8+
jobs:
9+
pytox:
10+
name: Python and Tox env
11+
runs-on: 'ubuntu-24.04'
12+
outputs:
13+
min_python: ${{ steps.vars.outputs.min_python }}
14+
min_tox_env: ${{ steps.vars.outputs.min_tox_env }}
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Get Python version for other CI jobs
18+
id: vars
19+
run: |
20+
echo "min_python=$(cat .github/workflows/python-version-ci)" >> $GITHUB_OUTPUT
21+
echo "min_tox_env=py$(cat .github/workflows/python-version-ci | sed 's/\.//g')" >> $GITHUB_OUTPUT
22+
tests:
23+
name: Tests
24+
needs: pytox
25+
strategy:
26+
matrix:
27+
os: ['macos-latest', 'windows-latest']
28+
python:
29+
- version: '${{needs.pytox.outputs.min_python}}'
30+
tox-env: '${{needs.pytox.outputs.min_tox_env}}'
31+
uses: ./.github/workflows/test.yml
32+
with:
33+
os-variant: ${{ matrix.os }}
34+
python-version: ${{ matrix.python.version }}
35+
tox-env: ${{ matrix.python.tox-env }}
36+
37+
docs:
38+
needs: tests
39+
uses: ./.github/workflows/docs.yml
40+
with:
41+
publish: false
42+
branch: ${{ github.head_ref == '' && github.ref_name || github.head_ref }}

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ dist
44
html
55
.tox
66
*.egg-info
7-
uv.lock # we lock dependencies with pip-compile, not uv
7+
# we lock dependencies with pip-compile, not uv
8+
uv.lock
89

910
*.sw?
1011

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ repos:
2323
args: [ "--drop-empty-cells",
2424
"--extra-keys 'metadata.language_info.version cell.metadata.jp-MarkdownHeadingCollapsed cell.metadata.pycharm'" ]
2525
- repo: https://github.com/astral-sh/ruff-pre-commit
26-
rev: v0.6.9
26+
rev: v0.8.0
2727
hooks:
2828
- id: ruff
2929
args: [ --fix ]

pyproject.toml

+1-2
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,12 @@ ignore = [
8888
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
8989
"COM812", "COM819", "D206", "D300", "E111", "E114", "E117", "ISC001", "ISC002", "Q000", "Q001", "Q002", "Q003", "W191",
9090
]
91-
fixable = ["B010", "I001", "PT001"]
91+
fixable = ["B010", "I001", "PT001", "RUF022"]
9292
isort.known-first-party = ["ess.reduce"]
9393
pydocstyle.convention = "numpy"
9494

9595
[tool.ruff.lint.per-file-ignores]
9696
# those files have an increased risk of relying on import order
97-
"__init__.py" = ["I"]
9897
"tests/*" = [
9998
"S101", # asserts are fine in tests
10099
"B018", # 'useless expressions' are ok because some tests just check for exceptions

requirements/make_base.py

+9-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import sys
21
from argparse import ArgumentParser
32
from pathlib import Path
43

@@ -58,11 +57,15 @@ def as_nightly(repo: str) -> str:
5857
else:
5958
org = "scipp"
6059
if repo == "scipp":
61-
version = f"cp{sys.version_info.major}{sys.version_info.minor}"
62-
base = "https://github.com/scipp/scipp/releases/download/nightly/scipp-nightly"
63-
suffix = "manylinux_2_17_x86_64.manylinux2014_x86_64.whl"
64-
prefix = "scipp @ "
65-
return prefix + "-".join([base, version, version, suffix])
60+
# With the standard pip resolver index-url takes precedence over
61+
# extra-index-url but with uv it's reversed, so if we move to tox-uv
62+
# this needs to be reversed.
63+
return (
64+
"scipp\n"
65+
"--index-url=https://pypi.anaconda.org/scipp-nightly-wheels/simple/\n"
66+
"--extra-index-url=https://pypi.org/simple\n"
67+
"--pre"
68+
)
6669
return f"{repo} @ git+https://github.com/{org}/{repo}@main"
6770

6871

src/ess/reduce/__init__.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# SPDX-License-Identifier: BSD-3-Clause
2-
# Copyright (c) 2024 Scipp contributors (https://github.com/scipp)
3-
# ruff: noqa: E402, F401
2+
# Copyright (c) 2025 Scipp contributors (https://github.com/scipp)
3+
# ruff: noqa: E402, F401, I
44

55
import importlib.metadata
66

7-
from . import nexus, uncertainty, time_of_flight
7+
from . import nexus, time_of_flight, uncertainty
88

99
try:
1010
__version__ = importlib.metadata.version("essreduce")
@@ -13,4 +13,4 @@
1313

1414
del importlib
1515

16-
__all__ = ["nexus", "uncertainty", "time_of_flight"]
16+
__all__ = ["nexus", "time_of_flight", "uncertainty"]

tox.ini

+4-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ commands = pytest {posargs}
1010

1111
[testenv:nightly]
1212
deps = -r requirements/nightly.txt
13+
setenv =
14+
PIP_INDEX_URL = https://pypi.anaconda.org/scipp-nightly-wheels/simple
15+
PIP_EXTRA_INDEX_URL = https://pypi.org/simple
1316
commands = pytest {posargs}
1417

1518
[testenv:unpinned]
@@ -64,4 +67,4 @@ deps =
6467
skip_install = true
6568
changedir = requirements
6669
commands = python ./make_base.py --nightly scippnexus,scipp,sciline,cyclebane,scippneutron,tof
67-
pip-compile-multi -d . --backtracking
70+
pip-compile-multi -d . --backtracking --annotate-index

0 commit comments

Comments
 (0)