smoke test working
This commit is contained in:
parent
3131f93371
commit
6ea5e6ed76
3 changed files with 49 additions and 1 deletions
|
|
@ -11,7 +11,9 @@ click = "^8.1.7"
|
||||||
python-dotenv = "^1.0.1"
|
python-dotenv = "^1.0.1"
|
||||||
pyfiglet = "^1.0.2"
|
pyfiglet = "^1.0.2"
|
||||||
|
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["poetry-core"]
|
requires = ["poetry-core"]
|
||||||
build-backend = "poetry.core.masonry.api"
|
build-backend = "poetry.core.masonry.api"
|
||||||
|
|
||||||
|
[tool.poetry.scripts]
|
||||||
|
xexe = "xexe.cli:cli"
|
||||||
39
xexe/cli.py
Normal file
39
xexe/cli.py
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
import importlib.metadata
|
||||||
|
import logging
|
||||||
|
|
||||||
|
import click
|
||||||
|
import pyfiglet
|
||||||
|
from dotenv import load_dotenv
|
||||||
|
|
||||||
|
from xexe.constants import PATHS
|
||||||
|
|
||||||
|
logging.basicConfig(
|
||||||
|
level=logging.DEBUG,
|
||||||
|
format="%(asctime)s - [%(levelname)s] - %(filename)s - L%(lineno)d - %(message)s",
|
||||||
|
handlers=[logging.FileHandler(PATHS.logging_file), logging.StreamHandler()],
|
||||||
|
)
|
||||||
|
|
||||||
|
logger = logging.getLogger()
|
||||||
|
|
||||||
|
load_dotenv()
|
||||||
|
|
||||||
|
|
||||||
|
@click.group()
|
||||||
|
def cli():
|
||||||
|
logger.info(pyfiglet.figlet_format("Welcome to xexe", font="big"))
|
||||||
|
logger.info(f"Running xexe version: {importlib.metadata.version('xexe')}")
|
||||||
|
|
||||||
|
|
||||||
|
@cli.command()
|
||||||
|
def smoke_test():
|
||||||
|
print("Oink oink!")
|
||||||
|
print(
|
||||||
|
"""
|
||||||
|
__,---.__
|
||||||
|
,-' `-.__
|
||||||
|
&/ `._\ _\\
|
||||||
|
/ ''._
|
||||||
|
| , (")
|
||||||
|
|__,'`-..--|__|--''
|
||||||
|
"""
|
||||||
|
)
|
||||||
7
xexe/constants.py
Normal file
7
xexe/constants.py
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
import pathlib
|
||||||
|
from dataclasses import dataclass
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class PATHS:
|
||||||
|
logging_file: pathlib.Path = pathlib.Path("xexe.log")
|
||||||
Loading…
Add table
Add a link
Reference in a new issue