Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
FACT Workflow Manager
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FACT
FACT Utils
FACT Workflow Manager
Commits
e2e60d42
Commit
e2e60d42
authored
3 months ago
by
Riccardo Boero
Browse files
Options
Downloads
Patches
Plain Diff
Fix workflow task parsing
parent
ec9ce410
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Runner.jl
+1
-1
1 addition, 1 deletion
src/Runner.jl
src/TOMLParser.jl
+3
-6
3 additions, 6 deletions
src/TOMLParser.jl
with
4 additions
and
7 deletions
src/Runner.jl
+
1
−
1
View file @
e2e60d42
...
@@ -110,7 +110,7 @@ system = ServiceRegistry() # Assuming ServiceRegistry is preconfigured
...
@@ -110,7 +110,7 @@ system = ServiceRegistry() # Assuming ServiceRegistry is preconfigured
manage_workflow(tasks_list, results_container, system)
manage_workflow(tasks_list, results_container, system)
```
```
"""
"""
function
manage_workflow
(
tasks_list
::
Vector
{
Dict
},
results_container
::
Dict
,
system
::
OrchestratorRegistry
.
ServiceRegistry
)
function
manage_workflow
(
tasks_list
::
Vector
{
<:
Dict
},
results_container
::
Dict
,
system
::
OrchestratorRegistry
.
ServiceRegistry
)
# Convert tasks_list into a dictionary keyed by the "id" field for easy dependency resolution
# Convert tasks_list into a dictionary keyed by the "id" field for easy dependency resolution
# Each element of tasks_list is assumed to have a unique "id" key.
# Each element of tasks_list is assumed to have a unique "id" key.
tasks
=
Dict
(
task
[
"id"
]
=>
task
for
task
in
tasks_list
)
tasks
=
Dict
(
task
[
"id"
]
=>
task
for
task
in
tasks_list
)
...
...
This diff is collapsed.
Click to expand it.
src/TOMLParser.jl
+
3
−
6
View file @
e2e60d42
...
@@ -51,16 +51,14 @@ function parseWorkflow(filePath::String)
...
@@ -51,16 +51,14 @@ function parseWorkflow(filePath::String)
error
(
"Invalid workflow file: 'tasks' section not found."
)
error
(
"Invalid workflow file: 'tasks' section not found."
)
end
end
# Flatten tasks into a list of dictionaries
# Initialize tasks as a vector of Dict
tasks
=
[]
tasks
=
Dict
{
String
,
Any
}[]
for
(
task_name
,
task_details
)
in
data
[
"tasks"
]
for
(
task_name
,
task_details
)
in
data
[
"tasks"
]
# Skip non-dictionary entries (e.g., `id = "no_counties"`)
if
task_details
isa
Dict
if
task_details
isa
Dict
# Add the task name as the "id" and flatten into a single dictionary
# Add the task name as the "id" and flatten into a single dictionary
task_details
[
"id"
]
=
task_name
task_details
[
"id"
]
=
task_name
push!
(
tasks
,
task_details
)
push!
(
tasks
,
task_details
)
else
#println("Skipping non-dictionary task entry: '$task_name'. Value: ", task_details)
end
end
end
end
...
@@ -71,4 +69,3 @@ function parseWorkflow(filePath::String)
...
@@ -71,4 +69,3 @@ function parseWorkflow(filePath::String)
return
tasks
return
tasks
end
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment