Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion fractal-web-reference.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.13.1
v1.19.1
18 changes: 15 additions & 3 deletions tasks_data_retrieval/create_tasks_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def _get_task_type(
sources = f.read().splitlines()
sources = [source for source in sources if not (source.startswith("#") or source == "")]

TASK_GROUPS = []
task_groups = []
for source in sources:
t_start = time.perf_counter()
print(f"START processing {source=}")
Expand Down Expand Up @@ -274,7 +274,7 @@ def _get_task_type(

TaskGroupReadV2(**task_group)

TASK_GROUPS.append(task_group)
task_groups.append(task_group)

t_end = time.perf_counter()
print(
Expand All @@ -285,8 +285,20 @@ def _get_task_type(
)
print()

# grouping results
GROUPED_RESULT = []

for task_group in task_groups:
if any(existing_pkg_name == task_group["pkg_name"] for existing_pkg_name, _ in GROUPED_RESULT):
raise ValueError(f"Duplicate package name found: {task_group['pkg_name']}")

GROUPED_RESULT.append((task_group["pkg_name"], [task_group]))

# sort by package name
GROUPED_RESULT.sort(key=lambda x: x[0].lower())

output_file = Path(__file__).parent / "tasks.json"
with output_file.open("w") as f:
json.dump(TASK_GROUPS, f, indent=2)
json.dump(GROUPED_RESULT, f, indent=2)

DOWNLOAD_FOLDER.rmdir()