From c0582135cd69f5329147543a2b0616ba5fcff991 Mon Sep 17 00:00:00 2001 From: Ryan Simeon <100856815+rpsimeon34@users.noreply.github.com> Date: Thu, 29 Aug 2024 15:47:21 -0500 Subject: [PATCH 1/2] Delete src/coffea/lookup_tools/json_lookup.py --- src/coffea/lookup_tools/json_lookup.py | 33 -------------------------- 1 file changed, 33 deletions(-) delete mode 100644 src/coffea/lookup_tools/json_lookup.py diff --git a/src/coffea/lookup_tools/json_lookup.py b/src/coffea/lookup_tools/json_lookup.py deleted file mode 100644 index 216521d90..000000000 --- a/src/coffea/lookup_tools/json_lookup.py +++ /dev/null @@ -1,33 +0,0 @@ -from datetime import datetime - -import pytz - -from coffea.util import deprecate - -_cst = pytz.timezone("US/Central") -_depttime = _cst.localize(datetime(2024, 7, 31, 11, 59, 59)) -deprecate( - ( - "coffea.lookup_tools.json_lookup will be removed by August 2024. " - "Please use lumi_tools or correctionlib instead!" - ), - version="2024.8.0", - date=str(_depttime), - category=FutureWarning, -) - - -class json_lookup: - def __init__(self, wrapped_values): - self.values = wrapped_values - - def __call__(self, run, lumi): - mu = [] - for i in range(len(run)): - run_ = str(run[i]) - lumi_ = lumi[i] - if run_ not in self.values.keys() or lumi_ not in self.values[run_].keys(): - print(f" \033[91m run:lumi {run_}:{lumi_} not found \033[00m") - else: - mu.append(self.values[run_][lumi_]) - return mu From fd5985266a988b15189c961baac4c16f6bfee3fd Mon Sep 17 00:00:00 2001 From: Ryan Simeon <100856815+rpsimeon34@users.noreply.github.com> Date: Thu, 29 Aug 2024 15:52:18 -0500 Subject: [PATCH 2/2] Remove json_lookup from evaluator.py --- src/coffea/lookup_tools/evaluator.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/coffea/lookup_tools/evaluator.py b/src/coffea/lookup_tools/evaluator.py index 20a1ab31a..50ad6e674 100644 --- a/src/coffea/lookup_tools/evaluator.py +++ b/src/coffea/lookup_tools/evaluator.py @@ -4,7 +4,6 @@ from coffea.lookup_tools.jec_uncertainty_lookup import jec_uncertainty_lookup from coffea.lookup_tools.jersf_lookup import jersf_lookup from coffea.lookup_tools.jme_standard_function import jme_standard_function -from coffea.lookup_tools.json_lookup import json_lookup from coffea.lookup_tools.rochester_lookup import rochester_lookup lookup_types = { @@ -14,7 +13,6 @@ "jersf_lookup": jersf_lookup, "jec_uncertainty_lookup": jec_uncertainty_lookup, "rochester_lookup": rochester_lookup, - "json_lookup": json_lookup, "correctionlib_wrapper": correctionlib_wrapper, }