From 7ba7a7ffc52a06f1ff32ac98829652d37265949c Mon Sep 17 00:00:00 2001 From: Thomas Sundvoll Date: Mon, 3 Jun 2024 21:40:05 +0200 Subject: [PATCH] Run as cli script command with 'isar' --- pyproject.toml | 3 +++ main.py => src/isar/script.py | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) rename main.py => src/isar/script.py (99%) diff --git a/pyproject.toml b/pyproject.toml index 37334f85..c917a985 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,6 +49,9 @@ dependencies = [ ] dynamic = ["version"] +[project.scripts] +isar-start = "isar.script:start" + [project.urls] repository = "https://github.com/equinor/isar.git" diff --git a/main.py b/src/isar/script.py similarity index 99% rename from main.py rename to src/isar/script.py index 66b67a84..a1059b91 100644 --- a/main.py +++ b/src/isar/script.py @@ -23,7 +23,8 @@ from isar.storage.uploader import Uploader from robot_interface.robot_interface import RobotInterface -if __name__ == "__main__": + +def start(): injector: Injector = get_injector() keyvault_client = injector.get(Keyvault)