lumera 0.44.0__tar.gz → 0.45.0__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.
Files changed (81) hide show
  1. {lumera-0.44.0 → lumera-0.45.0}/PKG-INFO +1 -1
  2. {lumera-0.44.0 → lumera-0.45.0}/lumera/functions/_context.py +1 -0
  3. {lumera-0.44.0 → lumera-0.45.0}/lumera/releases/__main__.py +32 -0
  4. {lumera-0.44.0 → lumera-0.45.0}/lumera/releases/_projection.py +3 -5
  5. {lumera-0.44.0 → lumera-0.45.0}/lumera/releases/_rpc_event.py +1 -0
  6. {lumera-0.44.0 → lumera-0.45.0}/lumera.egg-info/PKG-INFO +1 -1
  7. {lumera-0.44.0 → lumera-0.45.0}/pyproject.toml +1 -1
  8. {lumera-0.44.0 → lumera-0.45.0}/lumera/__init__.py +0 -0
  9. {lumera-0.44.0 → lumera-0.45.0}/lumera/_live.py +0 -0
  10. {lumera-0.44.0 → lumera-0.45.0}/lumera/_utils.py +0 -0
  11. {lumera-0.44.0 → lumera-0.45.0}/lumera/agents.py +0 -0
  12. {lumera-0.44.0 → lumera-0.45.0}/lumera/automations.py +0 -0
  13. {lumera-0.44.0 → lumera-0.45.0}/lumera/documents.py +0 -0
  14. {lumera-0.44.0 → lumera-0.45.0}/lumera/email.py +0 -0
  15. {lumera-0.44.0 → lumera-0.45.0}/lumera/exceptions.py +0 -0
  16. {lumera-0.44.0 → lumera-0.45.0}/lumera/files.py +0 -0
  17. {lumera-0.44.0 → lumera-0.45.0}/lumera/flags.py +0 -0
  18. {lumera-0.44.0 → lumera-0.45.0}/lumera/function_resources.py +0 -0
  19. {lumera-0.44.0 → lumera-0.45.0}/lumera/functions/__init__.py +0 -0
  20. {lumera-0.44.0 → lumera-0.45.0}/lumera/functions/__main__.py +0 -0
  21. {lumera-0.44.0 → lumera-0.45.0}/lumera/functions/_artifacts.py +0 -0
  22. {lumera-0.44.0 → lumera-0.45.0}/lumera/functions/_config.py +0 -0
  23. {lumera-0.44.0 → lumera-0.45.0}/lumera/functions/_contract.py +0 -0
  24. {lumera-0.44.0 → lumera-0.45.0}/lumera/functions/_dependencies.py +0 -0
  25. {lumera-0.44.0 → lumera-0.45.0}/lumera/functions/_errors.py +0 -0
  26. {lumera-0.44.0 → lumera-0.45.0}/lumera/functions/_execution.py +0 -0
  27. {lumera-0.44.0 → lumera-0.45.0}/lumera/functions/_jsonschema.py +0 -0
  28. {lumera-0.44.0 → lumera-0.45.0}/lumera/functions/_registry.py +0 -0
  29. {lumera-0.44.0 → lumera-0.45.0}/lumera/functions/_remote.py +0 -0
  30. {lumera-0.44.0 → lumera-0.45.0}/lumera/functions/_runner.py +0 -0
  31. {lumera-0.44.0 → lumera-0.45.0}/lumera/functions/_runtime.py +0 -0
  32. {lumera-0.44.0 → lumera-0.45.0}/lumera/functions/testing.py +0 -0
  33. {lumera-0.44.0 → lumera-0.45.0}/lumera/google.py +0 -0
  34. {lumera-0.44.0 → lumera-0.45.0}/lumera/integrations/__init__.py +0 -0
  35. {lumera-0.44.0 → lumera-0.45.0}/lumera/integrations/bill.py +0 -0
  36. {lumera-0.44.0 → lumera-0.45.0}/lumera/integrations/finch.py +0 -0
  37. {lumera-0.44.0 → lumera-0.45.0}/lumera/integrations/google.py +0 -0
  38. {lumera-0.44.0 → lumera-0.45.0}/lumera/integrations/kafka.py +0 -0
  39. {lumera-0.44.0 → lumera-0.45.0}/lumera/integrations/netsuite.py +0 -0
  40. {lumera-0.44.0 → lumera-0.45.0}/lumera/integrations/salesforce.py +0 -0
  41. {lumera-0.44.0 → lumera-0.45.0}/lumera/integrations/slack.py +0 -0
  42. {lumera-0.44.0 → lumera-0.45.0}/lumera/integrations/snowflake.py +0 -0
  43. {lumera-0.44.0 → lumera-0.45.0}/lumera/llm.py +0 -0
  44. {lumera-0.44.0 → lumera-0.45.0}/lumera/pb.py +0 -0
  45. {lumera-0.44.0 → lumera-0.45.0}/lumera/releases/__init__.py +0 -0
  46. {lumera-0.44.0 → lumera-0.45.0}/lumera/releases/_api_child.py +0 -0
  47. {lumera-0.44.0 → lumera-0.45.0}/lumera/releases/_archive.py +0 -0
  48. {lumera-0.44.0 → lumera-0.45.0}/lumera/releases/_automation_event.py +0 -0
  49. {lumera-0.44.0 → lumera-0.45.0}/lumera/releases/_builder.py +0 -0
  50. {lumera-0.44.0 → lumera-0.45.0}/lumera/releases/_config.py +0 -0
  51. {lumera-0.44.0 → lumera-0.45.0}/lumera/releases/_contracts.py +0 -0
  52. {lumera-0.44.0 → lumera-0.45.0}/lumera/releases/_errors.py +0 -0
  53. {lumera-0.44.0 → lumera-0.45.0}/lumera/releases/_rpc_process.py +0 -0
  54. {lumera-0.44.0 → lumera-0.45.0}/lumera/releases/_runtime.py +0 -0
  55. {lumera-0.44.0 → lumera-0.45.0}/lumera/releases/_runtime_child.py +0 -0
  56. {lumera-0.44.0 → lumera-0.45.0}/lumera/releases/_schemas.py +0 -0
  57. {lumera-0.44.0 → lumera-0.45.0}/lumera/releases/_target.py +0 -0
  58. {lumera-0.44.0 → lumera-0.45.0}/lumera/sdk.py +0 -0
  59. {lumera-0.44.0 → lumera-0.45.0}/lumera/storage.py +0 -0
  60. {lumera-0.44.0 → lumera-0.45.0}/lumera/webhooks.py +0 -0
  61. {lumera-0.44.0 → lumera-0.45.0}/lumera.egg-info/SOURCES.txt +0 -0
  62. {lumera-0.44.0 → lumera-0.45.0}/lumera.egg-info/dependency_links.txt +0 -0
  63. {lumera-0.44.0 → lumera-0.45.0}/lumera.egg-info/requires.txt +0 -0
  64. {lumera-0.44.0 → lumera-0.45.0}/lumera.egg-info/top_level.txt +0 -0
  65. {lumera-0.44.0 → lumera-0.45.0}/setup.cfg +0 -0
  66. {lumera-0.44.0 → lumera-0.45.0}/tests/test_agents_live.py +0 -0
  67. {lumera-0.44.0 → lumera-0.45.0}/tests/test_automations.py +0 -0
  68. {lumera-0.44.0 → lumera-0.45.0}/tests/test_documents.py +0 -0
  69. {lumera-0.44.0 → lumera-0.45.0}/tests/test_flags.py +0 -0
  70. {lumera-0.44.0 → lumera-0.45.0}/tests/test_function_resources.py +0 -0
  71. {lumera-0.44.0 → lumera-0.45.0}/tests/test_integrations_bill.py +0 -0
  72. {lumera-0.44.0 → lumera-0.45.0}/tests/test_integrations_finch.py +0 -0
  73. {lumera-0.44.0 → lumera-0.45.0}/tests/test_integrations_google.py +0 -0
  74. {lumera-0.44.0 → lumera-0.45.0}/tests/test_integrations_kafka.py +0 -0
  75. {lumera-0.44.0 → lumera-0.45.0}/tests/test_integrations_netsuite.py +0 -0
  76. {lumera-0.44.0 → lumera-0.45.0}/tests/test_integrations_salesforce.py +0 -0
  77. {lumera-0.44.0 → lumera-0.45.0}/tests/test_integrations_slack.py +0 -0
  78. {lumera-0.44.0 → lumera-0.45.0}/tests/test_integrations_snowflake.py +0 -0
  79. {lumera-0.44.0 → lumera-0.45.0}/tests/test_lazy_imports.py +0 -0
  80. {lumera-0.44.0 → lumera-0.45.0}/tests/test_sdk.py +0 -0
  81. {lumera-0.44.0 → lumera-0.45.0}/tests/test_webhooks.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lumera
