Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@mirpedrol
Copy link
Member

@mirpedrol mirpedrol commented Dec 20, 2024

Pre-commit was not running when creating a pipeline (because there isn't a git repo yet at the point of creating the pipeline), but it is running when we use nf-core pipelines sync and create a new pipeline in the TEMPLATE branch

Should fix #3372

@codecov
Copy link

codecov bot commented Dec 20, 2024

Codecov Report

Attention: Patch coverage is 81.81818% with 4 lines in your changes missing coverage. Please review.

Project coverage is 76.16%. Comparing base (b685800) to head (80e06dc).
Report is 7 commits behind head on dev.

Files with missing lines Patch % Lines
nf_core/pipelines/lint_utils.py 80.00% 4 Missing ⚠️
Additional details and impacted files

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

Comment on lines 389 to 391
# Run prettier on files for pipelines sync
run_prettier_on_file([str(f) for f in self.outdir.glob("**/*")])

Copy link
Member Author

Choose a reason for hiding this comment

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

Needs more testing 👀

Copy link
Member Author

Choose a reason for hiding this comment

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

Tested, it runs prettier, it doesn't fix editorconfig errors, but the error found in test.config is fixed by this PR. I have also added a check to only run pre-commit if we are on a git repo, that way we won't run prettier when creating a pipeline as the repo is not initialised yet

@mirpedrol mirpedrol added this to the 3.1.2 milestone Dec 20, 2024
)


def check_git_repo() -> bool:
Copy link
Contributor

Choose a reason for hiding this comment

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

I thought we had already a function like this, but doesn't look like it.

@mirpedrol mirpedrol merged commit d4d3f36 into nf-core:dev Jan 13, 2025
89 checks passed
@mirpedrol mirpedrol deleted the run-prettier-on-sync branch January 13, 2025 11:42
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