Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# make testall # run pytest in each venv
# make clean-venvs # remove created venv directories

PYTHONS := 3.10 3.11 3.12 3.13
PYTHONS := 3.10 3.11 3.12 3.13 # 3.14 in the near future
VENV_PREFIX := .venv-
CC ?= gcc
export CC
Expand Down
38 changes: 23 additions & 15 deletions poly_lithic/scripts/main.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,31 @@
"""
Main entry point for poly_lithic CLI.

Provides backward compatibility while supporting new Click-based commands.
"""


def main():
import asyncio
import logging
import os
from poly_lithic.src.cli import model_main, setup
from poly_lithic.src.logging_utils import make_logger, reset_logging
"""
Main entry point that supports both old and new CLI styles.

logger = make_logger('model_manager')
logger.info('Starting model manager')
Old style (still works):
python -m poly_lithic.scripts.main --config config.yaml --debug

(args, config, broker) = setup()
print('resetting logging...')
reset_logging()
New style (recommended):
poly-lithic --config config.yaml --debug
poly-lithic run --config config.yaml
poly-lithic plugin init --name my-plugin
"""
import sys
from poly_lithic.src.cli import cli

if os.environ.get('DEBUG') == 'True':
logger = make_logger('model_manager', level=logging.DEBUG)
else:
logger = make_logger('model_manager')
# If no arguments, show help
if len(sys.argv) == 1:
sys.argv.append('--help')

asyncio.run(model_main(args, config, broker))
# Run the Click CLI
cli()


if __name__ == '__main__':
Expand Down
Loading
Loading