Skip to content

Commit

Permalink
scaffolded cli
Browse files Browse the repository at this point in the history
  • Loading branch information
milesagraham committed May 16, 2024
1 parent dd3c2ea commit d581c8f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ repository = "https://github.com/teamtomo/ttmask"
# Entry points
# https://peps.python.org/pep-0621/#entry-points
# same as console_scripts entry point
# [project.scripts]
# ttmask-cli = "ttmask:main_cli"
[project.scripts]
ttmask = "ttmask:cli"

# [project.entry-points."some.group"]
# tomatoes = "ttmask:main_tomatoes"
Expand Down
4 changes: 4 additions & 0 deletions src/ttmask/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@
__version__ = "uninstalled"
__author__ = "Miles Graham"
__email__ = "[email protected]"

from ._cli import cli
from .sphere import sphere

3 changes: 3 additions & 0 deletions src/ttmask/_cli.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import typer

cli = typer.Typer(name="ttmask")
6 changes: 6 additions & 0 deletions src/ttmask/sphere.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from ._cli import cli


@cli.command(name='test1')
def sphere(name: str, number: int):
print('bla')

0 comments on commit d581c8f

Please sign in to comment.