From 716074511694105972535dd24392ef7305a86be2 Mon Sep 17 00:00:00 2001 From: Caio Takanori Oba Ishikawa Date: Tue, 21 Apr 2026 00:55:24 -0500 Subject: [PATCH 1/4] np.in1d --> np.isin --- strax/run_selection.py | 8 ++++---- tests/test_data_reduction.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/strax/run_selection.py b/strax/run_selection.py index e3f328774..e06fb1793 100644 --- a/strax/run_selection.py +++ b/strax/run_selection.py @@ -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) @@ -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 @@ -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) ) @@ -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 diff --git a/tests/test_data_reduction.py b/tests/test_data_reduction.py index 552ea89ab..c50501679 100644 --- a/tests/test_data_reduction.py +++ b/tests/test_data_reduction.py @@ -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 From 660995a7ab436c311d8c9e1066f973f0a3e42eee Mon Sep 17 00:00:00 2001 From: Caio Takanori Oba Ishikawa Date: Tue, 21 Apr 2026 01:02:18 -0500 Subject: [PATCH 2/4] specify python version in pre commit yml file --- .pre-commit-config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e884a0ae5..607850c69 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,6 +20,7 @@ repos: rev: v1.7.6 hooks: - id: docformatter + language_version: python3.12 additional_dependencies: [tomli] args: [--config, pyproject.toml] From 2f407aed28a34fdf42545e9c9c37a009417dd464 Mon Sep 17 00:00:00 2001 From: Caio Takanori Oba Ishikawa Date: Fri, 24 Apr 2026 11:09:51 -0500 Subject: [PATCH 3/4] some extra changes in pytest workflow files --- .github/workflows/pypi_install.yml | 2 +- .github/workflows/pytest.yml | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pypi_install.yml b/.github/workflows/pypi_install.yml index 79e5581db..52ea2b10b 100644 --- a/.github/workflows/pypi_install.yml +++ b/.github/workflows/pypi_install.yml @@ -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 diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 0cba06e6d..39829fb64 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -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 @@ -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 . From 6962c45caa2c57a3e0b6e5828bc4256aa4c4015e Mon Sep 17 00:00:00 2001 From: Caio Takanori Oba Ishikawa Date: Fri, 24 Apr 2026 11:10:45 -0500 Subject: [PATCH 4/4] some extra changes in pytest workflow files 2 --- .github/workflows/test_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_install.yml b/.github/workflows/test_install.yml index 1306c9c28..2e28f9f11 100644 --- a/.github/workflows/test_install.yml +++ b/.github/workflows/test_install.yml @@ -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