lmnr 0.2.14__tar.gz → 0.2.15__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.
- {lmnr-0.2.14 → lmnr-0.2.15}/PKG-INFO +1 -1
- {lmnr-0.2.14 → lmnr-0.2.15}/pyproject.toml +2 -2
- {lmnr-0.2.14 → lmnr-0.2.15}/src/lmnr/cli/cli.py +8 -10
- {lmnr-0.2.14 → lmnr-0.2.15}/LICENSE +0 -0
- {lmnr-0.2.14 → lmnr-0.2.15}/README.md +0 -0
- {lmnr-0.2.14 → lmnr-0.2.15}/src/lmnr/__init__.py +0 -0
- {lmnr-0.2.14 → lmnr-0.2.15}/src/lmnr/cli/__init__.py +0 -0
- {lmnr-0.2.14 → lmnr-0.2.15}/src/lmnr/cli/__main__.py +0 -0
- {lmnr-0.2.14 → lmnr-0.2.15}/src/lmnr/cli/parser/__init__.py +0 -0
- {lmnr-0.2.14 → lmnr-0.2.15}/src/lmnr/cli/parser/nodes/__init__.py +0 -0
- {lmnr-0.2.14 → lmnr-0.2.15}/src/lmnr/cli/parser/nodes/code.py +0 -0
- {lmnr-0.2.14 → lmnr-0.2.15}/src/lmnr/cli/parser/nodes/condition.py +0 -0
- {lmnr-0.2.14 → lmnr-0.2.15}/src/lmnr/cli/parser/nodes/input.py +0 -0
- {lmnr-0.2.14 → lmnr-0.2.15}/src/lmnr/cli/parser/nodes/json_extractor.py +0 -0
- {lmnr-0.2.14 → lmnr-0.2.15}/src/lmnr/cli/parser/nodes/llm.py +0 -0
- {lmnr-0.2.14 → lmnr-0.2.15}/src/lmnr/cli/parser/nodes/output.py +0 -0
- {lmnr-0.2.14 → lmnr-0.2.15}/src/lmnr/cli/parser/nodes/router.py +0 -0
- {lmnr-0.2.14 → lmnr-0.2.15}/src/lmnr/cli/parser/nodes/semantic_search.py +0 -0
- {lmnr-0.2.14 → lmnr-0.2.15}/src/lmnr/cli/parser/nodes/types.py +0 -0
- {lmnr-0.2.14 → lmnr-0.2.15}/src/lmnr/cli/parser/parser.py +0 -0
- {lmnr-0.2.14 → lmnr-0.2.15}/src/lmnr/cli/parser/utils.py +0 -0
- {lmnr-0.2.14 → lmnr-0.2.15}/src/lmnr/cli/zip.py +0 -0
- {lmnr-0.2.14 → lmnr-0.2.15}/src/lmnr/sdk/__init__.py +0 -0
- {lmnr-0.2.14 → lmnr-0.2.15}/src/lmnr/sdk/endpoint.py +0 -0
- {lmnr-0.2.14 → lmnr-0.2.15}/src/lmnr/sdk/registry.py +0 -0
- {lmnr-0.2.14 → lmnr-0.2.15}/src/lmnr/sdk/remote_debugger.py +0 -0
- {lmnr-0.2.14 → lmnr-0.2.15}/src/lmnr/types.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
[project]
|
2
2
|
name = "lmnr"
|
3
|
-
version = "0.2.
|
3
|
+
version = "0.2.15"
|
4
4
|
description = "Python SDK for Laminar AI"
|
5
5
|
authors = [
|
6
6
|
{ name = "lmnr.ai", email = "founders@lmnr.ai" }
|
@@ -11,7 +11,7 @@ license = "Apache-2.0"
|
|
11
11
|
|
12
12
|
[tool.poetry]
|
13
13
|
name = "lmnr"
|
14
|
-
version = "0.2.
|
14
|
+
version = "0.2.15"
|
15
15
|
description = "Python SDK for Laminar AI"
|
16
16
|
authors = ["lmnr.ai"]
|
17
17
|
readme = "README.md"
|
@@ -1,7 +1,7 @@
|
|
1
1
|
from pathlib import Path
|
2
2
|
import sys
|
3
3
|
import requests
|
4
|
-
from dotenv import
|
4
|
+
from dotenv import find_dotenv, get_key
|
5
5
|
import importlib
|
6
6
|
import os
|
7
7
|
import click
|
@@ -16,6 +16,10 @@ from lmnr.types import NodeFunction
|
|
16
16
|
|
17
17
|
from .parser.parser import runnable_graph_to_template_vars
|
18
18
|
|
19
|
+
from watchdog.observers import Observer
|
20
|
+
from watchdog.events import PatternMatchingEventHandler
|
21
|
+
import time
|
22
|
+
|
19
23
|
logger = logging.getLogger(__name__)
|
20
24
|
|
21
25
|
|
@@ -170,10 +174,6 @@ def _load_functions(cur_dir: str) -> dict[str, NodeFunction]:
|
|
170
174
|
|
171
175
|
return pipeline.functions
|
172
176
|
|
173
|
-
from watchdog.observers import Observer
|
174
|
-
from watchdog.events import PatternMatchingEventHandler
|
175
|
-
import time
|
176
|
-
|
177
177
|
class SimpleEventHandler(PatternMatchingEventHandler):
|
178
178
|
def __init__(self, project_api_key: str, session_id: str, functions: dict[str, NodeFunction]):
|
179
179
|
super().__init__(ignore_patterns=["*.pyc*", "*.pyo", "**/__pycache__"])
|
@@ -202,21 +202,19 @@ class SimpleEventHandler(PatternMatchingEventHandler):
|
|
202
202
|
help="Dev session ID. If not provided, LMNR_DEV_SESSION_ID from os.environ or .env is used",
|
203
203
|
)
|
204
204
|
def dev(project_api_key, dev_session_id):
|
205
|
+
cur_dir = os.getcwd() # e.g. /Users/username/project_name
|
205
206
|
env_path = find_dotenv(usecwd=True)
|
206
207
|
project_api_key = project_api_key or os.environ.get("LMNR_PROJECT_API_KEY")
|
207
208
|
if not project_api_key:
|
208
|
-
|
209
|
-
project_api_key = os.environ.get("LMNR_PROJECT_API_KEY")
|
209
|
+
project_api_key = get_key(env_path, "LMNR_PROJECT_API_KEY")
|
210
210
|
if not project_api_key:
|
211
211
|
raise ValueError("LMNR_PROJECT_API_KEY is not set")
|
212
212
|
|
213
213
|
session_id = dev_session_id or os.environ.get("LMNR_DEV_SESSION_ID")
|
214
214
|
if not session_id:
|
215
|
-
|
216
|
-
session_id = os.environ.get("LMNR_DEV_SESSION_ID")
|
215
|
+
session_id = get_key(env_path, "LMNR_DEV_SESSION_ID")
|
217
216
|
if not session_id:
|
218
217
|
raise ValueError("LMNR_DEV_SESSION_ID is not set")
|
219
|
-
cur_dir = os.getcwd() # e.g. /Users/username/project_name
|
220
218
|
functions = _load_functions(cur_dir)
|
221
219
|
|
222
220
|
observer = Observer()
|
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
|
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|