-
Notifications
You must be signed in to change notification settings - Fork 187
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
Add option --fix
to update the meta.yml
file of subworkflows.
#3077
base: dev
Are you sure you want to change the base?
Add option --fix
to update the meta.yml
file of subworkflows.
#3077
Conversation
…ows-meta-yml-restructure
… running prettier to meta.yml file
Needs nf-core/modules#6679 to be merged at the same time. |
if self.component_type == "modules": | ||
inputs_table.add_column("Pattern", justify="right", style="green") | ||
elif self.component_type == "subworkflows": | ||
inputs_table.add_column("Structure", justify="right", style="green") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because this in the following is basically the same, like the inputs table, can't we just have a generic generate_params_table
function to reduce code duplication?
@@ -170,65 +171,95 @@ def _get_included_components_in_chained_tests(self, main_nf_test: Union[Path, st | |||
|
|||
def get_inputs_from_main_nf(self) -> None: | |||
"""Collect all inputs from the main.nf file.""" | |||
inputs: list[list[dict[str, dict[str, str]]]] = [] | |||
inputs: Any = [] # Can be 'list[list[dict[str, dict[str, str]]]]' or 'list[str]' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inputs: Any = [] # Can be 'list[list[dict[str, dict[str, str]]]]' or 'list[str]' | |
inputs: Union[List[List[Dict[str, Dict[str, str]]]],List[str]] = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This wasn't working, because we append one of the types later on :( I learnt about the overload decorator, but in our case it's not a function.
@@ -230,3 +237,56 @@ def lint_subworkflow(self, swf, progress_bar, registry, local=False): | |||
self.failed += warned | |||
|
|||
self.failed += [LintResult(swf, *s) for s in swf.failed] | |||
|
|||
def update_meta_yml_file(self, swf): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't this be shared component code between modules and subworkflows?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not the same structure, subworkflows have the channel name and description and then we will add a new level called structure
which describes the channel components
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but that can be handled like pattern
on a modules level, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but we want the description of the input and output channels for the subworkflow, at the meta.yml
level we don't know about the modules.
Follow up from #3028 and #3032
Add the option
--fix
to update themeta.yml
file of subworkflows.