-
Notifications
You must be signed in to change notification settings - Fork 223
[WIP] Command to generate pipeline container config files #3955
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
base: dev
Are you sure you want to change the base?
[WIP] Command to generate pipeline container config files #3955
Conversation
6341cd3 to
b8004aa
Compare
Co-authored-by: Matthias Hörtenhuber <[email protected]>
|
|
||
| def __init__( | ||
| self, | ||
| workflow_directory: str | Path = ".", |
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.
| workflow_directory: str | Path = ".", | |
| workflow_directory: Path = Path("."), |
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.
let's make this simpler
| workflow_directory: str | Path = ".", | ||
| org: str = "nf-core", | ||
| ): | ||
| self.workflow_directory = Path(workflow_directory) |
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.
| self.workflow_directory = Path(workflow_directory) | |
| self.workflow_directory = workflow_directory |
| return None | ||
|
|
||
|
|
||
| def try_generate_container_configs(directory: str | Path, path: 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.
| def try_generate_container_configs(directory: str | Path, path: str): | |
| def try_generate_container_configs(directory: Path, path: Path): |
let's make this simpler
| try: | ||
| # Run nextflow inspect | ||
| executable = "nextflow" | ||
| cmd_params = f"inspect -format config {self.workflow_directory}" | ||
| cmd_out = run_cmd(executable, cmd_params) | ||
| if cmd_out is None: | ||
| raise UserWarning("Failed to run `nextflow inspect`. Please check your Nextflow installation.") |
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.
I have a feeling we have this multiple times in our code base. should this be a utils function?
| try: | ||
| # Run nextflow inspect | ||
| executable = "nextflow" | ||
| cmd_params = f"inspect -format config {self.workflow_directory}" |
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.
why not -format json would make it easier to parse and we would not need any regex
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.
so instead of writing the default out first and extracting all info from there, i would hold the config info in a dict and write it out to all configs from there.
close #3953
Done:
nextflow inspectand obtain docker config filenf-core modules install|update|removeTODO: