julee 0.1.0__tar.gz → 0.1.2__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 (167) hide show
  1. {julee-0.1.0/src/julee.egg-info → julee-0.1.2}/PKG-INFO +3 -1
  2. {julee-0.1.0 → julee-0.1.2}/pyproject.toml +6 -1
  3. {julee-0.1.0 → julee-0.1.2}/src/julee/__init__.py +1 -1
  4. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/models/assembly_specification/knowledge_service_query.py +7 -3
  5. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/models/policy/policy.py +2 -0
  6. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/repositories/base.py +28 -12
  7. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/use_cases/extract_assemble_data.py +10 -1
  8. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/use_cases/validate_document.py +12 -1
  9. {julee-0.1.0 → julee-0.1.2}/src/julee/repositories/__init__.py +4 -1
  10. {julee-0.1.0 → julee-0.1.2}/src/julee/repositories/memory/assembly_specification.py +1 -0
  11. {julee-0.1.0 → julee-0.1.2}/src/julee/repositories/memory/knowledge_service_config.py +1 -0
  12. {julee-0.1.0 → julee-0.1.2}/src/julee/repositories/memory/knowledge_service_query.py +1 -0
  13. {julee-0.1.0 → julee-0.1.2}/src/julee/repositories/minio/knowledge_service_config.py +2 -2
  14. {julee-0.1.0 → julee-0.1.2}/src/julee/services/knowledge_service/knowledge_service.py +10 -4
  15. {julee-0.1.0 → julee-0.1.2}/src/julee/util/repositories.py +2 -4
  16. {julee-0.1.0 → julee-0.1.2}/src/julee/util/temporal/activities.py +1 -1
  17. {julee-0.1.0 → julee-0.1.2}/src/julee/util/temporal/decorators.py +8 -15
  18. {julee-0.1.0 → julee-0.1.2/src/julee.egg-info}/PKG-INFO +3 -1
  19. {julee-0.1.0 → julee-0.1.2}/src/julee.egg-info/requires.txt +2 -0
  20. {julee-0.1.0 → julee-0.1.2}/LICENSE +0 -0
  21. {julee-0.1.0 → julee-0.1.2}/MANIFEST.in +0 -0
  22. {julee-0.1.0 → julee-0.1.2}/README.md +0 -0
  23. {julee-0.1.0 → julee-0.1.2}/setup.cfg +0 -0
  24. {julee-0.1.0 → julee-0.1.2}/src/julee/api/__init__.py +0 -0
  25. {julee-0.1.0 → julee-0.1.2}/src/julee/api/app.py +0 -0
  26. {julee-0.1.0 → julee-0.1.2}/src/julee/api/dependencies.py +0 -0
  27. {julee-0.1.0 → julee-0.1.2}/src/julee/api/requests.py +0 -0
  28. {julee-0.1.0 → julee-0.1.2}/src/julee/api/responses.py +0 -0
  29. {julee-0.1.0 → julee-0.1.2}/src/julee/api/routers/__init__.py +0 -0
  30. {julee-0.1.0 → julee-0.1.2}/src/julee/api/routers/assembly_specifications.py +0 -0
  31. {julee-0.1.0 → julee-0.1.2}/src/julee/api/routers/documents.py +0 -0
  32. {julee-0.1.0 → julee-0.1.2}/src/julee/api/routers/knowledge_service_configs.py +0 -0
  33. {julee-0.1.0 → julee-0.1.2}/src/julee/api/routers/knowledge_service_queries.py +0 -0
  34. {julee-0.1.0 → julee-0.1.2}/src/julee/api/routers/system.py +0 -0
  35. {julee-0.1.0 → julee-0.1.2}/src/julee/api/routers/workflows.py +0 -0
  36. {julee-0.1.0 → julee-0.1.2}/src/julee/api/services/__init__.py +0 -0
  37. {julee-0.1.0 → julee-0.1.2}/src/julee/api/services/system_initialization.py +0 -0
  38. {julee-0.1.0 → julee-0.1.2}/src/julee/api/tests/__init__.py +0 -0
  39. {julee-0.1.0 → julee-0.1.2}/src/julee/api/tests/routers/__init__.py +0 -0
  40. {julee-0.1.0 → julee-0.1.2}/src/julee/api/tests/routers/test_assembly_specifications.py +0 -0
  41. {julee-0.1.0 → julee-0.1.2}/src/julee/api/tests/routers/test_documents.py +0 -0
  42. {julee-0.1.0 → julee-0.1.2}/src/julee/api/tests/routers/test_knowledge_service_configs.py +0 -0
  43. {julee-0.1.0 → julee-0.1.2}/src/julee/api/tests/routers/test_knowledge_service_queries.py +0 -0
  44. {julee-0.1.0 → julee-0.1.2}/src/julee/api/tests/routers/test_system.py +0 -0
  45. {julee-0.1.0 → julee-0.1.2}/src/julee/api/tests/routers/test_workflows.py +0 -0
  46. {julee-0.1.0 → julee-0.1.2}/src/julee/api/tests/test_app.py +0 -0
  47. {julee-0.1.0 → julee-0.1.2}/src/julee/api/tests/test_dependencies.py +0 -0
  48. {julee-0.1.0 → julee-0.1.2}/src/julee/api/tests/test_requests.py +0 -0
  49. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/__init__.py +0 -0
  50. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/models/__init__.py +0 -0
  51. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/models/assembly/__init__.py +0 -0
  52. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/models/assembly/assembly.py +0 -0
  53. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/models/assembly/tests/__init__.py +0 -0
  54. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/models/assembly/tests/factories.py +0 -0
  55. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/models/assembly/tests/test_assembly.py +0 -0
  56. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/models/assembly_specification/__init__.py +0 -0
  57. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/models/assembly_specification/assembly_specification.py +0 -0
  58. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/models/assembly_specification/tests/__init__.py +0 -0
  59. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/models/assembly_specification/tests/factories.py +0 -0
  60. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/models/assembly_specification/tests/test_assembly_specification.py +0 -0
  61. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/models/assembly_specification/tests/test_knowledge_service_query.py +0 -0
  62. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/models/custom_fields/__init__.py +0 -0
  63. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/models/custom_fields/content_stream.py +0 -0
  64. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/models/custom_fields/tests/__init__.py +0 -0
  65. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/models/custom_fields/tests/test_custom_fields.py +0 -0
  66. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/models/document/__init__.py +0 -0
  67. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/models/document/document.py +0 -0
  68. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/models/document/tests/__init__.py +0 -0
  69. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/models/document/tests/factories.py +0 -0
  70. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/models/document/tests/test_document.py +0 -0
  71. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/models/knowledge_service_config/__init__.py +0 -0
  72. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/models/knowledge_service_config/knowledge_service_config.py +0 -0
  73. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/models/policy/__init__.py +0 -0
  74. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/models/policy/document_policy_validation.py +0 -0
  75. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/models/policy/tests/__init__.py +0 -0
  76. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/models/policy/tests/factories.py +0 -0
  77. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/models/policy/tests/test_document_policy_validation.py +0 -0
  78. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/models/policy/tests/test_policy.py +0 -0
  79. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/repositories/__init__.py +0 -0
  80. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/repositories/assembly.py +0 -0
  81. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/repositories/assembly_specification.py +0 -0
  82. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/repositories/document.py +0 -0
  83. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/repositories/document_policy_validation.py +0 -0
  84. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/repositories/knowledge_service_config.py +0 -0
  85. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/repositories/knowledge_service_query.py +0 -0
  86. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/repositories/policy.py +0 -0
  87. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/use_cases/__init__.py +0 -0
  88. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/use_cases/decorators.py +0 -0
  89. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/use_cases/initialize_system_data.py +0 -0
  90. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/use_cases/tests/__init__.py +0 -0
  91. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/use_cases/tests/test_extract_assemble_data.py +0 -0
  92. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/use_cases/tests/test_initialize_system_data.py +0 -0
  93. {julee-0.1.0 → julee-0.1.2}/src/julee/domain/use_cases/tests/test_validate_document.py +0 -0
  94. {julee-0.1.0 → julee-0.1.2}/src/julee/fixtures/assembly_specifications.yaml +0 -0
  95. {julee-0.1.0 → julee-0.1.2}/src/julee/fixtures/documents.yaml +0 -0
  96. {julee-0.1.0 → julee-0.1.2}/src/julee/fixtures/knowledge_service_configs.yaml +0 -0
  97. {julee-0.1.0 → julee-0.1.2}/src/julee/fixtures/knowledge_service_queries.yaml +0 -0
  98. {julee-0.1.0 → julee-0.1.2}/src/julee/repositories/memory/__init__.py +0 -0
  99. {julee-0.1.0 → julee-0.1.2}/src/julee/repositories/memory/assembly.py +0 -0
  100. {julee-0.1.0 → julee-0.1.2}/src/julee/repositories/memory/base.py +0 -0
  101. {julee-0.1.0 → julee-0.1.2}/src/julee/repositories/memory/document.py +0 -0
  102. {julee-0.1.0 → julee-0.1.2}/src/julee/repositories/memory/document_policy_validation.py +0 -0
  103. {julee-0.1.0 → julee-0.1.2}/src/julee/repositories/memory/policy.py +0 -0
  104. {julee-0.1.0 → julee-0.1.2}/src/julee/repositories/memory/tests/__init__.py +0 -0
  105. {julee-0.1.0 → julee-0.1.2}/src/julee/repositories/memory/tests/test_document.py +0 -0
  106. {julee-0.1.0 → julee-0.1.2}/src/julee/repositories/memory/tests/test_document_policy_validation.py +0 -0
  107. {julee-0.1.0 → julee-0.1.2}/src/julee/repositories/memory/tests/test_policy.py +0 -0
  108. {julee-0.1.0 → julee-0.1.2}/src/julee/repositories/minio/__init__.py +0 -0
  109. {julee-0.1.0 → julee-0.1.2}/src/julee/repositories/minio/assembly.py +0 -0
  110. {julee-0.1.0 → julee-0.1.2}/src/julee/repositories/minio/assembly_specification.py +0 -0
  111. {julee-0.1.0 → julee-0.1.2}/src/julee/repositories/minio/client.py +0 -0
  112. {julee-0.1.0 → julee-0.1.2}/src/julee/repositories/minio/document.py +0 -0
  113. {julee-0.1.0 → julee-0.1.2}/src/julee/repositories/minio/document_policy_validation.py +0 -0
  114. {julee-0.1.0 → julee-0.1.2}/src/julee/repositories/minio/knowledge_service_query.py +0 -0
  115. {julee-0.1.0 → julee-0.1.2}/src/julee/repositories/minio/policy.py +0 -0
  116. {julee-0.1.0 → julee-0.1.2}/src/julee/repositories/minio/tests/__init__.py +0 -0
  117. {julee-0.1.0 → julee-0.1.2}/src/julee/repositories/minio/tests/fake_client.py +0 -0
  118. {julee-0.1.0 → julee-0.1.2}/src/julee/repositories/minio/tests/test_assembly.py +0 -0
  119. {julee-0.1.0 → julee-0.1.2}/src/julee/repositories/minio/tests/test_assembly_specification.py +0 -0
  120. {julee-0.1.0 → julee-0.1.2}/src/julee/repositories/minio/tests/test_client_protocol.py +0 -0
  121. {julee-0.1.0 → julee-0.1.2}/src/julee/repositories/minio/tests/test_document.py +0 -0
  122. {julee-0.1.0 → julee-0.1.2}/src/julee/repositories/minio/tests/test_document_policy_validation.py +0 -0
  123. {julee-0.1.0 → julee-0.1.2}/src/julee/repositories/minio/tests/test_knowledge_service_config.py +0 -0
  124. {julee-0.1.0 → julee-0.1.2}/src/julee/repositories/minio/tests/test_knowledge_service_query.py +0 -0
  125. {julee-0.1.0 → julee-0.1.2}/src/julee/repositories/minio/tests/test_policy.py +0 -0
  126. {julee-0.1.0 → julee-0.1.2}/src/julee/repositories/temporal/__init__.py +0 -0
  127. {julee-0.1.0 → julee-0.1.2}/src/julee/repositories/temporal/activities.py +0 -0
  128. {julee-0.1.0 → julee-0.1.2}/src/julee/repositories/temporal/activity_names.py +0 -0
  129. {julee-0.1.0 → julee-0.1.2}/src/julee/repositories/temporal/proxies.py +0 -0
  130. {julee-0.1.0 → julee-0.1.2}/src/julee/services/__init__.py +0 -0
  131. {julee-0.1.0 → julee-0.1.2}/src/julee/services/knowledge_service/__init__.py +0 -0
  132. {julee-0.1.0 → julee-0.1.2}/src/julee/services/knowledge_service/anthropic/__init__.py +0 -0
  133. {julee-0.1.0 → julee-0.1.2}/src/julee/services/knowledge_service/anthropic/knowledge_service.py +0 -0
  134. {julee-0.1.0 → julee-0.1.2}/src/julee/services/knowledge_service/anthropic/tests/test_knowledge_service.py +0 -0
  135. {julee-0.1.0 → julee-0.1.2}/src/julee/services/knowledge_service/factory.py +0 -0
  136. {julee-0.1.0 → julee-0.1.2}/src/julee/services/knowledge_service/memory/__init__.py +0 -0
  137. {julee-0.1.0 → julee-0.1.2}/src/julee/services/knowledge_service/memory/knowledge_service.py +0 -0
  138. {julee-0.1.0 → julee-0.1.2}/src/julee/services/knowledge_service/memory/test_knowledge_service.py +0 -0
  139. {julee-0.1.0 → julee-0.1.2}/src/julee/services/knowledge_service/test_factory.py +0 -0
  140. {julee-0.1.0 → julee-0.1.2}/src/julee/services/temporal/__init__.py +0 -0
  141. {julee-0.1.0 → julee-0.1.2}/src/julee/services/temporal/activities.py +0 -0
  142. {julee-0.1.0 → julee-0.1.2}/src/julee/services/temporal/activity_names.py +0 -0
  143. {julee-0.1.0 → julee-0.1.2}/src/julee/services/temporal/proxies.py +0 -0
  144. {julee-0.1.0 → julee-0.1.2}/src/julee/util/__init__.py +0 -0
  145. {julee-0.1.0 → julee-0.1.2}/src/julee/util/domain.py +0 -0
  146. {julee-0.1.0 → julee-0.1.2}/src/julee/util/repos/__init__.py +0 -0
  147. {julee-0.1.0 → julee-0.1.2}/src/julee/util/repos/minio/__init__.py +0 -0
  148. {julee-0.1.0 → julee-0.1.2}/src/julee/util/repos/minio/file_storage.py +0 -0
  149. {julee-0.1.0 → julee-0.1.2}/src/julee/util/repos/temporal/__init__.py +0 -0
  150. {julee-0.1.0 → julee-0.1.2}/src/julee/util/repos/temporal/client_proxies/file_storage.py +0 -0
  151. {julee-0.1.0 → julee-0.1.2}/src/julee/util/repos/temporal/data_converter.py +0 -0
  152. {julee-0.1.0 → julee-0.1.2}/src/julee/util/repos/temporal/minio_file_storage.py +0 -0
  153. {julee-0.1.0 → julee-0.1.2}/src/julee/util/repos/temporal/proxies/__init__.py +0 -0
  154. {julee-0.1.0 → julee-0.1.2}/src/julee/util/repos/temporal/proxies/file_storage.py +0 -0
  155. {julee-0.1.0 → julee-0.1.2}/src/julee/util/temporal/__init__.py +0 -0
  156. {julee-0.1.0 → julee-0.1.2}/src/julee/util/tests/__init__.py +0 -0
  157. {julee-0.1.0 → julee-0.1.2}/src/julee/util/tests/test_decorators.py +0 -0
  158. {julee-0.1.0 → julee-0.1.2}/src/julee/util/validation/__init__.py +0 -0
  159. {julee-0.1.0 → julee-0.1.2}/src/julee/util/validation/repository.py +0 -0
  160. {julee-0.1.0 → julee-0.1.2}/src/julee/util/validation/type_guards.py +0 -0
  161. {julee-0.1.0 → julee-0.1.2}/src/julee/worker.py +0 -0
  162. {julee-0.1.0 → julee-0.1.2}/src/julee/workflows/__init__.py +0 -0
  163. {julee-0.1.0 → julee-0.1.2}/src/julee/workflows/extract_assemble.py +0 -0
  164. {julee-0.1.0 → julee-0.1.2}/src/julee/workflows/validate_document.py +0 -0
  165. {julee-0.1.0 → julee-0.1.2}/src/julee.egg-info/SOURCES.txt +0 -0
  166. {julee-0.1.0 → julee-0.1.2}/src/julee.egg-info/dependency_links.txt +0 -0
  167. {julee-0.1.0 → julee-0.1.2}/src/julee.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: julee
