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

Create: allow more special characters on the pipeline name for non-nf-core pipelines #3008

Merged
merged 4 commits into from
May 31, 2024

Conversation

mirpedrol
Copy link
Member

Close #2963

Use validation context from pydantic with Model initialization. See docs here

Adding a global variable was the only option to access the pipeline type from validation, where the app is not available, so we can't use class attributes.

Copy link

codecov bot commented May 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.18%. Comparing base (b02c993) to head (2b724e0).
Report is 5 commits behind head on dev.

Additional details and impacted files

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.



# Define a global variable to store the pipeline type
PIPELINE_TYPE_GLOBAL: Union[str, None] = None
Copy link
Contributor

Choose a reason for hiding this comment

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

How about making this an enum?

Copy link
Member Author

Choose a reason for hiding this comment

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

Your comment made me think that it's actually better to use a boolean, because we only have nf-core or not nf-core, so there's no need to do complicated things :)

@mirpedrol mirpedrol merged commit d7ce41b into nf-core:dev May 31, 2024
36 checks passed
@mirpedrol mirpedrol deleted the pipeline-name-validation branch May 31, 2024 07:38
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.

3 participants