Skip to content

Adding CLI #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .coverage
Binary file not shown.
148 changes: 146 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,14 @@ classifiers = [
[tool.poetry.urls]
"Bug Tracker" = "https://github.com/caffeine-addictt/thread/issues"

[tool.poetry.scripts]
thread = "thread.__main__:app"

[tool.poetry.dependencies]
python = "^3.9"
numpy = "^1.26.2"
typing-extensions = "^4.8.0"
typer = {extras = ["all"], version = "^0.9.0"}


[tool.poetry.group.dev.dependencies]
Expand Down
6 changes: 6 additions & 0 deletions src/thread/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

# To make CLI accessible with py/python/python3 -m thread ...
from .cli import app

if __name__ == '__main__':
app(prog_name = 'thread')
11 changes: 11 additions & 0 deletions src/thread/cli/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
"""
Import and config CLI commands
"""

__version__ = '0.1.2'
from ..config import logging, ColorLogger
logging.setLoggerClass(ColorLogger)


# Import #
from .base import cli_base as app
Loading