Skip to content

Commit

Permalink
pre-commit cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ggmarshall committed Feb 19, 2024
1 parent 3841122 commit 9332484
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
2 changes: 1 addition & 1 deletion scripts/build_evt.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def replace_evt_with_key(dic, new_key):
tcm_group="hardware_tcm_1",
dsp_group="dsp",
hit_group="hit",
tcm_id_table_pattern="ch{}"
tcm_id_table_pattern="ch{}",
)

tbl = Table(col_dict=tables)
Expand Down
12 changes: 6 additions & 6 deletions scripts/build_skm.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,12 @@ def group_files(fs_evt, fs_hit, fs_dsp, fs_tcm):
tables = {}
for key, config in skm_config.items():
tables[key] = build_skm(
f_evt = f_evt,
f_hit = f_hit,
f_dsp = f_dsp,
f_tcm = f_tcm,
f_skm= None,
skm_conf = config,
f_evt=f_evt,
f_hit=f_hit,
f_dsp=f_dsp,
f_tcm=f_tcm,
f_skm=None,
skm_conf=config,
skm_group=f"skm/{key}" if key != "all" else "skm",
evt_group="evt",
tcm_group="hardware_tcm_1",
Expand Down
12 changes: 10 additions & 2 deletions scripts/util/patterns.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,11 @@ def get_pattern_tier(setup, tier, check_in_cycle=True):
else:
msg = "invalid tier"
raise Exception(msg)
if tier_path(setup) not in file_pattern and check_in_cycle is True and ".." not in file_pattern:
if (
tier_path(setup) not in file_pattern
and check_in_cycle is True
and ".." not in file_pattern
):
return "/tmp/{experiment}-{period}-{run}-{datatype}-{timestamp}" + f"tier_{tier}.lh5"
else:
return file_pattern
Expand Down Expand Up @@ -387,7 +391,11 @@ def get_pattern_pars(setup, tier, name=None, extension="json", check_in_cycle=Tr
else:
msg = "invalid tier"
raise Exception(msg)
if pars_path(setup) not in file_pattern and check_in_cycle is True and ".." not in file_pattern:
if (
pars_path(setup) not in file_pattern
and check_in_cycle is True
and ".." not in file_pattern
):
if name is None:
return "/tmp/{experiment}-{period}-{run}-cal-{timestamp}" + f"par_{tier}.{extension}"
else:
Expand Down

0 comments on commit 9332484

Please sign in to comment.