loom-core 0.1.2__tar.gz → 0.1.4__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 (58) hide show
  1. {loom_core-0.1.2 → loom_core-0.1.4}/PKG-INFO +1 -1
  2. {loom_core-0.1.2 → loom_core-0.1.4}/loom/cli/cli.py +4 -0
  3. {loom_core-0.1.2 → loom_core-0.1.4}/loom/common/activity.py +6 -0
  4. {loom_core-0.1.2 → loom_core-0.1.4}/loom/common/workflow.py +6 -0
  5. {loom_core-0.1.2 → loom_core-0.1.4}/loom/core/engine.py +3 -1
  6. {loom_core-0.1.2 → loom_core-0.1.4}/loom/core/state.py +1 -1
  7. {loom_core-0.1.2 → loom_core-0.1.4}/loom_core.egg-info/PKG-INFO +1 -1
  8. {loom_core-0.1.2 → loom_core-0.1.4}/pyproject.toml +1 -1
  9. {loom_core-0.1.2 → loom_core-0.1.4}/LICENSE +0 -0
  10. {loom_core-0.1.2 → loom_core-0.1.4}/MANIFEST.in +0 -0
  11. {loom_core-0.1.2 → loom_core-0.1.4}/QUICKSTART.md +0 -0
  12. {loom_core-0.1.2 → loom_core-0.1.4}/README.md +0 -0
  13. {loom_core-0.1.2 → loom_core-0.1.4}/loom/__init__.py +0 -0
  14. {loom_core-0.1.2 → loom_core-0.1.4}/loom/cli/__init__.py +0 -0
  15. {loom_core-0.1.2 → loom_core-0.1.4}/loom/common/config.py +0 -0
  16. {loom_core-0.1.2 → loom_core-0.1.4}/loom/common/errors.py +0 -0
  17. {loom_core-0.1.2 → loom_core-0.1.4}/loom/core/__init__.py +0 -0
  18. {loom_core-0.1.2 → loom_core-0.1.4}/loom/core/compiled.py +0 -0
  19. {loom_core-0.1.2 → loom_core-0.1.4}/loom/core/context.py +0 -0
  20. {loom_core-0.1.2 → loom_core-0.1.4}/loom/core/handle.py +0 -0
  21. {loom_core-0.1.2 → loom_core-0.1.4}/loom/core/logger.py +0 -0
  22. {loom_core-0.1.2 → loom_core-0.1.4}/loom/core/runner.py +0 -0
  23. {loom_core-0.1.2 → loom_core-0.1.4}/loom/core/worker.py +0 -0
  24. {loom_core-0.1.2 → loom_core-0.1.4}/loom/core/workflow.py +0 -0
  25. {loom_core-0.1.2 → loom_core-0.1.4}/loom/database/__init__.py +0 -0
  26. {loom_core-0.1.2 → loom_core-0.1.4}/loom/database/db.py +0 -0
  27. {loom_core-0.1.2 → loom_core-0.1.4}/loom/decorators/__init__.py +0 -0
  28. {loom_core-0.1.2 → loom_core-0.1.4}/loom/decorators/activity.py +0 -0
  29. {loom_core-0.1.2 → loom_core-0.1.4}/loom/decorators/workflow.py +0 -0
  30. {loom_core-0.1.2 → loom_core-0.1.4}/loom/lib/progress.py +0 -0
  31. {loom_core-0.1.2 → loom_core-0.1.4}/loom/lib/utils.py +0 -0
  32. {loom_core-0.1.2 → loom_core-0.1.4}/loom/migrations/down/001_setup_pragma.sql +0 -0
  33. {loom_core-0.1.2 → loom_core-0.1.4}/loom/migrations/down/002_create_workflows.sql +0 -0
  34. {loom_core-0.1.2 → loom_core-0.1.4}/loom/migrations/down/003.create_events.sql +0 -0
  35. {loom_core-0.1.2 → loom_core-0.1.4}/loom/migrations/down/004.create_tasks.sql +0 -0
  36. {loom_core-0.1.2 → loom_core-0.1.4}/loom/migrations/down/005.create_indexes.sql +0 -0
  37. {loom_core-0.1.2 → loom_core-0.1.4}/loom/migrations/down/006_auto_update_triggers.sql +0 -0
  38. {loom_core-0.1.2 → loom_core-0.1.4}/loom/migrations/down/007_create_logs.sql +0 -0
  39. {loom_core-0.1.2 → loom_core-0.1.4}/loom/migrations/up/001_setup_pragma.sql +0 -0
  40. {loom_core-0.1.2 → loom_core-0.1.4}/loom/migrations/up/002_create_workflows.sql +0 -0
  41. {loom_core-0.1.2 → loom_core-0.1.4}/loom/migrations/up/003_create_events.sql +0 -0
  42. {loom_core-0.1.2 → loom_core-0.1.4}/loom/migrations/up/004_create_tasks.sql +0 -0
  43. {loom_core-0.1.2 → loom_core-0.1.4}/loom/migrations/up/005_create_indexes.sql +0 -0
  44. {loom_core-0.1.2 → loom_core-0.1.4}/loom/migrations/up/006_auto_update_triggers.sql +0 -0
  45. {loom_core-0.1.2 → loom_core-0.1.4}/loom/migrations/up/007_create_logs.sql +0 -0
  46. {loom_core-0.1.2 → loom_core-0.1.4}/loom/schemas/__init__.py +0 -0
  47. {loom_core-0.1.2 → loom_core-0.1.4}/loom/schemas/activity.py +0 -0
  48. {loom_core-0.1.2 → loom_core-0.1.4}/loom/schemas/database.py +0 -0
  49. {loom_core-0.1.2 → loom_core-0.1.4}/loom/schemas/events.py +0 -0
  50. {loom_core-0.1.2 → loom_core-0.1.4}/loom/schemas/tasks.py +0 -0
  51. {loom_core-0.1.2 → loom_core-0.1.4}/loom/schemas/workflow.py +0 -0
  52. {loom_core-0.1.2 → loom_core-0.1.4}/loom_core.egg-info/SOURCES.txt +0 -0
  53. {loom_core-0.1.2 → loom_core-0.1.4}/loom_core.egg-info/dependency_links.txt +0 -0
  54. {loom_core-0.1.2 → loom_core-0.1.4}/loom_core.egg-info/entry_points.txt +0 -0
  55. {loom_core-0.1.2 → loom_core-0.1.4}/loom_core.egg-info/requires.txt +0 -0
  56. {loom_core-0.1.2 → loom_core-0.1.4}/loom_core.egg-info/top_level.txt +0 -0
  57. {loom_core-0.1.2 → loom_core-0.1.4}/setup.cfg +0 -0
  58. {loom_core-0.1.2 → loom_core-0.1.4}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: loom-core
