Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ExoImport
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
exoplanet
ExoImport
Merge requests
!13
Typer for the command help
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
Typer for the command help
FEATURE_typer_help
into
main
Overview
5
Commits
3
Pipelines
3
Changes
12
All threads resolved!
Hide all comments
Merged
Chosson Ulysse
requested to merge
FEATURE_typer_help
into
main
2 years ago
Overview
5
Commits
3
Pipelines
3
Changes
12
All threads resolved!
Hide all comments
[0.8.0] - 2022-09-29
Added
Add a typer command for
help
in the user terminal interface.
0
0
Merge request reports
Compare
main
version 2
a4a8463b
2 years ago
version 1
282586a5
2 years ago
main (base)
and
latest version
latest version
f332ece1
3 commits,
2 years ago
version 2
a4a8463b
2 commits,
2 years ago
version 1
282586a5
1 commit,
2 years ago
12 files
+
571
−
2
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
12
cli_app/cli.py
+
29
−
0
View file @ f332ece1
Edit in single-file editor
Open in Web IDE
Show full file
@@ -28,6 +28,7 @@ from .callback import (
version_callback
,
yaml_file_callback
,
)
from
.help
import
display_md_file_content
,
get_resume
from
.translate
import
do_filteration
,
do_validation
from
.utils
import
display_error_no_debug
@@ -41,6 +42,34 @@ APP = typer.Typer(
CONSOLE
=
Console
()
@APP.command
(
name
=
"
help
"
,
help
=
"
[bold white on black]Display help for Exo Import.
"
"
:question_mark:[/bold white on black]
"
,
rich_help_panel
=
"
Documentation
"
,
)
def
display_help
(
topic
:
str
=
typer
.
Argument
(
None
,
help
=
"
Topic on which you want more information.
"
,
show_default
=
False
,
),
)
->
None
:
"""
Command use to display all help for Exo Import.
Args:
topic: Topic on which we want documentation. None by default which means
that we display the documentation of the help command.
"""
# TODO: Ecrire les fichier .md dans docs/help/
match
topic
:
case
None
:
CONSOLE
.
print
(
get_resume
(),
soft_wrap
=
True
)
case
_
:
display_md_file_content
(
topic
)
@APP.command
(
name
=
"
translate
"
,
help
=
"
[bold white on black]Translate a csv file to normalized
"
Loading