3
- Version: 0.44.0
3
+ Version: 0.45.0
4
4
  Summary: SDK for building on Lumera platform
5
5
  Requires-Python: >=3.11
6
6
  Requires-Dist: requests>=2.33.0
@@ -49,6 +49,7 @@ class ActorIdentity:
49
49
  slack_id: str | None = None
50
50
  department: ActorTag | None = None
51
51
  tags: tuple[ActorTag, ...] = ()
52
+ name: str | None = None
52
53
 
53
54
 
54
55
  @dataclass(frozen=True)
@@ -5,6 +5,7 @@ from __future__ import annotations
5
5
  import argparse
6
6
  import json
7
7
  import sys
8
+ import tempfile
8
9
  import uuid
9
10
  from pathlib import Path
10
11
  from typing import Any, cast
@@ -71,6 +72,9 @@ def _parser() -> argparse.ArgumentParser:
71
72
  runtime = commands.add_parser("deploy-runtime")
72
73
  runtime.add_argument("release")
73
74
  runtime.add_argument("--project", required=True)
75
+
76
+ project = commands.add_parser("deploy-project")
77
+ project.add_argument("--project", required=True)
74
78
  return parser
75
79
 
76
80
 
@@ -156,6 +160,34 @@ def _run(args: argparse.Namespace) -> dict[str, Any]:
156
160
  if args.command == "deploy-runtime":