3
- Version: 0.1.2
3
+ Version: 0.1.4
4
4
  Summary: Durable workflow orchestration engine for Python
5
5
  Home-page: https://github.com/satadeep3927/loom
6
6
  Author: Satadeep Dasgupta
@@ -2,6 +2,7 @@
2
2
  """Loom CLI - Command-line interface for Loom workflow orchestration."""
3
3
 
4
4
  import asyncio
5
+ import os # Added import
5
6
  import sys
6
7
  from typing import Any
7
8
 
@@ -28,6 +29,9 @@ def cli():
28
29
  Loom provides event-sourced, deterministic workflow execution with
29
30
  automatic recovery and replay capabilities.
30
31
  """
32
+ # Ensure current directory is in python path so user modules can be imported
33
+ if os.getcwd() not in sys.path:
34
+ sys.path.insert(0, os.getcwd())
31
35
  pass
32
36
 
33
37
 
@@ -1,4 +1,5 @@
1
1
  import importlib
2
+ import sys
2
3
  from typing import Any, Awaitable, Callable, cast
3
4
 
4
5
 
@@ -6,6 +7,11 @@ def load_activity(module: str, func: str) -> Callable[..., Awaitable[Any]]:
6
7
 
7
8
  try:
8
9
  activity_module = importlib.import_module(module)
10
+
11
+ # Force reload the module to get latest changes
12
+ if module in sys.modules:
13
+ activity_module = importlib.reload(activity_module)
14
+
9
15
  except ModuleNotFoundError as e:
10
16
  raise ModuleNotFoundError(
11
17
  f"Cannot import activity module '{module}'. "
@@ -1,4 +1,5 @@
1
1
  import importlib
2
+ import sys
2
3
  from typing import Any, Type
3
4
 
4
5
  from ..core.workflow import Workflow
@@ -32,6 +33,11 @@ def workflow_registry(module: str, cls: str) -> Type[Workflow[Any, Any]]:
32
33
  """
33
34
  try:
34
35
  workflow_module = importlib.import_module(module)
36
+
37
+ # Force reload the module to get latest changes
38
+ if module in sys.modules:
39
+ workflow_module = importlib.reload(workflow_module)
40
+
35
41
  except ModuleNotFoundError as e:
36
42
  raise ModuleNotFoundError(
37
43
  f"Cannot import workflow module '{module}'. "
@@ -1,3 +1,4 @@
1
+ import json
1
2
  from datetime import datetime, timedelta, timezone
2
3
  from typing import Generic
3
4
 
@@ -76,9 +77,10 @@ class Engine(Generic[InputT, StateT]):
76
77
  async with Database[InputT, StateT]() as db:
77
78
  workflow_def = await db.get_workflow_info(workflow_id)
78
79
  history = await db.get_workflow_events(workflow_id=workflow_def["id"])
80
+ workflow_input = json.loads(workflow_def["input"])
79
81
 
80
82
  ctx: WorkflowContext = WorkflowContext(
81
- workflow_def["id"], workflow_def["input"], history, {}
83
+ workflow_def["id"], workflow_input, history, {}
82
84
  )
83
85
 
84
86
  first_event = ctx._peek()
@@ -85,7 +85,7 @@ class StateProxy(Generic[InputT, StateT]):
85
85
  """
86
86
  if self._batch is not None:
87
87
  raise RuntimeError("Nested batches are not supported.")
88
- self._batch = [] # type: ignore
88
+ self._batch = [] # type: ignore
89
89
 
90
90
  try:
91
91
  yield
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: loom-core
3
- Version: 0.1.2
3
+ Version: 0.1.4
4
4
  Summary: Durable workflow orchestration engine for Python
5
5
  Home-page: https://github.com/satadeep3927/loom
6
6
  Author: Satadeep Dasgupta
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "loom-core"
7
- version = "0.1.2"
7
+ version = "0.1.4"
8
8
  description = "Durable workflow orchestration engine for Python"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.12"
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