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 --migrate-pytest option #2549

Merged
merged 11 commits into from
Dec 5, 2023
Merged

Conversation

mirpedrol
Copy link
Member

PR checklist

  • This comment contains a description of changes (with reason)
  • CHANGELOG.md is updated
  • If you've fixed a bug or added code that should be tested, add tests!
  • Documentation in docs is updated

Copy link

codecov bot commented Nov 30, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (a91d411) 74.88% compared to head (e895e0c) 75.02%.

❗ Current head e895e0c differs from pull request most recent head bda4601. Consider uploading reports for the commit bda4601 to get more accurate results

Files Patch % Lines
nf_core/__main__.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #2549      +/-   ##
==========================================
+ Coverage   74.88%   75.02%   +0.14%     
==========================================
  Files          85       85              
  Lines        9222     9271      +49     
==========================================
+ Hits         6906     6956      +50     
+ Misses       2316     2315       -1     

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

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.

Very nice!

CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
nf_core/components/create.py Outdated Show resolved Hide resolved
nf_core/components/create.py Outdated Show resolved Hide resolved
default=False,
):
with open(pytest_dir / "main.nf", "r") as fh:
log.info(fh.read())
Copy link
Contributor

Choose a reason for hiding this comment

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

can we use the Syntax function from rich to add syntax highlighting?

Copy link
Member Author

Choose a reason for hiding this comment

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

We are already using rich Logging. Not the best highlighting Nextflow but strings and functions are highlighted:
image

Copy link
Contributor

Choose a reason for hiding this comment

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

hmm, can we make it somehow easier to copy this text? e.g. add it to the pasteboard?

Copy link
Member Author

Choose a reason for hiding this comment

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

We would need to add a new library or take into account different OS.
Also, the important parts to copy over are only the input declarations. I'm not sure if it's worth it copying the whole file to the clipboard.
The current default is to not print the content of this file and not delete it. Do you think this is easier?

nf_core/components/create.py Outdated Show resolved Hide resolved
nf_core/components/create.py Outdated Show resolved Hide resolved
tests/modules/create.py Outdated Show resolved Hide resolved
@mirpedrol mirpedrol merged commit de366d3 into nf-core:dev Dec 5, 2023
18 of 20 checks passed
@mirpedrol mirpedrol deleted the modules-migrate branch December 5, 2023 18:06
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