Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pypi_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.12"
- name: Checkout repo
uses: actions/checkout@v4
- name: Install dependencies
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]
test: ["coveralls", "pytest"]
# Installation on py3.10 is rather slow at the moment
exclude:
- python-version: "3.11"
- python-version: "3.12"
test: coveralls
steps:
- name: Checkout repo
Expand All @@ -41,6 +41,9 @@ jobs:
run: pip install git+https://github.com/XENONnT/base_environment.git@el7.2025.01.3 --force-reinstall
- name: Install requirements for Python 3.11
if: matrix.python-version == '3.11'
run: pip install git+https://github.com/XENONnT/base_environment.git@el8.2026.02.2 --force-reinstall
- name: Install requirements for Python 3.12
if: matrix.python-version == '3.12'
run: pip install git+https://github.com/XENONnT/base_environment.git --force-reinstall
- name: Install strax
run: pip install .
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]
steps:
- name: Setup python
uses: actions/setup-python@v5
Expand Down
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ repos:
rev: v1.7.6
hooks:
- id: docformatter
language_version: python3.12
additional_dependencies: [tomli]
args: [--config, pyproject.toml]

Expand Down
8 changes: 4 additions & 4 deletions strax/run_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def scan_runs(
docs = new_docs
else:
# Keep only new runs (not found by earlier frontends)
mask = ~np.in1d(new_docs["name"], docs["name"])
mask = ~np.isin(new_docs["name"], docs["name"])
if np.any(mask):
docs = pd.concat([docs, new_docs[mask]], sort=False)
docs.reset_index(drop=True, inplace=True)
Expand All @@ -211,7 +211,7 @@ def scan_runs(
desc="Checking data availability",
disable=not len(check_available),
):
self.runs[d + "_available"] = np.in1d(self.runs.name.values, self.list_available(d))
self.runs[d + "_available"] = np.isin(self.runs.name.values, self.list_available(d))

return self.runs

Expand Down Expand Up @@ -305,7 +305,7 @@ def select_runs(
desc="Checking data availability",
disable=not len(check_available),
):
dsets[d + "_available"] = np.in1d(
dsets[d + "_available"] = np.isin(
dsets.name.values, self.list_available(target=d, runs=dsets.name.values)
)

Expand All @@ -315,7 +315,7 @@ def select_runs(
for d in have_available:
if not d + "_available" in dsets.columns:
# Get extra availability info from the run db
d_available = np.in1d(
d_available = np.isin(
dsets.name.values, self.list_available(target=d, runs=dsets.name.values)
)
# Save both in the context and for this selection using
Expand Down
2 changes: 1 addition & 1 deletion tests/test_data_reduction.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def test_cut_outside_hits(records):
for r in records:
r["data"] = 0
r["data"][: r["length"]] = 1
assert np.all(np.in1d(r["data"], [0, 1]))
assert np.all(np.isin(r["data"], [0, 1]))

left_extension = 2
right_extension = 3
Expand Down