Skip to content

Commit b92c760

Browse files
authored
Merge pull request #580 from OpenCOMPES/update_pynxtools
Update pynxtools
2 parents 02bd061 + 7df38b8 commit b92c760

9 files changed

Lines changed: 21 additions & 22 deletions

File tree

.github/workflows/benchmark.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ jobs:
2828
private_key: ${{ secrets.APP_PRIVATE_KEY }}
2929

3030
# Setup python
31-
- name: Set up Python 3.10
31+
- name: Set up Python 3.12
3232
uses: actions/setup-python@v5
3333
with:
34-
python-version: "3.10"
34+
python-version: "3.12"
3535

3636
- name: Install dependencies
3737
run: |
@@ -42,7 +42,7 @@ jobs:
4242
uv pip install ".[dev]"
4343
4444
# Run benchmarks
45-
- name: Run benchmarks on python 3.10
45+
- name: Run benchmarks on python 3.12
4646
run: |
4747
pytest --full-trace --show-capture=no -sv benchmarks/benchmark_*.py
4848

.github/workflows/documentation.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ jobs:
3434
fetch-depth: 0
3535

3636
# Setup python
37-
- name: Set up Python 3.10
37+
- name: Set up Python 3.12
3838
uses: actions/setup-python@v5
3939
with:
40-
python-version: "3.10"
40+
python-version: "3.12"
4141

4242
- name: Install dependencies
4343
run: |

.github/workflows/linting.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717
fetch-depth: 0
1818

1919
# Setup python
20-
- name: Set up Python 3.10
20+
- name: Set up Python 3.12
2121
uses: actions/setup-python@v5
2222
with:
23-
python-version: "3.10"
23+
python-version: "3.12"
2424

2525
- name: Install dependencies
2626
run: |

.github/workflows/testing_coverage.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ jobs:
2020
fetch-depth: 0
2121

2222
# Setup python
23-
- name: Set up Python 3.10
23+
- name: Set up Python 3.12
2424
uses: actions/setup-python@v5
2525
with:
26-
python-version: "3.10"
26+
python-version: "3.12"
2727

2828
- name: Install dependencies
2929
run: |
@@ -34,7 +34,7 @@ jobs:
3434
uv pip install -e ".[dev]"
3535
3636
# Run pytest with coverage report, saving to xml
37-
- name: Run tests on python 3.10
37+
- name: Run tests on python 3.12
3838
run: |
3939
pytest --cov --cov-report xml:cobertura.xml --full-trace --show-capture=no -sv -n auto tests/
4040

.github/workflows/testing_multiversion.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
# Using matrix strategy
1818
strategy:
1919
matrix:
20-
python-version: ["3.9", "3.10", "3.11", "3.12"]
20+
python-version: ["3.10", "3.11", "3.12", "3.13"]
2121

2222
steps:
2323
# Check out repo and set up Python

pyproject.toml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@ authors = [
1919
readme = "README.md"
2020
keywords = ["sed", "mpes", "flash", "arpes"]
2121
license = { file = "LICENSE" }
22-
requires-python = ">=3.9"
22+
requires-python = ">=3.10"
2323
classifiers = [
24-
"Programming Language :: Python :: 3.9",
2524
"Programming Language :: Python :: 3.10",
2625
"Programming Language :: Python :: 3.11",
2726
"Programming Language :: Python :: 3.12",
@@ -41,12 +40,12 @@ dependencies = [
4140
"matplotlib>=3.5.1",
4241
"natsort>=8.1.0",
4342
"numba>=0.55.1",
44-
"numpy>=1.18",
43+
"numpy>=2.0.0",
4544
"pandas>=1.4.1",
4645
"photutils<2.0",
4746
"psutil>=5.9.0",
48-
"pynxtools-mpes>=0.2.5",
49-
"pynxtools>=0.11.1",
47+
"pynxtools-mpes>=0.2.6",
48+
"pynxtools>=0.12.0",
5049
"pyyaml>=6.0.0",
5150
"scipy>=1.8.0",
5251
"symmetrize>=0.5.5",

src/sed/binning/binning.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def bin_partition(
178178
ranges=ranges,
179179
)
180180
elif hist_mode == "numpy":
181-
hist_partition, edges = np.histogramdd(
181+
hist_partition, edges = np.histogramdd( # type: ignore
182182
vals,
183183
bins=bins,
184184
range=ranges,

src/sed/binning/numba_bin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ def numba_histogramdd(
195195
num_rows, num_cols = sample.shape # pylint: disable=unused-variable
196196

197197
if isinstance(bins, (int, np.int_)): # bins provided as a single number
198-
bins = num_cols * [bins]
198+
bins = cast(int, num_cols) * [bins]
199199
num_bins = len(bins) # Number of dimensions in bins
200200

201201
if num_bins != num_cols: # check number of dimensions

tests/test_processor.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1236,13 +1236,13 @@ def test_save(caplog) -> None:
12361236
)
12371237
assert (
12381238
caplog.messages[0]
1239-
== "WARNING: The data entry corresponding to /ENTRY[entry]/SAMPLE[sample]/name is "
1240-
"required and hasn't been supplied by the reader."
1239+
== "WARNING: The required field /ENTRY[entry]/SAMPLE[sample]/name hasn't been "
1240+
"supplied."
12411241
)
12421242
assert (
12431243
caplog.messages[1]
1244-
== "WARNING: Field /ENTRY[entry]/INSTRUMENT[instrument]/undocumented_field written "
1245-
"without documentation."
1244+
== "WARNING: Field /ENTRY[entry]/INSTRUMENT[instrument]/undocumented_field has no "
1245+
"documentation."
12461246
)
12471247
os.remove("output.nxs")
12481248
os.remove("temp_eln.yaml")

0 commit comments

Comments
 (0)