3
- Version: 0.1.0
3
+ Version: 0.1.2
4
4
  Summary: Julee - Clean architecture for accountable and transparent digital supply chains
5
5
  Author-email: Pyx Industries <chris@pyx.io>
6
6
  License: GPL-3.0
@@ -45,6 +45,7 @@ Requires-Dist: factory-boy>=3.2.0; extra == "dev"
45
45
  Requires-Dist: mypy>=1.7.0; extra == "dev"
46
46
  Requires-Dist: types-PyYAML; extra == "dev"
47
47
  Requires-Dist: types-jsonschema; extra == "dev"
48
+ Requires-Dist: types-python-dateutil; extra == "dev"
48
49
  Requires-Dist: black>=24.0.0; extra == "dev"
49
50
  Requires-Dist: ruff>=0.5.0; extra == "dev"
50
51
  Requires-Dist: pre-commit>=3.0.0; extra == "dev"
@@ -57,6 +58,7 @@ Requires-Dist: sphinx-rtd-theme>=2.0.0; extra == "docs"
57
58
  Requires-Dist: furo>=2023.9.10; extra == "docs"
58
59
  Requires-Dist: sphinx-autodoc-typehints>=1.25.0; extra == "docs"
59
60
  Requires-Dist: sphinxcontrib-mermaid>=0.9.2; extra == "docs"
