Skip to content

Commit 279d74b

Browse files
Merge pull request #15 from caffeine-addictt/dev
Adding CLI
2 parents 91db5c8 + a97f232 commit 279d74b

File tree

9 files changed

+484
-21
lines changed

9 files changed

+484
-21
lines changed

.coverage

0 Bytes
Binary file not shown.

poetry.lock

Lines changed: 146 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: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,14 @@ classifiers = [
2020
[tool.poetry.urls]
2121
"Bug Tracker" = "https://github.com/caffeine-addictt/thread/issues"
2222

23+
[tool.poetry.scripts]
24+
thread = "thread.__main__:app"
25+
2326
[tool.poetry.dependencies]
2427
python = "^3.9"
2528
numpy = "^1.26.2"
2629
typing-extensions = "^4.8.0"
30+
typer = {extras = ["all"], version = "^0.9.0"}
2731

2832

2933
[tool.poetry.group.dev.dependencies]

src/thread/__main__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
# To make CLI accessible with py/python/python3 -m thread ...
3+
from .cli import app
4+
5+
if __name__ == '__main__':
6+
app(prog_name = 'thread')

src/thread/cli/__init__.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
"""
2+
Import and config CLI commands
3+
"""
4+
5+
__version__ = '0.1.2'
6+
from ..config import logging, ColorLogger
7+
logging.setLoggerClass(ColorLogger)
8+
9+
10+
# Import #
11+
from .base import cli_base as app

0 commit comments

Comments
 (0)