lam-cli 0.1.5__tar.gz → 0.1.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {lam_cli-0.1.5/lam_cli.egg-info → lam_cli-0.1.7}/PKG-INFO +1 -1
- {lam_cli-0.1.5 → lam_cli-0.1.7}/lam/lam.py +35 -0
- {lam_cli-0.1.5 → lam_cli-0.1.7/lam_cli.egg-info}/PKG-INFO +1 -1
- {lam_cli-0.1.5 → lam_cli-0.1.7}/setup.py +1 -1
- {lam_cli-0.1.5 → lam_cli-0.1.7}/LICENSE +0 -0
- {lam_cli-0.1.5 → lam_cli-0.1.7}/README.md +0 -0
- {lam_cli-0.1.5 → lam_cli-0.1.7}/lam/__init__.py +0 -0
- {lam_cli-0.1.5 → lam_cli-0.1.7}/lam_cli.egg-info/SOURCES.txt +0 -0
- {lam_cli-0.1.5 → lam_cli-0.1.7}/lam_cli.egg-info/dependency_links.txt +0 -0
- {lam_cli-0.1.5 → lam_cli-0.1.7}/lam_cli.egg-info/entry_points.txt +0 -0
- {lam_cli-0.1.5 → lam_cli-0.1.7}/lam_cli.egg-info/requires.txt +0 -0
- {lam_cli-0.1.5 → lam_cli-0.1.7}/lam_cli.egg-info/top_level.txt +0 -0
- {lam_cli-0.1.5 → lam_cli-0.1.7}/setup.cfg +0 -0
|
@@ -871,6 +871,41 @@ def lam():
|
|
|
871
871
|
"""LAM - Laminar Data Transformation Tool"""
|
|
872
872
|
pass
|
|
873
873
|
|
|
874
|
+
@lam.command()
|
|
875
|
+
def initialize():
|
|
876
|
+
"""Initialize shared modules for supported engines."""
|
|
877
|
+
click.echo("Starting LAM initialization...")
|
|
878
|
+
|
|
879
|
+
engine_classes = [BunEngine, PythonEngine, JQEngine] # add other engines so we dont miss them in the future
|
|
880
|
+
|
|
881
|
+
# Define placeholder IDs for engine instantiation during initialization
|
|
882
|
+
init_workspace_id = "lam_init_workspace"
|
|
883
|
+
init_flow_id = "lam_init_flow"
|
|
884
|
+
init_execution_id = "lam_init_execution"
|
|
885
|
+
|
|
886
|
+
for engine_class in engine_classes:
|
|
887
|
+
engine_name = engine_class.__name__
|
|
888
|
+
click.echo(f"Checking {engine_name} for shared module setup...")
|
|
889
|
+
try:
|
|
890
|
+
# Instantiate engine to access instance methods like _setup_shared_modules
|
|
891
|
+
engine_instance = engine_class(
|
|
892
|
+
workspace_id=init_workspace_id,
|
|
893
|
+
flow_id=init_flow_id,
|
|
894
|
+
execution_id=init_execution_id
|
|
895
|
+
)
|
|
896
|
+
|
|
897
|
+
if hasattr(engine_instance, '_setup_shared_modules') and callable(getattr(engine_instance, '_setup_shared_modules')):
|
|
898
|
+
click.echo(f"Running _setup_shared_modules for {engine_name}...")
|
|
899
|
+
getattr(engine_instance, '_setup_shared_modules')()
|
|
900
|
+
click.echo(f"Successfully initialized shared modules for {engine_name}.")
|
|
901
|
+
else:
|
|
902
|
+
click.echo(f"{engine_name} does not have a _setup_shared_modules method or it's not callable.")
|
|
903
|
+
except Exception as e:
|
|
904
|
+
click.echo(f"Error during initialization of {engine_name}: {e}", err=True)
|
|
905
|
+
logger.error(f"Initialization error for {engine_name}", exc_info=True)
|
|
906
|
+
|
|
907
|
+
click.echo("LAM initialization complete.")
|
|
908
|
+
|
|
874
909
|
@lam.command()
|
|
875
910
|
@click.argument('program_file', type=click.Path(exists=True))
|
|
876
911
|
@click.argument('input', type=str)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|