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
a5200aa5
Commit
a5200aa5
authored
3 months ago
by
Riccardo Boero
Browse files
Options
Downloads
Patches
Plain Diff
Fix workflow task parsing
parent
fdcd1288
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Project.toml
+1
-1
1 addition, 1 deletion
Project.toml
src/TOMLParser.jl
+8
-1
8 additions, 1 deletion
src/TOMLParser.jl
with
9 additions
and
2 deletions
Project.toml
+
1
−
1
View file @
a5200aa5
name
=
"FACT_workflow_manager"
uuid
=
"34b7aff1-f91f-4b8b-9a3d-d0a54f07d855"
authors
=
[
"Riccardo Boero <ribo@nilu.no>"
]
version
=
"0.0.
8
"
version
=
"0.0.
9
"
[deps]
DataFrames
=
"a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
...
...
This diff is collapsed.
Click to expand it.
src/TOMLParser.jl
+
8
−
1
View file @
a5200aa5
...
...
@@ -54,14 +54,21 @@ function parseWorkflow(filePath::String)
# Flatten tasks into a list of dictionaries
tasks
=
[]
for
(
task_name
,
task_details
)
in
data
[
"tasks"
]
# Skip non-dictionary entries (e.g., `id = "no_counties"`)
if
task_details
isa
Dict
# Add the task name as the "id" and flatten into a single dictionary
task_details
[
"id"
]
=
task_name
push!
(
tasks
,
task_details
)
else
error
(
"Invalid task structure for task '
$
task_name': Expected a dictionary."
)
println
(
"Skipping non-dictionary task entry: '
$
task_name'. Value: "
,
task_details
)
end
end
# Validate that at least one task is parsed
if
isempty
(
tasks
)
error
(
"No valid tasks found in the workflow file."
)
end
return
tasks
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