Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass single argument string to ShellTasks #72

Merged
merged 11 commits into from
Dec 21, 2024

Conversation

GeigerJ2
Copy link
Collaborator

Alternative to #69, and removes the pydantic model that was introduced in #66.

@GeigerJ2 GeigerJ2 changed the base branch from main to workgraph December 19, 2024 13:43
@GeigerJ2
Copy link
Collaborator Author

GeigerJ2 commented Dec 19, 2024

Pinging @agoscinski if you want to review and merge. We can still move to the option in #69. But this at least already manages to run an example through and updates the workgraph types, etc., after the rebase.

@agoscinski agoscinski merged commit 0cd2ae5 into workgraph Dec 21, 2024
2 of 3 checks passed
@agoscinski agoscinski deleted the workgraph-shell-old-wg-singlestring branch December 21, 2024 05:29
agoscinski added a commit that referenced this pull request Dec 30, 2024
TODO remove expandvars hack, use by default local folder

TODO remove example reference from tests

Arbitrary CLI args for shell tasks (#66)

This PR adds the `_CliArgsBaseModel` class (inspired from `_WhenBaseModel`), which replaces the `command_option` and `input_arg_options` of the `ConfigShellTaskSpecs`. Validation is applied on the correctness of the keyword and positional arguments to ensure they start with `-` or `--`.

The three test YAML files are updated accordingly, leading to changes in the pretty-print test text files, which is also part of the PR.

Actually making something useful out of these arguments only happens when the WG is created, so will require #45 to be merged.

Fix svgs being created in main directory. (#67)

Create `svg` files in subdirectory under `tests/files/svgs` instead of top-level directory, and ignore them via `.gitignore`, while syncing the `svgs` directory.
Merge remote-tracking branch 'origin/main' into workgraph

---

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`

reimplementing cli_arguments

change to unspecified inputs are added as positional cli args automatically

delete examples

add files required to run the workflow

remove old files

use rootdir from config

move files to confi folder

adapt configs to relativ to config folder

rm expandvars

fix hatch fmt

fix hatch fmt

update reference

rm comment
agoscinski added a commit that referenced this pull request Dec 30, 2024
TODO remove expandvars hack, use by default local folder

TODO remove example reference from tests

Arbitrary CLI args for shell tasks (#66)

This PR adds the `_CliArgsBaseModel` class (inspired from `_WhenBaseModel`), which replaces the `command_option` and `input_arg_options` of the `ConfigShellTaskSpecs`. Validation is applied on the correctness of the keyword and positional arguments to ensure they start with `-` or `--`.

The three test YAML files are updated accordingly, leading to changes in the pretty-print test text files, which is also part of the PR.

Actually making something useful out of these arguments only happens when the WG is created, so will require #45 to be merged.

Fix svgs being created in main directory. (#67)

Create `svg` files in subdirectory under `tests/files/svgs` instead of top-level directory, and ignore them via `.gitignore`, while syncing the `svgs` directory.
Merge remote-tracking branch 'origin/main' into workgraph

---

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`

reimplementing cli_arguments

change to unspecified inputs are added as positional cli args automatically

delete examples

add files required to run the workflow

remove old files

use rootdir from config

move files to confi folder

adapt configs to relativ to config folder

rm expandvars

fix hatch fmt

fix hatch fmt

update reference

rm comment
agoscinski added a commit that referenced this pull request Dec 31, 2024
TODO remove expandvars hack, use by default local folder

TODO remove example reference from tests

Arbitrary CLI args for shell tasks (#66)

This PR adds the `_CliArgsBaseModel` class (inspired from `_WhenBaseModel`), which replaces the `command_option` and `input_arg_options` of the `ConfigShellTaskSpecs`. Validation is applied on the correctness of the keyword and positional arguments to ensure they start with `-` or `--`.

The three test YAML files are updated accordingly, leading to changes in the pretty-print test text files, which is also part of the PR.

Actually making something useful out of these arguments only happens when the WG is created, so will require #45 to be merged.

Fix svgs being created in main directory. (#67)

Create `svg` files in subdirectory under `tests/files/svgs` instead of top-level directory, and ignore them via `.gitignore`, while syncing the `svgs` directory.
Merge remote-tracking branch 'origin/main' into workgraph

---

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`

reimplementing cli_arguments

change to unspecified inputs are added as positional cli args automatically

delete examples

add files required to run the workflow

remove old files

use rootdir from config

move files to confi folder

adapt configs to relativ to config folder

rm expandvars

fix hatch fmt

fix hatch fmt

update reference

rm comment

implement wait_on

clean up code

clean up add doc
agoscinski added a commit that referenced this pull request Jan 1, 2025
TODO remove expandvars hack, use by default local folder

TODO remove example reference from tests

Arbitrary CLI args for shell tasks (#66)

This PR adds the `_CliArgsBaseModel` class (inspired from `_WhenBaseModel`), which replaces the `command_option` and `input_arg_options` of the `ConfigShellTaskSpecs`. Validation is applied on the correctness of the keyword and positional arguments to ensure they start with `-` or `--`.

The three test YAML files are updated accordingly, leading to changes in the pretty-print test text files, which is also part of the PR.

Actually making something useful out of these arguments only happens when the WG is created, so will require #45 to be merged.

Fix svgs being created in main directory. (#67)

Create `svg` files in subdirectory under `tests/files/svgs` instead of top-level directory, and ignore them via `.gitignore`, while syncing the `svgs` directory.
Merge remote-tracking branch 'origin/main' into workgraph

---

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`

reimplementing cli_arguments

change to unspecified inputs are added as positional cli args automatically

delete examples

add files required to run the workflow

remove old files

use rootdir from config

move files to confi folder

adapt configs to relativ to config folder

rm expandvars

fix hatch fmt

fix hatch fmt

update reference

rm comment

implement wait_on

clean up code

clean up add doc

cli parameters

update tests

test work

fix everything
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants