From 8ba88f15689d6853681479277f43eb7895930166 Mon Sep 17 00:00:00 2001 From: Ananthakrishnan RAVINDRAN <132569562+Ananthu-Ravindran@users.noreply.github.com> Date: Sat, 29 Jun 2024 23:19:52 +0200 Subject: [PATCH] Add xedocs version to context config, only if xedocs is called (#1393) * Add xedocs version to context config, only if xedocs is called * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * adding tar of sharedarray This solution worked for cutax * Downgrade numpy --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: RIYA SINGH --- extra_requirements/requirements-tests.txt | 1 + requirements.txt | 2 +- straxen/corrections_services.py | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/extra_requirements/requirements-tests.txt b/extra_requirements/requirements-tests.txt index 0d6f8a3bf..20d6248ec 100644 --- a/extra_requirements/requirements-tests.txt +++ b/extra_requirements/requirements-tests.txt @@ -1,3 +1,4 @@ # File for the requirements of straxen with the automated tests +sharedarray@https://xenon.isi.edu/python/SharedArray-3.2.3.tar.gz # workaround for numpy 2.0.0 build problem, see XENONnT/base_environment#1718 strax==1.6.4 git+https://github.com/XENONnT/base_environment diff --git a/requirements.txt b/requirements.txt index fe2920d09..4a9920c53 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,7 +9,7 @@ immutabledict matplotlib multihist>=0.6.3 numba>=0.50.0 -numpy +numpy<2.0.0 packaging m2r==0.2.1 docutils==0.18.1 diff --git a/straxen/corrections_services.py b/straxen/corrections_services.py index ec2de13ec..c83628d2e 100644 --- a/straxen/corrections_services.py +++ b/straxen/corrections_services.py @@ -493,6 +493,7 @@ def apply_xedocs_configs(context: strax.Context, db="straxen_db", **kwargs) -> N if len(global_config): context.set_config(global_config) + context.set_context_config({"xedocs_version": filter_kwargs["version"]}) else: warnings.warn( f"Could not find any context configs matchin {filter_kwargs}",