61
+ Requires-Dist: sphinxcontrib-plantuml>=0.25; extra == "docs"
60
62
  Requires-Dist: sphinx-autoapi>=3.0.0; extra == "docs"
61
63
  Dynamic: license-file
62
64
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "julee"
7
- version = "0.1.0"
7
+ version = "0.1.2"
8
8
  description = "Julee - Clean architecture for accountable and transparent digital supply chains"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -61,6 +61,7 @@ dev = [
61
61
  "mypy>=1.7.0",
62
62
  "types-PyYAML",
63
63
  "types-jsonschema",
64
+ "types-python-dateutil",
64
65
  # Code quality
65
66
  "black>=24.0.0",
66
67
  "ruff>=0.5.0",
@@ -78,6 +79,7 @@ docs = [
78
79
  "furo>=2023.9.10",
79
80
  "sphinx-autodoc-typehints>=1.25.0",
80
81
  "sphinxcontrib-mermaid>=0.9.2",
82
+ "sphinxcontrib-plantuml>=0.25",
81
83
  "sphinx-autoapi>=3.0.0",
82
84
  ]
83
85
 
@@ -103,6 +105,9 @@ asyncio_mode = "auto"
103
105
  addopts = [
104
106
  "--strict-markers",
105
107
  "--tb=short",
108
+ "--cov=src/julee",
109
+ "--cov-report=term-missing",
110
+ "--cov-report=html",
106
111
  ]
107
112
 
108
113
  [tool.coverage.run]
@@ -1,3 +1,3 @@
1
1
  """Julee - Clean architecture for accountable and transparent digital supply chains."""
2
2
 
3
- __version__ = "0.1.0"
3
+ __version__ = "0.1.1"
@@ -37,26 +37,30 @@ class KnowledgeServiceQuery(BaseModel):
37
37
 
38
38
  Examples of query_metadata usage:
39
39
 
40
- For Anthropic services:
40
+ For Anthropic services::
41
+
41
42
  query_metadata = {
42
43
  "model": "claude-sonnet-4-20250514",
43
44
  "max_tokens": 4000,
44
45
  "temperature": 0.1
45
46
  }
46
47
 
47
- For OpenAI services:
48
+ For OpenAI services::
49
+
48
50
  query_metadata = {
49
51
  "model": "gpt-4",
50
52
  "temperature": 0.2,
51
53
  "top_p": 0.9
52
54
  }
53
55
 
54
- For custom services:
56
+ For custom services::
57
+
55
58
  query_metadata = {
56
59
  "endpoint": "custom-model-v2",
57
60
  "timeout": 30,
58
61
  "retries": 3
59
62
  }
63
+
60
64
  """
61
65
 
62
66
  # Core query identification
@@ -38,9 +38,11 @@ class Policy(BaseModel):
38
38
  be applied to improve document quality before re-validation.
39
39
 
40
40
  The policy operates in two modes:
41
+
41
42
  1. Validation-only: Calculates scores and passes/fails based on criteria
42
43
  2. Validation with transformation: Calculates scores, applies
43
44
  transformations, then re-calculates scores for final pass/fail
45
+
44
46
  """
45
47
 
46
48
  # Core policy identification
@@ -51,10 +51,12 @@ class BaseRepository(Protocol[T]):
51
51
  Returns:
52
52
  Entity if found, None otherwise
53
53
 
54
- Implementation Notes:
54
+ .. rubric:: Implementation Notes
55
+
55
56
  - Must be idempotent: multiple calls return same result
56
57
  - Should handle missing entities gracefully (return None)
57
58
  - Loads complete entity with all relationships
59
+
58
60
  """
59
61
  ...
60
62
 
@@ -67,7 +69,8 @@ class BaseRepository(Protocol[T]):
67
69
  Returns:
68
70
  Dict mapping entity_id to entity (or None if not found)
69
71
 
70
- Implementation Notes:
72
+ .. rubric:: Implementation Notes
73
+
71
74
  - Must be idempotent: multiple calls return same result
72
75
  - Should handle missing entities gracefully (return None for missing)
73
76
  - Implementations may optimize with batch operations or fall back
@@ -75,10 +78,12 @@ class BaseRepository(Protocol[T]):
75
78
  - Keys in returned dict correspond exactly to input entity_ids
76
79
  - Missing entities have None values in the returned dict
77
80
 
78
- Workflow Context:
81
+ .. rubric:: Workflow Context
82
+
79
83
  In Temporal workflows, this method is implemented as an activity
80
84
  to ensure batch operations are durably stored and consistent
81
85
  across workflow replays.
86
+
82
87
  """
83
88
  ...
84
89
 
@@ -88,11 +93,13 @@ class BaseRepository(Protocol[T]):
88
93
  Args:
89
94
  entity: Complete entity to save
90
95
 
91
- Implementation Notes:
96
+ .. rubric:: Implementation Notes
97
+
92
98
  - Must be idempotent: saving same entity state is safe
93
99
  - Should update the updated_at timestamp
94
100
  - Must save complete entity with all relationships
95
101
  - Handles both new entities and updates to existing ones
102
+
96
103
  """
97
104
  ...
98
105
 
@@ -102,24 +109,30 @@ class BaseRepository(Protocol[T]):
102
109
  Returns:
103
110
  List of all entities in the repository
104
111
 
105
- Implementation Notes:
112
+ .. rubric:: Implementation Notes
113
+
106
114
  - Must be idempotent: multiple calls return same result
107
115
  - Returns empty list if no entities exist
108
116
  - Should return entities in a consistent order (e.g., by ID)
109
117
  - For large datasets, consider pagination at the use case level
110
118
 
111
- Workflow Context:
119
+ .. rubric:: Workflow Context
120
+
112
121
  In Temporal workflows, this method is implemented as an activity
113
122
  to ensure the list operation is durably stored and consistent
114
123
  across workflow replays.
115
124
 
116
- Default Implementation:
125
+ .. rubric:: Default Implementation
126
+
117
127
  Base protocol provides a default that returns empty list.
118
128
  Repository implementations should override this method as needed.
119
129
 
120
- TODO: This default implementation returns empty list to avoid
121
- breaking existing repositories. Specific repositories should
122
- implement proper list_all() functionality as needed.
130
+ .. note::
131
+
132
+ This default implementation returns empty list to avoid
133
+ breaking existing repositories. Specific repositories should
134
+ implement proper list_all() functionality as needed.
135
+
123
136
  """
124
137
  return []
125
138
 
@@ -132,15 +145,18 @@ class BaseRepository(Protocol[T]):
132
145
  Returns:
133
146
  Unique entity ID string
134
147
 
135
- Implementation Notes:
148
+ .. rubric:: Implementation Notes
149
+
136
150
  - Must generate globally unique identifiers
137
151
  - May use UUIDs, database sequences, or distributed ID generators
138
152
  - Should be fast and reliable
139
153
  - Failure here should be rare but handled gracefully
140
154
 
141
- Workflow Context:
155
+ .. rubric:: Workflow Context
156
+
142
157
  In Temporal workflows, this method is implemented as an activity
143
158
  to ensure the generated ID is durably stored and consistent
144
159
  across workflow replays.
160
+
145
161
  """
146
162
  ...
@@ -57,6 +57,7 @@ class ExtractAssembleDataUseCase:
57
57
  methods and expects them to work correctly.
58
58
 
59
59
  Architectural Notes:
60
+
60
61
  - This class contains pure business logic with no framework dependencies
61
62
  - Repository dependencies are injected via constructor
62
63
  (dependency inversion)
@@ -64,6 +65,7 @@ class ExtractAssembleDataUseCase:
64
65
  - The use case works with domain objects exclusively
65
66
  - Deterministic execution is guaranteed by avoiding
66
67
  non-deterministic operations
68
+
67
69
  """
68
70
 
69
71
  def __init__(
@@ -91,7 +93,8 @@ class ExtractAssembleDataUseCase:
91
93
  operations
92
94
  now_fn: Function to get current time (for workflow compatibility)
93
95
 
94
- Note:
96
+ .. note::
97
+
95
98
  The repositories passed here may be concrete implementations
96
99
  (for testing or direct execution) or workflow stubs (for
97
100
  Temporal workflow execution). The use case doesn't know or care
@@ -99,6 +102,7 @@ class ExtractAssembleDataUseCase:
99
102
 
100
103
  Repositories are validated at construction time to catch
101
104
  configuration errors early in the application lifecycle.
105
+
102
106
  """
103
107
  # Validate at construction time for early error detection
104
108
  self.document_repo = ensure_repository_protocol(
@@ -135,6 +139,7 @@ class ExtractAssembleDataUseCase:
135
139
  assembly.
136
140
 
137
141
  This method orchestrates the core assembly workflow:
142
+
138
143
  1. Generates a unique assembly ID
139
144
  2. Retrieves the assembly specification
140
145
  3. Stores the initial assembly in the repository
@@ -156,6 +161,7 @@ class ExtractAssembleDataUseCase:
156
161
  Raises:
157
162
  ValueError: If required entities are not found or invalid
158
163
  RuntimeError: If assembly processing fails
164
+
159
165
  """
160
166
  logger.debug(
161
167
  "Starting data assembly use case",
@@ -267,6 +273,7 @@ class ExtractAssembleDataUseCase:
267
273
 
268
274
  Raises:
269
275
  RuntimeError: If registration fails
276
+
270
277
  """
271
278
  registrations = {}
272
279
 
@@ -351,6 +358,7 @@ class ExtractAssembleDataUseCase:
351
358
  Perform a single assembly iteration using knowledge services.
352
359
 
353
360
  This method:
361
+
354
362
  1. Executes all knowledge service queries defined in the specification
355
363
  2. Stitches together the query results into a complete JSON document
356
364
  3. Creates and stores the assembled document
@@ -368,6 +376,7 @@ class ExtractAssembleDataUseCase:
368
376
  Raises:
369
377
  ValueError: If required entities are not found
370
378
  RuntimeError: If knowledge service operations fail
379
+
371
380
  """
372
381
  # Initialize the result data structure
373
382
  assembled_data: Dict[str, Any] = {}
@@ -58,6 +58,7 @@ class ValidateDocumentUseCase:
58
58
  methods and expects them to work correctly.
59
59
 
60
60
  Architectural Notes:
61
+
61
62
  - This class contains pure business logic with no framework dependencies
62
63
  - Repository dependencies are injected via constructor
63
64
  (dependency inversion)
@@ -65,6 +66,7 @@ class ValidateDocumentUseCase:
65
66
  - The use case works with domain objects exclusively
66
67
  - Deterministic execution is guaranteed by avoiding
67
68
  non-deterministic operations
69
+
68
70
  """
69
71
 
70
72
  def __init__(
@@ -93,7 +95,8 @@ class ValidateDocumentUseCase:
93
95
  now_fn: Function to get current time (e.g., workflow.now for
94
96
  Temporal workflows)
95
97
 
96
- Note:
98
+ .. note::
99
+
97
100
  The repositories passed here may be concrete implementations
98
101
  (for testing or direct execution) or workflow stubs (for
99
102
  Temporal workflow execution). The use case doesn't know or care
@@ -101,6 +104,7 @@ class ValidateDocumentUseCase:
101
104
 
102
105
  Repositories are validated at construction time to catch
103
106
  configuration errors early in the application lifecycle.
107
+
104
108
  """
105
109
  # Validate at construction time for early error detection
106
110
  self.document_repo = ensure_repository_protocol(
@@ -133,6 +137,7 @@ class ValidateDocumentUseCase:
133
137
  Validate a document against a policy and return the validation result.
134
138
 
135
139
  This method orchestrates the core validation workflow:
140
+
136
141
  1. Generates a unique validation ID
137
142
  2. Retrieves the document and policy
138
143
  3. Creates and stores the initial validation record
@@ -152,6 +157,7 @@ class ValidateDocumentUseCase:
152
157
  Raises:
153
158
  ValueError: If required entities are not found or invalid
154
159
  RuntimeError: If validation processing fails
160
+
155
161
  """
156
162
  logger.debug(
157
163
  "Starting document validation use case",
@@ -429,6 +435,7 @@ class ValidateDocumentUseCase:
429
435
 
430
436
  Returns:
431
437
  Dict mapping knowledge_service_id to service_file_id
438
+
432
439
  """
433
440
  registrations = {}
434
441
  required_service_ids = {
@@ -471,6 +478,7 @@ class ValidateDocumentUseCase:
471
478
 
472
479
  Returns:
473
480
  List of (query_id, actual_score) tuples
481
+
474
482
  """
475
483
  validation_scores = []
476
484
 
@@ -556,6 +564,7 @@ class ValidateDocumentUseCase:
556
564
 
557
565
  Returns:
558
566
  True if all required scores were met or exceeded, False otherwise
567
+
559
568
  """
560
569
  # Convert to dictionaries for easier lookup
561
570
  actual_scores_dict = dict(actual_scores)
@@ -601,6 +610,7 @@ class ValidateDocumentUseCase:
601
610
  Raises:
602
611
  ValueError: If transformation queries are not found or fail
603
612
  RuntimeError: If document transformation fails
613
+
604
614
  """
605
615
  if not policy.transformation_queries:
606
616
  raise ValueError("No transformation queries provided")
@@ -717,6 +727,7 @@ class ValidateDocumentUseCase:
717
727
 
718
728
  Raises:
719
729
  ValueError: If no valid JSON content can be extracted from result
730
+
720
731
  """
721
732
  response_text = result_data.get("response", "")
722
733
  if not response_text:
@@ -5,13 +5,16 @@ This package contains concrete implementations of the repository interfaces
5
5
  defined in julee.domain.repositories.
6
6
 
7
7
  Implementation packages:
8
+
8
9
  - memory: In-memory implementations for testing
9
10
  - minio: MinIO-based implementations for production
10
11
  - temporal: Temporal workflow proxy implementations
11
12
 
12
- Import implementations using their full module paths, e.g.:
13
+ Import implementations using their full module paths, e.g.::
14
+
13
15
  from julee.repositories.memory import MemoryDocumentRepository
14
16
  from julee.repositories.minio.document import (
15
17
  MinioDocumentRepository,
16
18
  )
19
+
17
20
  """
@@ -36,6 +36,7 @@ class MemoryAssemblySpecificationRepository(
36
36
  dictionaries.
37
37
 
38
38
  This implementation stores assembly specifications in memory:
39
+
39
40
  - Specifications: Dictionary keyed by assembly_specification_id containing
40
41
  AssemblySpecification objects
41
42
 
@@ -36,6 +36,7 @@ class MemoryKnowledgeServiceConfigRepository(
36
36
  dictionaries.
37
37
 
38
38
  This implementation stores knowledge service configurations in memory:
39
+
39
40
  - Knowledge Services: Dictionary keyed by knowledge_service_id containing
40
41
  KnowledgeServiceConfig objects
41
42
 
@@ -35,6 +35,7 @@ class MemoryKnowledgeServiceQueryRepository(
35
35
  dictionaries.
36
36
 
37
37
  This implementation stores knowledge service queries in memory:
38
+
38
39
  - Queries: Dictionary keyed by query_id containing KnowledgeServiceQuery
39
40
  objects
40
41
 
@@ -34,12 +34,12 @@ class MinioKnowledgeServiceConfigRepository(
34
34
 
35
35
  This implementation stores knowledge service configurations as JSON
36
36
  objects:
37
+
37
38
  - Knowledge Service Configs: JSON objects in the
38
39
  "knowledge-service-configs" bucket
39
40
 
40
41
  Each configuration is stored with its knowledge_service_id as the object
41
- name
42
- for efficient retrieval and updates.
42
+ name for efficient retrieval and updates.
43
43
  """
44
44
 
45
45
  def __init__(self, client: MinioClient) -> None:
@@ -92,17 +92,20 @@ class KnowledgeService(Protocol):
92
92
  FileRegistrationResult containing registration details and the
93
93
  service's internal file identifier
94
94
 
95
- Implementation Notes:
95
+ .. rubric:: Implementation Notes
96
+
96
97
  - Must be idempotent: re-registering same document returns same result
97
98
  - Should handle service unavailability gracefully
98
99
  - Must return the service's internal file ID for future queries
99
100
  - Document content is accessed directly from the Document object
100
101
  - Should handle various document formats and sizes
101
102
 
102
- Workflow Context:
103
+ .. rubric:: Workflow Context
104
+
103
105
  In Temporal workflows, this method is implemented as an activity
104
106
  to ensure registration results are durably stored and consistent
105
107
  across workflow replays.
108
+
106
109
  """
107
110
  ...
108
111
 
@@ -141,7 +144,8 @@ class KnowledgeService(Protocol):
141
144
  Returns:
142
145
  QueryResult containing query results and execution metadata
143
146
 
144
- Implementation Notes:
147
+ .. rubric:: Implementation Notes
148
+
145
149
  - Must be idempotent: same query returns consistent results
146
150
  - Service file IDs are provided as context to enhance query responses
147
151
  - Should handle service unavailability gracefully
@@ -152,9 +156,11 @@ class KnowledgeService(Protocol):
152
156
  - Should validate that service_file_ids exist in the service before
153
157
  including them in the query context
154
158
 
155
- Workflow Context:
159
+ .. rubric:: Workflow Context
160
+
156
161
  In Temporal workflows, this method is implemented as an activity
157
162
  to ensure query results are durably stored and can be replayed
158
163
  consistently.
164
+
159
165
  """
160
166
  ...
@@ -23,11 +23,9 @@ class FileStorageRepository(Protocol):
23
23
  FileMetadata object with details about the uploaded file.
24
24
 
25
25
  Implementation Notes:
26
- - Must be idempotent: uploading the same file_id multiple times is
27
- safe.
26
+ - Must be idempotent: uploading the same file_id multiple times is safe.
28
27
  - Should return metadata including the actual size and content type.
29
- - Must perform security validation: file size limits, content type
30
- verification, and filename sanitization.
28
+ - Must perform security validation: file size limits, content type verification, and filename sanitization.
31
29
  - Should reject files that don't match declared content type.
32
30
  """
33
31
  ...
@@ -79,7 +79,7 @@ def collect_activities_from_instances(*instances: Any) -> list[Any]:
79
79
 
80
80
  Args:
81
81
  *instances: Repository and service instances decorated with
82
- @temporal_activity_registration
82
+ @temporal_activity_registration
83
83
 
84
84
  Returns:
85
85
  List of activity methods ready for Worker registration
@@ -123,13 +123,10 @@ def temporal_activity_registration(
123
123
  name.
124
124
 
125
125
  Args:
126
- activity_prefix: Prefix for activity names (e.g.,
127
- "sample.payment_repo.minio") Method names will be appended to create
128
- full activity names like "sample.payment_repo.minio.process_payment"
126
+ activity_prefix: Prefix for activity names (e.g., "sample.payment_repo.minio"). Method names will be appended to create full activity names like "sample.payment_repo.minio.process_payment"
129
127
 
130
128
  Returns:
131
- The decorated class with all async methods wrapped as Temporal
132
- activities
129
+ The decorated class with all async methods wrapped as Temporal activities
133
130
 
134
131
  Example:
135
132
  @temporal_activity_registration("sample.payment_repo.minio")
@@ -137,12 +134,9 @@ def temporal_activity_registration(
137
134
  pass
138
135
 
139
136
  # This automatically creates activities for all protocol methods:
140
- # - process_payment ->
141
- # "sample.payment_repo.minio.process_payment"
142
- # - get_payment ->
143
- # "sample.payment_repo.minio.get_payment"
144
- # - refund_payment ->
145
- # "sample.payment_repo.minio.refund_payment"
137
+ # - process_payment -> "sample.payment_repo.minio.process_payment"
138
+ # - get_payment -> "sample.payment_repo.minio.get_payment"
139
+ # - refund_payment -> "sample.payment_repo.minio.refund_payment"
146
140
  """
147
141
 
148
142
  def decorator(cls: Type[T]) -> Type[T]:
@@ -226,8 +220,8 @@ def temporal_workflow_proxy(
226
220
  retry_methods: List of method names that should use retry policies
227
221
 
228
222
  Returns:
229
- The decorated class with all protocol methods implemented as
230
- workflow activity calls
223
+ The decorated class with all protocol methods implemented as workflow
224
+ activity calls
231
225
 
232
226
  Example:
233
227
  @temporal_workflow_proxy(
@@ -241,8 +235,7 @@ def temporal_workflow_proxy(
241
235
  # This automatically creates workflow methods for all methods:
242
236
  # - get() -> calls "julee.document_repo.minio.get" activity
243
237
  # - save() -> calls "julee.document_repo.minio.save" with retry
244
- # - generate_id() -> calls "julee.document_repo.minio.generate_id"
245
- # with retry
238
+ # - generate_id() -> calls "julee.document_repo.minio.generate_id" with retry
246
239
  """
247
240
 
248
241
  def decorator(cls: Type[T]) -> Type[T]:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: julee
3
- Version: 0.1.0
3
+ Version: 0.1.2
4
4
  Summary: Julee - Clean architecture for accountable and transparent digital supply chains
5
5
  Author-email: Pyx Industries <chris@pyx.io>
6
6
  License: GPL-3.0
@@ -45,6 +45,7 @@ Requires-Dist: factory-boy>=3.2.0; extra == "dev"
45
45
  Requires-Dist: mypy>=1.7.0; extra == "dev"
46
46
  Requires-Dist: types-PyYAML; extra == "dev"
47
47
  Requires-Dist: types-jsonschema; extra == "dev"
48
+ Requires-Dist: types-python-dateutil; extra == "dev"
48
49
  Requires-Dist: black>=24.0.0; extra == "dev"
49
50
  Requires-Dist: ruff>=0.5.0; extra == "dev"
50
51
  Requires-Dist: pre-commit>=3.0.0; extra == "dev"
@@ -57,6 +58,7 @@ Requires-Dist: sphinx-rtd-theme>=2.0.0; extra == "docs"
57
58
  Requires-Dist: furo>=2023.9.10; extra == "docs"
58
59
  Requires-Dist: sphinx-autodoc-typehints>=1.25.0; extra == "docs"
59
60
  Requires-Dist: sphinxcontrib-mermaid>=0.9.2; extra == "docs"
61
+ Requires-Dist: sphinxcontrib-plantuml>=0.25; extra == "docs"
60
62
  Requires-Dist: sphinx-autoapi>=3.0.0; extra == "docs"
61
63
  Dynamic: license-file
62
64
 
@@ -24,6 +24,7 @@ factory-boy>=3.2.0
24
24
  mypy>=1.7.0
25
25
  types-PyYAML
26
26
  types-jsonschema
27
+ types-python-dateutil
27
28
  black>=24.0.0
28
29
  ruff>=0.5.0
29
30
  pre-commit>=3.0.0
@@ -37,4 +38,5 @@ sphinx-rtd-theme>=2.0.0
37
38
  furo>=2023.9.10
38
39
  sphinx-autodoc-typehints>=1.25.0
39
40
  sphinxcontrib-mermaid>=0.9.2
41
+ sphinxcontrib-plantuml>=0.25
40
42
  sphinx-autoapi>=3.0.0
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