Skip to content

Commit c2ef698

Browse files
authored
Merge pull request #3 from code-yeongyu/feature/cli-skeleton
Add cli skeleton
2 parents d36e204 + 8307bb7 commit c2ef698

File tree

6 files changed

+109
-3
lines changed

6 files changed

+109
-3
lines changed

poetry.lock

Lines changed: 90 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ addopts = ["--cov=ygka"]
4545
[tool.poetry.dependencies]
4646
python = "^3.9"
4747
poetry = "^1.4.0"
48+
typer = { extras = ["all"], version = "^0.7.0" }
49+
rich = "<13.0.0" # limited version as 13.0.0 because of typer
4850

4951
[tool.poetry.scripts]
5052
ygka = "ygka:main"

ygka/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1+
from .cli import cli_app
2+
3+
14
def main():
2-
print('Hello, World!')
5+
cli_app()

ygka/cli/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
from .ygka import ygka_command as _ # noqa
2+
from .cli_app import cli_app as cli_app

ygka/cli/cli_app.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from typer import Typer
2+
3+
cli_app = Typer()

ygka/cli/ygka.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from rich import print as pprint
2+
3+
from .cli_app import cli_app
4+
5+
6+
@cli_app.command()
7+
def ygka_command():
8+
pprint('[bold]Hello World![/bold]')

0 commit comments

Comments
 (0)