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 customisation option to remove all GitHub support with nf-core create #1766

Merged
merged 22 commits into from
Aug 29, 2022
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
708a9b0
add option to remove git hosting from pipeline template
mirpedrol Aug 25, 2022
a6d223e
add file bug_report.yml to files_exist when github hosting is not add…
mirpedrol Aug 25, 2022
8b7e1b1
update CHANGELOG
mirpedrol Aug 25, 2022
2277d2e
Merge branch 'dev' into no-git
mirpedrol Aug 25, 2022
cff1717
Generate new screengrabs with rich-codex
github-actions[bot] Aug 25, 2022
21565bd
disable progress bars in `nf-core (modules) lint` with `--hide-progress`
Aug 25, 2022
103325a
Generate new screengrabs with rich-codex
github-actions[bot] Aug 25, 2022
d55f089
fix argument order
Aug 25, 2022
6d020ae
Merge branch 'disable-lint-progress-bar' of https://github.com/masheh…
Aug 25, 2022
65735ea
update readme
Aug 25, 2022
1619574
Generate new screengrabs with rich-codex
github-actions[bot] Aug 25, 2022
cf31f5e
enable env variables for options, move hide-progress into decorator g…
Aug 29, 2022
39caa9f
Merge branch 'disable-lint-progress-bar' of https://github.com/masheh…
Aug 29, 2022
e30ebb4
include #1765 in this PR
mashehu Aug 29, 2022
f4449ea
Generate new screengrabs with rich-codex
github-actions[bot] Aug 29, 2022
6df2717
Merge pull request #1769 from mashehu/disable-lint-progress-bar
mashehu Aug 29, 2022
8a2317b
add option to remove git hosting from pipeline template
mirpedrol Aug 25, 2022
1980d81
add file bug_report.yml to files_exist when github hosting is not add…
mirpedrol Aug 25, 2022
1e3efde
update CHANGELOG
mirpedrol Aug 25, 2022
0597be6
merge conflicts
mirpedrol Aug 29, 2022
e64d248
merge conflicts
mirpedrol Aug 29, 2022
4ce9a75
Generate new screengrabs with rich-codex
github-actions[bot] Aug 29, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
enable env variables for options, move hide-progress into decorator g…
…roup
nf-core_bot committed Aug 29, 2022
commit cf31f5ec53a3110fe9bd48468e1bdf9054249af1
5 changes: 4 additions & 1 deletion .github/workflows/rich-codex.yml
Original file line number Diff line number Diff line change
@@ -22,6 +22,9 @@ jobs:

- name: Generate terminal images with rich-codex
uses: ewels/rich-codex@v1
env:
NFCORE_LINT_HIDE_PROGRESS: true
NFCORE_MODULES_LINT_HIDE_PROGRESS: true
with:
commit_changes: "true"
clean_img_paths: docs/images/*.svg
@@ -31,4 +34,4 @@ jobs:
which nf-core &&
nextflow -version &&
nf-core --version
PY_COLORS=true

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -428,7 +428,7 @@ before_command: >
fake_command: nf-core lint
-->

![`nf-core lint --hide-progress`](docs/images/nf-core-lint.svg)
![`nf-core lint`](docs/images/nf-core-lint.svg)

You can use the `-k` / `--key` flag to run only named tests for faster debugging, eg: `nf-core lint -k files_exist -k files_unchanged`. The `nf-core lint` command lints the current working directory by default, to specify another directory you can use `--dir <directory>`.

@@ -824,7 +824,7 @@ working_dir: tmp/modules
before_command: sed 's/1.13a/1.10/g' modules/multiqc/main.nf > modules/multiqc/main.nf.tmp && mv modules/multiqc/main.nf.tmp modules/multiqc/main.nf
-->

![`nf-core modules lint multiqc --hide-progress`](docs/images/nf-core-modules-lint.svg)
![`nf-core modules lint multiqc`](docs/images/nf-core-modules-lint.svg)

### Run the tests for a module using pytest

18 changes: 15 additions & 3 deletions nf_core/__main__.py
Original file line number Diff line number Diff line change
@@ -90,7 +90,19 @@ def run_nf_core():
stderr.print("\n")

# Lanch the click cli
nf_core_cli()
nf_core_cli(auto_envvar_prefix="NFCORE")


# taken from https://github.com/pallets/click/issues/108#issuecomment-194465429
_common_options = [
click.option("--hide-progress", is_flag=True, default=False, help="Don't show progress bars."),
]


def common_options(func):
for option in reversed(_common_options):
func = option(func)
return func


@click.group(context_settings=dict(help_option_names=["-h", "--help"]))
@@ -304,7 +316,7 @@ def create(name, description, author, version, no_git, force, outdir, template_y
@click.option("-w", "--fail-warned", is_flag=True, help="Convert warn tests to failures")
@click.option("--markdown", type=str, metavar="<filename>", help="File to write linting results to (Markdown)")
@click.option("--json", type=str, metavar="<filename>", help="File to write linting results to (JSON)")
@click.option("--hide-progress", is_flag=True, help="Don't show progress bars")
@common_options
def lint(dir, release, fix, key, show_passed, fail_ignored, fail_warned, markdown, json, hide_progress):
"""
Check pipeline code against nf-core guidelines.
@@ -667,7 +679,7 @@ def create_test_yml(ctx, tool, run_tests, output, force, no_prompts):
@click.option("--local", is_flag=True, help="Run additional lint tests for local modules")
@click.option("--passed", is_flag=True, help="Show passed tests")
@click.option("--fix-version", is_flag=True, help="Fix the module version if a newer version is available")
@click.option("--hide-progress", is_flag=True, help="Don't show progress bars")
@common_options
def lint(ctx, tool, dir, key, all, fail_warned, local, passed, fix_version, hide_progress):
"""
Lint one or more modules in a directory.