Skip to content

Commit

Permalink
fix find tables function
Browse files Browse the repository at this point in the history
  • Loading branch information
cklunch committed Oct 10, 2024
1 parent 7c76563 commit 2ca8918
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
Binary file modified dist/neonutilities-1.0.1-py3-none-any.whl
Binary file not shown.
Binary file modified dist/neonutilities-1.0.1.tar.gz
Binary file not shown.
4 changes: 2 additions & 2 deletions src/neonutilities/unzip_and_stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,12 +283,12 @@ def find_table_types(datatables):
tt = {}
for k in range(0, len(tn)):
tnk = tn[k]
tnkr = re.compile(tnk + "|" + tnk + "_pub")
tnkr = re.compile("^" + tnk + "$|^" + tnk + "_pub$")
tnknames = [trnn for trnn in splitnames for tr in trnn if tnkr.search(tr)]
ttklist = list(map(table_type_formats, tnknames))
ttk = list(set(ttklist))
if len(ttk) > 1:
raise ValueError("In files to be stacked, table {tnk} has been published under conflicting schedules. To avoid this problem, either work only with released data, or stack released and provisional data separately.")
raise ValueError(f"In files to be stacked, table {tnk} has been published under conflicting schedules. To avoid this problem, either work only with released data, or stack released and provisional data separately.")
return
else:
tt[tnk] = ttk[0]
Expand Down

0 comments on commit 2ca8918

Please sign in to comment.