diff --git a/bee-hive/bee_hive/__init__.py b/bee-hive/bee_hive/__init__.py index d7efe68..a8fb447 100644 --- a/bee-hive/bee_hive/__init__.py +++ b/bee-hive/bee_hive/__init__.py @@ -1,5 +1,6 @@ + __all__ = [ - "agent", - "workflow", - "interface", + "Agent", + "Workflow", + "Interface", ] diff --git a/bee-hive/cli/beeAI.py b/bee-hive/cli/beeAI.py index e9fd1fa..cb7aee2 100755 --- a/bee-hive/cli/beeAI.py +++ b/bee-hive/cli/beeAI.py @@ -32,13 +32,16 @@ -v --version Show version. """ -import os, sys, traceback +import sys from docopt import docopt +from cli.common import Console +from cli.cli import CLI -from cli import * - -if __name__ == '__main__': +def run_cli(): + """ + run CLI command + """ args = docopt(__doc__, version='beeAI CLI v0.0.1') command = CLI(args).command() try: @@ -50,3 +53,5 @@ Console.error(str(e)) sys.exit(1) +if __name__ == '__main__': + run_cli() \ No newline at end of file diff --git a/bee-hive/cli/cli.py b/bee-hive/cli/cli.py index 1fd9397..ddc0baf 100644 --- a/bee-hive/cli/cli.py +++ b/bee-hive/cli/cli.py @@ -12,10 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import io, sys - -from commands import * -from common import * +from cli.commands import Validate class CLI: def __init__(self, args): diff --git a/bee-hive/cli/commands.py b/bee-hive/cli/commands.py index 566a062..4b5c2d5 100644 --- a/bee-hive/cli/commands.py +++ b/bee-hive/cli/commands.py @@ -12,10 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -import io, sys, yaml, json, jsonschema +import yaml, json, jsonschema from jsonschema.exceptions import ValidationError -from common import Console +from cli.common import Console # Base class for all commands class Command: diff --git a/bee-hive/cli/common.py b/bee-hive/cli/common.py index 3f32006..d11aec6 100644 --- a/bee-hive/cli/common.py +++ b/bee-hive/cli/common.py @@ -13,7 +13,6 @@ # limitations under the License. import sys -from random import randint VERBOSE=False diff --git a/bee-hive/pyproject.toml b/bee-hive/pyproject.toml index c32f593..734705c 100644 --- a/bee-hive/pyproject.toml +++ b/bee-hive/pyproject.toml @@ -5,6 +5,10 @@ description = "A multi-agent platform with the vision to facilitate deploy and r authors = ["IBM"] license = "Apache 2.0" readme = "README.md" +packages = [ + { include = "bee_hive", from = "." }, + { include = "cli", from = "." } +] [tool.poetry.dependencies] python = ">= 3.11, < 3.13" @@ -14,7 +18,6 @@ python-dotenv = "^1.0.1" jsonschema = "^4.23.0" docopt-ng = "^0.9.0" - [tool.poetry.group.dev.dependencies] [tool.poetry.group.test.dependencies] @@ -27,3 +30,6 @@ build-backend = "poetry.core.masonry.api" [tool.pytest.ini_options] addopts = "-v -s" + +[tool.poetry.scripts] +"beeAI" = "cli.beeAI:run_cli"