nebu 0.1.59__py3-none-any.whl → 0.1.62__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.
- nebu/config.py +27 -5
- nebu/data.py +3 -2
- nebu/processors/decorate.py +1 -4
- {nebu-0.1.59.dist-info → nebu-0.1.62.dist-info}/METADATA +1 -1
- {nebu-0.1.59.dist-info → nebu-0.1.62.dist-info}/RECORD +8 -8
- {nebu-0.1.59.dist-info → nebu-0.1.62.dist-info}/WHEEL +1 -1
- {nebu-0.1.59.dist-info → nebu-0.1.62.dist-info}/licenses/LICENSE +0 -0
- {nebu-0.1.59.dist-info → nebu-0.1.62.dist-info}/top_level.txt +0 -0
nebu/config.py
CHANGED
@@ -54,14 +54,18 @@ class GlobalConfig:
|
|
54
54
|
# Collect environment variables (no fallback defaults here)
|
55
55
|
env_api_key = (
|
56
56
|
os.environ.get("NEBU_API_KEY")
|
57
|
+
or os.environ.get("NEBULOUS_API_KEY")
|
57
58
|
or os.environ.get("AGENTSEA_API_KEY")
|
58
59
|
or os.environ.get("ORIGN_API_KEY")
|
60
|
+
or os.environ.get("ORIGIN_API_KEY")
|
59
61
|
)
|
60
|
-
env_server = os.environ.get("NEBU_SERVER")
|
62
|
+
env_server = os.environ.get("NEBU_SERVER") or os.environ.get("NEBULOUS_SERVER")
|
61
63
|
env_auth_server = (
|
62
64
|
os.environ.get("NEBU_AUTH_SERVER")
|
65
|
+
or os.environ.get("NEBULOUS_AUTH_SERVER")
|
63
66
|
or os.environ.get("AGENTSEA_AUTH_SERVER")
|
64
67
|
or os.environ.get("ORIGN_AUTH_SERVER")
|
68
|
+
or os.environ.get("ORIGIN_AUTH_SERVER")
|
65
69
|
or os.environ.get("AGENTSEA_AUTH_URL")
|
66
70
|
)
|
67
71
|
|
@@ -130,6 +134,20 @@ class GlobalConfig:
|
|
130
134
|
return srv
|
131
135
|
return None
|
132
136
|
|
137
|
+
@classmethod
|
138
|
+
def get_server_url(cls) -> str:
|
139
|
+
"""
|
140
|
+
Get the server URL for the current_server name, or None if unset/missing.
|
141
|
+
"""
|
142
|
+
config = cls.read()
|
143
|
+
server_config = config.get_current_server_config()
|
144
|
+
server = os.environ.get("NEBU_SERVER") or os.environ.get("NEBULOUS_SERVER")
|
145
|
+
if not server:
|
146
|
+
server = server_config.server if server_config else None
|
147
|
+
if not server:
|
148
|
+
raise ValueError("NEBULOUS_SERVER environment variable is not set")
|
149
|
+
return server
|
150
|
+
|
133
151
|
|
134
152
|
def _get_config_file_path() -> str:
|
135
153
|
"""
|
@@ -164,10 +182,14 @@ class ContainerConfig:
|
|
164
182
|
"""
|
165
183
|
return cls(
|
166
184
|
api_key=os.environ.get("NEBU_API_KEY")
|
167
|
-
or os.environ.get("
|
168
|
-
or os.environ.get("ORIGN_API_KEY")
|
169
|
-
|
170
|
-
|
185
|
+
or os.environ.get("NEBULOUS_API_KEY")
|
186
|
+
or os.environ.get("ORIGN_API_KEY")
|
187
|
+
or os.environ.get("ORIGIN_API_KEY"),
|
188
|
+
server=os.environ.get("NEBU_SERVER") or os.environ.get("NEBULOUS_SERVER"),
|
189
|
+
namespace=os.environ.get("NEBU_NAMESPACE")
|
190
|
+
or os.environ.get("NEBULOUS_NAMESPACE")
|
191
|
+
or os.environ.get("ORIGN_NAMESPACE")
|
192
|
+
or os.environ.get("ORIGIN_NAMESPACE"),
|
171
193
|
name=os.environ.get("NEBU_NAME"),
|
172
194
|
container_id=os.environ.get("NEBU_CONTAINER_ID"),
|
173
195
|
date=os.environ.get("NEBU_DATE"),
|
nebu/data.py
CHANGED
@@ -420,9 +420,10 @@ class Bucket:
|
|
420
420
|
|
421
421
|
for action in actions_to_perform:
|
422
422
|
reason = action["reason"]
|
423
|
-
|
423
|
+
|
424
424
|
if action["action"] == "upload":
|
425
425
|
local_path = action["source_path"]
|
426
|
+
dest_full_path_or_key = action["dest_full_path_or_key"]
|
426
427
|
if not isinstance(dest_full_path_or_key, str):
|
427
428
|
print(f"ERROR: Invalid dest path: {dest_full_path_or_key}")
|
428
429
|
continue
|
@@ -447,7 +448,7 @@ class Bucket:
|
|
447
448
|
)
|
448
449
|
elif action["action"] == "download":
|
449
450
|
s3_key_full = action["s3_key_full_src"]
|
450
|
-
local_path = dest_full_path_or_key
|
451
|
+
local_path = action["dest_full_path_or_key"]
|
451
452
|
source_bucket_dl = action["source_bucket"]
|
452
453
|
if self.verbose:
|
453
454
|
print(
|
nebu/processors/decorate.py
CHANGED
@@ -57,9 +57,7 @@ _NEBU_INSIDE_CONSUMER_ENV_VAR = "_NEBU_INSIDE_CONSUMER_EXEC"
|
|
57
57
|
CONTAINER_CODE_DIR = "/app/src"
|
58
58
|
# Define S3 prefix for code storage (under the base URI from token endpoint)
|
59
59
|
S3_CODE_PREFIX = "nebu-code"
|
60
|
-
|
61
|
-
# Use environment variable for flexibility, provide a default for local dev
|
62
|
-
NEBU_API_BASE_URL = os.environ.get("NEBU_API_BASE_URL", "http://localhost:3000")
|
60
|
+
NEBU_API_BASE_URL = GlobalConfig.get_server_url()
|
63
61
|
|
64
62
|
# --- Jupyter Helper Functions ---
|
65
63
|
|
@@ -69,7 +67,6 @@ def is_jupyter_notebook():
|
|
69
67
|
Determine if the current code is running inside a Jupyter notebook.
|
70
68
|
Returns bool: True if running inside a Jupyter notebook, False otherwise.
|
71
69
|
"""
|
72
|
-
# print("[DEBUG Helper] Checking if running in Jupyter...") # Reduce verbosity
|
73
70
|
try:
|
74
71
|
# Use importlib to avoid runtime dependency if not needed
|
75
72
|
import importlib.util
|
@@ -1,8 +1,8 @@
|
|
1
1
|
nebu/__init__.py,sha256=gJ49VnAs4GC_bUV90j-SS-iiYWESuCf4uuE7mx4T78k,385
|
2
2
|
nebu/auth.py,sha256=N_v6SPFD9HU_UoRDTaouH03g2Hmo9C-xxqInE1FweXE,1471
|
3
3
|
nebu/cache.py,sha256=jmluqvWnE9N8uNq6nppXSxEJK7DKWaB79GicaGg9KmY,4718
|
4
|
-
nebu/config.py,sha256=
|
5
|
-
nebu/data.py,sha256=
|
4
|
+
nebu/config.py,sha256=C5Jt9Bd0i0HrgzBSVNJ-Ml3KwX_gaYbYYZEtNL2gvJg,7031
|
5
|
+
nebu/data.py,sha256=X0aAJYuHNVcTCRHpIDDm546HwMqIZpv40lGrozlL41A,39797
|
6
6
|
nebu/meta.py,sha256=CzFHMND9seuewzq9zNNx9WTr6JvrCBExe7BLqDSr7lM,745
|
7
7
|
nebu/builders/builder.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
8
8
|
nebu/builders/models.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -11,15 +11,15 @@ nebu/containers/decorator.py,sha256=uFtzlAXRHYZECJ-NPusY7oN9GXvdHrHDd_JNrIGr8aQ,
|
|
11
11
|
nebu/containers/models.py,sha256=0j6NGy4yto-enRDh_4JH_ZTbHrLdSpuMOqNQPnIrwC4,6815
|
12
12
|
nebu/containers/server.py,sha256=yFa2Y9PzBn59E1HftKiv0iapPonli2rbGAiU6r-wwe0,2513
|
13
13
|
nebu/processors/consumer.py,sha256=q4cFKPEfMf1xIs0Y3CjUDCR35QVjr0F_hSOZUKUYc_U,33667
|
14
|
-
nebu/processors/decorate.py,sha256=
|
14
|
+
nebu/processors/decorate.py,sha256=Fq1stlDGhpiV0Rl9R95xGEHyQmDv6mw4g0E_AXZKWLg,52927
|
15
15
|
nebu/processors/default.py,sha256=W4slJenG59rvyTlJ7gRp58eFfXcNOTT2Hfi6zzJAobI,365
|
16
16
|
nebu/processors/models.py,sha256=y40HoW-MEzDWB2dm_tsYlUy3Nf3s6eiLC0iGO9BoNog,3956
|
17
17
|
nebu/processors/processor.py,sha256=PsLs-Oo0bcvqoDKHErpOaic25y8uvTQ8KxtyFwLptW0,16165
|
18
18
|
nebu/processors/remote.py,sha256=TeAIPGEMqnDIb7H1iett26IEZrBlcbPB_-DSm6jcH1E,1285
|
19
19
|
nebu/redis/models.py,sha256=coPovAcVXnOU1Xh_fpJL4PO3QctgK9nBe5QYoqEcnxg,1230
|
20
20
|
nebu/services/service.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
21
|
-
nebu-0.1.
|
22
|
-
nebu-0.1.
|
23
|
-
nebu-0.1.
|
24
|
-
nebu-0.1.
|
25
|
-
nebu-0.1.
|
21
|
+
nebu-0.1.62.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
22
|
+
nebu-0.1.62.dist-info/METADATA,sha256=6pa3T3kmYOPRY3mJjO0rw__q3pb7YE3fkEhVAS-E-JQ,1731
|
23
|
+
nebu-0.1.62.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
|
24
|
+
nebu-0.1.62.dist-info/top_level.txt,sha256=uLIbEKJeGSHWOAJN5S0i5XBGwybALlF9bYoB1UhdEgQ,5
|
25
|
+
nebu-0.1.62.dist-info/RECORD,,
|
File without changes
|
File without changes
|