Skip to content

Commit

Permalink
scaffolded cli tool (#5)
Browse files Browse the repository at this point in the history
* Add dependencies

* scaffolded cli
  • Loading branch information
milesagraham authored May 16, 2024
1 parent efe0407 commit ebceec3
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ classifiers = [
"Typing :: Typed",
]
# add your package dependencies here
dependencies = []
dependencies = [
"numpy",
"typer",
]

# https://peps.python.org/pep-0621/#dependencies-optional-dependencies
# "extras" (e.g. for `pip install .[test]`)
Expand All @@ -59,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 ebceec3

Please sign in to comment.