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 support for Click TUI with Trogon #2655

Merged
merged 4 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
4 changes: 3 additions & 1 deletion nf_core/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import rich.logging
import rich.traceback
import rich_click as click
from trogon import tui

from nf_core import __version__
from nf_core.download import DownloadError
Expand All @@ -30,7 +31,7 @@
"nf-core": [
{
"name": "Commands for users",
"commands": ["list", "launch", "create-params-file", "download", "licences"],
"commands": ["list", "launch", "create-params-file", "download", "licences", "tui"],
},
{
"name": "Commands for developers",
Expand Down Expand Up @@ -111,6 +112,7 @@ def run_nf_core():
nf_core_cli(auto_envvar_prefix="NFCORE")


@tui()
@click.group(context_settings=dict(help_option_names=["-h", "--help"]))
@click.version_option(__version__)
@click.option("-v", "--verbose", is_flag=True, default=False, help="Print verbose output to the console.")
Expand Down
8 changes: 4 additions & 4 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
mypy
myst_parser
pytest-cov
pytest-datafiles
responses
ruff
Sphinx
sphinx-rtd-theme
mypy
types-PyYAML
types-requests
types-jsonschema
types-Markdown
types-PyYAML
types-requests
types-setuptools
ruff
5 changes: 3 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ jinja2
jsonschema>=3.0
markdown>=3.3
packaging
pdiff
pre-commit
prompt_toolkit>=3.0.3
pytest>=7.0.0
pytest-workflow>=1.6.0
pytest>=7.0.0
pyyaml
questionary>=1.8.0
refgenie
Expand All @@ -17,4 +18,4 @@ requests_cache
rich-click>=1.6.1
rich>=13.3.1
tabulate
pdiff
trogon
Loading