Skip to content

Conversation

@bernt-matthias
Copy link
Collaborator

Expand can be used everywhere and adds

ExpandIO adds an additional token with the same name as the macro
but in upper case to the commands section. Can only be used as
child of inputs and outputs

@hexylena
Copy link
Owner

Cool! This makes sense. Just going to wait for travis to be back online to merge, if that's OK

@bernt-matthias
Copy link
Collaborator Author

Not ready yet. I will ping you.

@hexylena hexylena changed the title adds expand nodes (macros) [WIP] adds expand nodes (macros) Apr 20, 2020
@hexylena
Copy link
Owner

Ok, retitled since I assumed it was. Thanks for contributing!

@bernt-matthias
Copy link
Collaborator Author

I guess this is nearly done. I would suggest that I extent the tests in hexylena/argparse2tool#65 such that you see it in action.

bernt-matthias added a commit to bernt-matthias/argparse2tool that referenced this pull request Apr 30, 2020
bernt-matthias added a commit to bernt-matthias/argparse2tool that referenced this pull request Jul 29, 2020
bernt-matthias added a commit to bernt-matthias/argparse2tool that referenced this pull request Jul 29, 2020
bernt-matthias added a commit to bernt-matthias/argparse2tool that referenced this pull request Jul 29, 2020
@bernt-matthias
Copy link
Collaborator Author

bernt-matthias commented Jan 24, 2021

TODOs:

  • test like example.py

@bernt-matthias bernt-matthias changed the title [WIP] adds expand nodes (macros) adds expand nodes (macros) Jan 25, 2021
Expand can be used everywhere and adds <expand macro="...">

ExpandIO adds an additional token with the same name as the macro
but in upper case to the commands section. Can only be used as
child of inputs and outputs
each subparser that is a parent of another is becomes
a two macros (in/out) and a token (commandline).

implemented in MacrosTool
if attribute is absent introduce <expand ...> with predefined name
- correct identifiers
- create cli for children
- plus docs

- also return at least some TODO in the CLI
  generated for output collections
if there is a when (which has a None identifier)
on the path to the root then the export failed.

also fix linter errors
@hexylena hexylena merged commit 806488c into hexylena:master Feb 4, 2021
@bernt-matthias bernt-matthias deleted the topic/macros branch February 4, 2021 09:36
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