-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pass single argument string to
ShellTasks
(#72)
* Try to make current example YAML files run through. * Update class names after rebase/merge * Add `no_icon` config file * First working version apart from flags. * Try fixing argument format. * Current state before branch-off. * Pass one multi-line string as `cli_argument` * Cleanup. * Pass arguments as list. * Remove `workgraph-dev.py` dev file. * Fix issues from `hatch fmt`
- Loading branch information
Showing
12 changed files
with
205 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
pytest_plugins = ['aiida.tools.pytest_fixtures'] | ||
pytest_plugins = ["aiida.tools.pytest_fixtures"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
start_date: &root_start_date '2026-01-01T00:00' | ||
end_date: &root_end_date '2026-02-01T00:00' | ||
cycles: | ||
- bimonthly_tasks: | ||
start_date: *root_start_date | ||
end_date: *root_end_date | ||
period: P2M | ||
tasks: | ||
- shell_task: | ||
inputs: | ||
- initial_conditions: | ||
when: | ||
at: *root_start_date | ||
- data1: | ||
when: | ||
at: *root_start_date | ||
outputs: [restart] | ||
tasks: | ||
- shell_task: | ||
plugin: shell | ||
# Currently full task, so running the script actually works | ||
command: /home/geiger_j/aiida_projects/swiss-twins/git-repos/Sirocco/tests/files/scripts/shell_task.sh | ||
cli_argument: > | ||
--restart_kwarg restart_value | ||
--verbosity 2 | ||
--init {initial_conditions} | ||
--test-flag | ||
{data1} | ||
data2 | ||
# Unfortunately not possible to add comments to multiline string, which was my original idea to make it more | ||
# readable: https://stackoverflow.com/questions/20890445/yaml-comments-in-multi-line-strings | ||
# --restart_kwarg restart_value # ? Keyword with normal str/int/float value | ||
# --verbosity 2 # ? Keyword with normal int value | ||
# --init {initial_conditions} # ? Keyword with reference to AiiDA node (available data) or AiiDA-WG socket | ||
# --test-flag # ? Normal flag | ||
# {data1} # ? Positional argument with reference | ||
# data2 # ? Positional argument without AiiDA entity reference (even required)? | ||
env_source_files: | ||
- tests/files/data/dummy_source_file.sh | ||
data: | ||
available: | ||
- initial_conditions: | ||
type: file | ||
src: tests/files/data/initial_conditions2 | ||
- data1: | ||
type: file | ||
src: tests/files/data/data-xyz | ||
generated: | ||
- restart: | ||
type: file | ||
src: restart |
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
#!/usr/bin/env python | ||
|
||
|
||
def main(): | ||
# Main script execution continues here | ||
print("Cleaning") | ||
|
||
|
||
if __name__ == '__main__': | ||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.