Skip to content

Commit

Permalink
Merge branch 'main' into create-trade-links
Browse files Browse the repository at this point in the history
  • Loading branch information
olejandro authored Jan 31, 2024
2 parents 12cc5cd + 6a9aa98 commit 530bf1e
Show file tree
Hide file tree
Showing 2 changed files with 184 additions and 159 deletions.
10 changes: 5 additions & 5 deletions xl2times/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def convert_xl_to_times(
transforms.generate_dummy_processes,
transforms.process_time_slices,
transforms.process_transform_insert_variants,
transforms.process_transform_insert,
transforms.process_transform_tables,
transforms.process_processes,
transforms.process_topology,
transforms.process_flexible_import_tables, # slow
Expand Down Expand Up @@ -385,7 +385,7 @@ def main():
args_parser.add_argument(
"input",
nargs="*",
help="Either an input directory, or a list of input xlsx files to process",
help="Either an input directory, or a list of input xlsx/xlsm files to process",
)
args_parser.add_argument(
"--regions",
Expand All @@ -405,7 +405,7 @@ def main():
args_parser.add_argument(
"--only_read",
action="store_true",
help="Read xlsx files and stop after outputting raw_tables.txt",
help="Read xlsx/xlsm files and stop after outputting raw_tables.txt",
)
args_parser.add_argument("--use_pkl", action="store_true")
args_parser.add_argument(
Expand Down Expand Up @@ -433,8 +433,8 @@ def main():
assert os.path.isdir(args.input[0])
input_files = [
str(path)
for path in Path(args.input[0]).rglob("*.xlsx")
if not path.name.startswith("~")
for path in Path(args.input[0]).rglob("*")
if path.suffix in [".xlsx", ".xlsm"] and not path.name.startswith("~")
]
print(f"Loading {len(input_files)} files from {args.input[0]}")
else:
Expand Down
Loading

0 comments on commit 530bf1e

Please sign in to comment.