lam-cli 0.1.5__py3-none-any.whl → 0.1.7__py3-none-any.whl

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/lam.py CHANGED
@@ -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)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lam-cli
3
- Version: 0.1.5
3
+ Version: 0.1.7
4
4
  Summary: Secure data transformation tool supporting JQ and JavaScript (Bun)
5
5
  Home-page: https://github.com/laminar-run/lam
6
6
  Author: Laminar Run, Inc.
@@ -0,0 +1,8 @@
1
+ lam/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ lam/lam.py,sha256=jlK7-O--3nQSdGKy7YnIeWA8ToiJ2Q46TpnEuEqpFSk,38306
3
+ lam_cli-0.1.7.dist-info/licenses/LICENSE,sha256=ixuiBLtpoK3iv89l7ylKkg9rs2GzF9ukPH7ynZYzK5s,35148
4
+ lam_cli-0.1.7.dist-info/METADATA,sha256=jVVE7ktM1tzCIjNlG3UYb_fKDaziInoqF71FgdJpmJk,1917
5
+ lam_cli-0.1.7.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
6
+ lam_cli-0.1.7.dist-info/entry_points.txt,sha256=iJSsJitcGMikKJ3Q9KNWxEy911oTrSxGSO1HiwcBrKE,40
7
+ lam_cli-0.1.7.dist-info/top_level.txt,sha256=WyM7-Ig60qQH9meqS293pEd83jrMtbvGJM8ALZOQCtA,4
8
+ lam_cli-0.1.7.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (78.1.0)
2
+ Generator: setuptools (80.3.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,8 +0,0 @@
1
- lam/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- lam/lam.py,sha256=_wUkC-1aWJG53dUTd1KkgM_U84JfBxI_6TItx21esxA,36632
3
- lam_cli-0.1.5.dist-info/licenses/LICENSE,sha256=ixuiBLtpoK3iv89l7ylKkg9rs2GzF9ukPH7ynZYzK5s,35148
4
- lam_cli-0.1.5.dist-info/METADATA,sha256=aOXm9No4KM_Ha3OQxrgmhIGW0TGqpDs8iuRz3d4h8YA,1917
5
- lam_cli-0.1.5.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
6
- lam_cli-0.1.5.dist-info/entry_points.txt,sha256=iJSsJitcGMikKJ3Q9KNWxEy911oTrSxGSO1HiwcBrKE,40
7
- lam_cli-0.1.5.dist-info/top_level.txt,sha256=WyM7-Ig60qQH9meqS293pEd83jrMtbvGJM8ALZOQCtA,4
8
- lam_cli-0.1.5.dist-info/RECORD,,