157
161
  result = deploy_runtime(args.project, args.release)
158
162
  return _success("deploy-runtime", deployment=result)
163
+ if args.command == "deploy-project":
164
+ with tempfile.TemporaryDirectory(prefix="lumera-project-release-") as temporary:
165
+ built = build_target_release(project_root, Path(temporary))
166
+ contract_results = [
167
+ contract_test_release(
168
+ built.archive_path,
169
+ mode=mode,
170
+ expected_digest=built.release_digest,
171
+ )
172
+ for mode in _declared_contract_modes(built.release_manifest)
173
+ ]
174
+ uploaded = deploy_release(
175
+ args.project,
176
+ built.archive_path,
177
+ expected_digest=built.release_digest,
178
+ )
179
+ release = uploaded.get("release")
180
+ release_id = str(release.get("id", "")) if isinstance(release, dict) else ""
181
+ if not release_id:
182
+ raise ValueError("release upload returned no release ID")
183
+ deployment = deploy_runtime(args.project, release_id)
184
+ return _success(
185
+ "deploy-project",
186
+ release_digest=built.release_digest,
187
+ contract_modes=[result.mode for result in contract_results],
188
+ release=uploaded,
189
+ deployment=deployment,
190
+ )
159
191
  raise ValueError(f"unsupported release command: {args.command}")
160
192
 
161
193
 
@@ -37,11 +37,7 @@ def create_release_runtime(
37
37
  ) -> ReleaseRuntime:
38
38
  entrypoints = manifest.get("entrypoints", {})
39
39
  modules = entrypoints.get("function_modules", []) if isinstance(entrypoints, Mapping) else []
40
- registry = (
41
- FunctionRegistry.discover(modules)
42
- if modules and load_function_projections
43
- else None
44
- )
40
+ registry = FunctionRegistry.discover(modules) if modules and load_function_projections else None
45
41
  routes = _projection_routes(registry)
46
42
 
47
43
  async def app(scope: dict[str, Any], receive: ASGIReceive, send: ASGISend) -> None:
@@ -167,6 +163,7 @@ def _actor_from_headers(headers: Mapping[str, str]) -> ActorIdentity:
167
163
  id=headers.get("x-lumera-membership-id", "runtime"),
168
164
  email=_optional_header(headers, "x-lumera-user-email", "x-lumera-app-user-email"),
169
165
  role=_optional_header(headers, "x-lumera-user-role", "x-lumera-app-user-role"),
166
+ name=_optional_header(headers, "x-lumera-user-name", "x-lumera-app-user-name"),
170
167
  )
171
168
  if subject_type == "public_app_user":
172
169
  return ActorIdentity(
@@ -175,6 +172,7 @@ def _actor_from_headers(headers: Mapping[str, str]) -> ActorIdentity:
175
172
  email=_optional_header(headers, "x-lumera-app-user-email"),
176
173
  role=_optional_header(headers, "x-lumera-app-user-role"),
177
174
  is_external=True,
175
+ name=_optional_header(headers, "x-lumera-app-user-name"),
178
176
  )
179
177
  if subject_type == "anonymous":
180
178
  return ActorIdentity(type=subject_type, id="", is_external=True)
@@ -188,6 +188,7 @@ def _actor_from_payload(raw: object) -> ActorIdentity:
188
188
  department=department_tag,
189
189
  tags=tuple(tags),
190
190
  is_external=bool(value.get("is_external", False)),
191
+ name=_optional_string(value.get("name")),
191
192
  )
192
193
 
193
194
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lumera
3
- Version: 0.44.0
3
+ Version: 0.45.0
4
4
  Summary: SDK for building on Lumera platform
5
5
  Requires-Python: >=3.11
6
6
  Requires-Dist: requests>=2.33.0
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "lumera"
3
- version = "0.44.0"
3
+ version = "0.45.0"
4
4
  description = "SDK for building on Lumera platform"
5
5
  requires-python = ">=3.11"
6
6
  dependencies = [
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