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

Add warning deprecation message to top-level commands #3036

Merged
merged 2 commits into from
Jun 25, 2024

Conversation

mirpedrol
Copy link
Member

Let top-level pipeline commands work to avoid breaking pipelines CI

image

Copy link
Contributor

@mashehu mashehu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we make the deprecation warning also red?

@mirpedrol mirpedrol merged commit 020e9e3 into nf-core:dev Jun 25, 2024
33 of 35 checks passed
@mirpedrol mirpedrol deleted the deprecation-message branch June 25, 2024 11:13
Comment on lines +2254 to +2268
from nf_core.pipelines.schema import PipelineSchema

schema_obj = PipelineSchema()
try:
schema_obj.get_schema_path(pipeline)
# Load and check schema
schema_obj.load_lint_schema()
except AssertionError as e:
log.error(e)
sys.exit(1)
schema_obj.load_input_params(params)
try:
schema_obj.validate_params()
except AssertionError:
sys.exit(1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Click CLI is just Python functions, so I don't think that you need to repeat this code. I think you can just call the new validate_schema() command with the supplied parameters directly (and same for the others).

Better to reduce code duplication and risk of error that way.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh ok! I didn't know that, makes sense 😄

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.

4 participants