Skip to content

add --migrate-pytest option#2549

Merged
mirpedrol merged 11 commits into
nf-core:devfrom
mirpedrol:modules-migrate
Dec 5, 2023
Merged

add --migrate-pytest option#2549
mirpedrol merged 11 commits into
nf-core:devfrom
mirpedrol:modules-migrate

Conversation

@mirpedrol

Copy link
Copy Markdown
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

Comment thread nf_core/components/create.py
Comment thread nf_core/components/create.py Outdated
@codecov

codecov Bot commented Nov 30, 2023

Copy link
Copy Markdown

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.

@mirpedrol mirpedrol requested a review from mashehu December 1, 2023 09:05

@mashehu mashehu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Very nice!

Comment thread CHANGELOG.md Outdated
Comment thread CHANGELOG.md Outdated
Comment thread nf_core/components/create.py Outdated
Comment thread nf_core/components/create.py Outdated
default=False,
):
with open(pytest_dir / "main.nf", "r") as fh:
log.info(fh.read())

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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?

Comment thread nf_core/components/create.py Outdated
Comment thread nf_core/components/create.py Outdated
Comment thread tests/modules/create.py Outdated
@mirpedrol mirpedrol merged commit de366d3 into nf-core:dev Dec 5, 2023
@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