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

Refactor --hide-progress to be at the top level CLI #2016

Merged
merged 2 commits into from
Nov 10, 2022

Conversation

ewels
Copy link
Member

@ewels ewels commented Nov 10, 2022

  • Have --hide-progress shared at the top level of the CLI, instead of repeated for specific subcommands
    • nf-core --hide-progress lint instead of nf-core lint --hide-progress
    • Makes it easier to reuse in any subcommand
    • Remove slightly odd code to share common CLI flags
  • Honour hide_progress setting when linting modules (was ignored before)
  • Always hide progress bars when using a verbose log

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
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.

Do we need to update the environment variable in rich-codex.yml with the NFCORE prefix?

@ewels
Copy link
Member Author

ewels commented Nov 10, 2022

Do we need to update the environment variable in rich-codex.yml with the NFCORE prefix?

Looks like that env var is used directly rather than via Click, so no:

disable=self.hide_progress or os.environ.get("HIDE_PROGRESS", None) is not None,

@ewels ewels changed the title Refactor --hide-progress to be at the top level CLI Refactor --hide-progress to be at the top level CLI Nov 10, 2022
@codecov
Copy link

codecov bot commented Nov 10, 2022

Codecov Report

Merging #2016 (b222d89) into dev (d3967e9) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##              dev    #2016      +/-   ##
==========================================
- Coverage   63.86%   63.84%   -0.03%     
==========================================
  Files          41       41              
  Lines        4926     4923       -3     
==========================================
- Hits         3146     3143       -3     
  Misses       1780     1780              
Impacted Files Coverage Δ
nf_core/__main__.py 59.36% <100.00%> (-0.23%) ⬇️
nf_core/modules/lint/__init__.py 82.97% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@ewels ewels merged commit 8e81fe8 into nf-core:dev Nov 10, 2022
@ewels ewels deleted the top-level-hide-progress branch November 10, 2022 14:03
ewels added a commit to ewels/nf-core-tools that referenced this pull request Nov 15, 2022
@ewels ewels mentioned this pull request Nov 15, 2022
4 tasks
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