parallax-core 0.1.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.
- parallax_core-0.1.0/.gitignore +16 -0
- parallax_core-0.1.0/LICENSE +201 -0
- parallax_core-0.1.0/NOTICE +5 -0
- parallax_core-0.1.0/PKG-INFO +27 -0
- parallax_core-0.1.0/README.md +11 -0
- parallax_core-0.1.0/pyproject.toml +33 -0
- parallax_core-0.1.0/src/parallax/core/__init__.py +97 -0
- parallax_core-0.1.0/src/parallax/core/_execution/__init__.py +0 -0
- parallax_core-0.1.0/src/parallax/core/_execution/_adoption.py +86 -0
- parallax_core-0.1.0/src/parallax/core/_execution/_connection_lifecycle.py +235 -0
- parallax_core-0.1.0/src/parallax/core/_execution/_family.py +64 -0
- parallax_core-0.1.0/src/parallax/core/_execution/_features.py +84 -0
- parallax_core-0.1.0/src/parallax/core/_execution/_keyed_sql.py +49 -0
- parallax_core-0.1.0/src/parallax/core/_execution/_keyed_writes.py +637 -0
- parallax_core-0.1.0/src/parallax/core/_execution/_options.py +101 -0
- parallax_core-0.1.0/src/parallax/core/_execution/_page_origins.py +65 -0
- parallax_core-0.1.0/src/parallax/core/_execution/_planning.py +200 -0
- parallax_core-0.1.0/src/parallax/core/_execution/_publication.py +270 -0
- parallax_core-0.1.0/src/parallax/core/_execution/_read_pipeline.py +369 -0
- parallax_core-0.1.0/src/parallax/core/_execution/_read_query.py +92 -0
- parallax_core-0.1.0/src/parallax/core/_execution/_retention.py +456 -0
- parallax_core-0.1.0/src/parallax/core/_execution/_root.py +204 -0
- parallax_core-0.1.0/src/parallax/core/_execution/_routing.py +115 -0
- parallax_core-0.1.0/src/parallax/core/_execution/_scope.py +280 -0
- parallax_core-0.1.0/src/parallax/core/_execution/_transaction/__init__.py +0 -0
- parallax_core-0.1.0/src/parallax/core/_execution/_transaction/_attempt.py +846 -0
- parallax_core-0.1.0/src/parallax/core/_execution/_transaction/_lifetime.py +105 -0
- parallax_core-0.1.0/src/parallax/core/_execution/_transaction/_runner.py +716 -0
- parallax_core-0.1.0/src/parallax/core/_execution/_unit_work/__init__.py +0 -0
- parallax_core-0.1.0/src/parallax/core/_execution/_unit_work/_errors.py +134 -0
- parallax_core-0.1.0/src/parallax/core/_execution/_unit_work/_write_ownership.py +1069 -0
- parallax_core-0.1.0/src/parallax/core/_execution/_unit_work/acquisition.py +268 -0
- parallax_core-0.1.0/src/parallax/core/_execution/_unit_work/admission.py +1000 -0
- parallax_core-0.1.0/src/parallax/core/_execution/_unit_work/claims.py +255 -0
- parallax_core-0.1.0/src/parallax/core/_execution/_unit_work/clock.py +57 -0
- parallax_core-0.1.0/src/parallax/core/_execution/_unit_work/effects.py +256 -0
- parallax_core-0.1.0/src/parallax/core/_execution/_unit_work/evidence.py +220 -0
- parallax_core-0.1.0/src/parallax/core/_execution/_unit_work/instructions.py +2520 -0
- parallax_core-0.1.0/src/parallax/core/_execution/_unit_work/keys.py +86 -0
- parallax_core-0.1.0/src/parallax/core/_execution/_unit_work/lifetime.py +18 -0
- parallax_core-0.1.0/src/parallax/core/_execution/_unit_work/non_temporal_settlement.py +181 -0
- parallax_core-0.1.0/src/parallax/core/_execution/_unit_work/preparation.py +156 -0
- parallax_core-0.1.0/src/parallax/core/_execution/_unit_work/ranges.py +1197 -0
- parallax_core-0.1.0/src/parallax/core/_execution/_unit_work/source_authority.py +658 -0
- parallax_core-0.1.0/src/parallax/core/_execution/_unit_work/strategy.py +293 -0
- parallax_core-0.1.0/src/parallax/core/_execution/_unit_work/uow.py +740 -0
- parallax_core-0.1.0/src/parallax/core/_execution/_unit_work/write_items.py +892 -0
- parallax_core-0.1.0/src/parallax/core/_execution/_unit_work/write_planner.py +476 -0
- parallax_core-0.1.0/src/parallax/core/_execution/_unit_work/write_runner.py +136 -0
- parallax_core-0.1.0/src/parallax/core/_execution/_unit_work/write_settlement.py +873 -0
- parallax_core-0.1.0/src/parallax/core/_execution/_write_lowering.py +473 -0
- parallax_core-0.1.0/src/parallax/core/_execution/_write_step_executor.py +594 -0
- parallax_core-0.1.0/src/parallax/core/_formation_profile.py +179 -0
- parallax_core-0.1.0/src/parallax/core/auto_retry/__init__.py +213 -0
- parallax_core-0.1.0/src/parallax/core/base/__init__.py +448 -0
- parallax_core-0.1.0/src/parallax/core/base/_inference.py +48 -0
- parallax_core-0.1.0/src/parallax/core/base/_neutral.py +1301 -0
- parallax_core-0.1.0/src/parallax/core/batch_write/__init__.py +144 -0
- parallax_core-0.1.0/src/parallax/core/concurrency/__init__.py +67 -0
- parallax_core-0.1.0/src/parallax/core/concurrency/_compile.py +146 -0
- parallax_core-0.1.0/src/parallax/core/concurrency/_facet.py +166 -0
- parallax_core-0.1.0/src/parallax/core/concurrency/_rules.py +115 -0
- parallax_core-0.1.0/src/parallax/core/continuation/__init__.py +203 -0
- parallax_core-0.1.0/src/parallax/core/db_error/__init__.py +157 -0
- parallax_core-0.1.0/src/parallax/core/db_port/__init__.py +551 -0
- parallax_core-0.1.0/src/parallax/core/db_port/_credentials.py +95 -0
- parallax_core-0.1.0/src/parallax/core/db_port/_pool_metrics.py +154 -0
- parallax_core-0.1.0/src/parallax/core/db_port/_resource_logging.py +131 -0
- parallax_core-0.1.0/src/parallax/core/db_port/_resources.py +409 -0
- parallax_core-0.1.0/src/parallax/core/diagnostics/__init__.py +165 -0
- parallax_core-0.1.0/src/parallax/core/dialect/__init__.py +814 -0
- parallax_core-0.1.0/src/parallax/core/dialect/dialect-reserved-words.json +111 -0
- parallax_core-0.1.0/src/parallax/core/document_codec/__init__.py +82 -0
- parallax_core-0.1.0/src/parallax/core/document_codec/_document.py +935 -0
- parallax_core-0.1.0/src/parallax/core/document_codec/_leaf.py +144 -0
- parallax_core-0.1.0/src/parallax/core/document_codec/_managed.py +319 -0
- parallax_core-0.1.0/src/parallax/core/document_codec/_occurrence.py +100 -0
- parallax_core-0.1.0/src/parallax/core/document_codec/_plan.py +603 -0
- parallax_core-0.1.0/src/parallax/core/document_codec/_shape.py +137 -0
- parallax_core-0.1.0/src/parallax/core/entity/__init__.py +102 -0
- parallax_core-0.1.0/src/parallax/core/entity/_authored_resolver.py +429 -0
- parallax_core-0.1.0/src/parallax/core/entity/_construction_input.py +86 -0
- parallax_core-0.1.0/src/parallax/core/entity/_declaration.py +2274 -0
- parallax_core-0.1.0/src/parallax/core/entity/_edit.py +198 -0
- parallax_core-0.1.0/src/parallax/core/entity/_entity.py +902 -0
- parallax_core-0.1.0/src/parallax/core/entity/_errors.py +332 -0
- parallax_core-0.1.0/src/parallax/core/entity/_expressions.py +1512 -0
- parallax_core-0.1.0/src/parallax/core/entity/_graph_construction.py +417 -0
- parallax_core-0.1.0/src/parallax/core/entity/_instance_state.py +1040 -0
- parallax_core-0.1.0/src/parallax/core/entity/_layout.py +276 -0
- parallax_core-0.1.0/src/parallax/core/entity/_members.py +714 -0
- parallax_core-0.1.0/src/parallax/core/entity/_model.py +311 -0
- parallax_core-0.1.0/src/parallax/core/entity/_pydantic_storage.py +74 -0
- parallax_core-0.1.0/src/parallax/core/entity/_row_fill.py +427 -0
- parallax_core-0.1.0/src/parallax/core/entity/_value_object.py +309 -0
- parallax_core-0.1.0/src/parallax/core/execution.py +50 -0
- parallax_core-0.1.0/src/parallax/core/execution_authority/__init__.py +1 -0
- parallax_core-0.1.0/src/parallax/core/execution_authority/_authority.py +83 -0
- parallax_core-0.1.0/src/parallax/core/execution_lifecycle/__init__.py +171 -0
- parallax_core-0.1.0/src/parallax/core/execution_lifecycle/_activity.py +2426 -0
- parallax_core-0.1.0/src/parallax/core/execution_lifecycle/_diagnostics.py +94 -0
- parallax_core-0.1.0/src/parallax/core/execution_lifecycle/_errors.py +61 -0
- parallax_core-0.1.0/src/parallax/core/execution_lifecycle/_events.py +669 -0
- parallax_core-0.1.0/src/parallax/core/execution_lifecycle/_fanout.py +290 -0
- parallax_core-0.1.0/src/parallax/core/execution_lifecycle/_logging.py +978 -0
- parallax_core-0.1.0/src/parallax/core/execution_lifecycle/_pool_observation.py +123 -0
- parallax_core-0.1.0/src/parallax/core/inheritance/__init__.py +236 -0
- parallax_core-0.1.0/src/parallax/core/inheritance/_compile.py +286 -0
- parallax_core-0.1.0/src/parallax/core/inheritance/_declaration_order.py +44 -0
- parallax_core-0.1.0/src/parallax/core/inheritance/_facet.py +542 -0
- parallax_core-0.1.0/src/parallax/core/inheritance/_rules.py +655 -0
- parallax_core-0.1.0/src/parallax/core/inheritance/_table_groups.py +381 -0
- parallax_core-0.1.0/src/parallax/core/metamodel/__init__.py +252 -0
- parallax_core-0.1.0/src/parallax/core/metamodel/_authoring_violation.py +57 -0
- parallax_core-0.1.0/src/parallax/core/metamodel/_compile.py +376 -0
- parallax_core-0.1.0/src/parallax/core/metamodel/_identities.py +245 -0
- parallax_core-0.1.0/src/parallax/core/metamodel/_issues.py +204 -0
- parallax_core-0.1.0/src/parallax/core/metamodel/_judgement.py +167 -0
- parallax_core-0.1.0/src/parallax/core/metamodel/_naming.py +16 -0
- parallax_core-0.1.0/src/parallax/core/metamodel/_resolve.py +943 -0
- parallax_core-0.1.0/src/parallax/core/metamodel/_shape.py +236 -0
- parallax_core-0.1.0/src/parallax/core/metamodel/_states.py +352 -0
- parallax_core-0.1.0/src/parallax/core/metamodel/_temporal_structure.py +183 -0
- parallax_core-0.1.0/src/parallax/core/metamodel/_values.py +742 -0
- parallax_core-0.1.0/src/parallax/core/model_formation/__init__.py +35 -0
- parallax_core-0.1.0/src/parallax/core/model_formation/_contributors.py +84 -0
- parallax_core-0.1.0/src/parallax/core/model_formation/_errors.py +143 -0
- parallax_core-0.1.0/src/parallax/core/model_formation/_manifest.py +125 -0
- parallax_core-0.1.0/src/parallax/core/model_formation/_runner.py +608 -0
- parallax_core-0.1.0/src/parallax/core/navigate/__init__.py +255 -0
- parallax_core-0.1.0/src/parallax/core/object_query/__init__.py +42 -0
- parallax_core-0.1.0/src/parallax/core/object_query/_canonical.py +110 -0
- parallax_core-0.1.0/src/parallax/core/object_query/_fluent.py +526 -0
- parallax_core-0.1.0/src/parallax/core/object_query/_nodes.py +291 -0
- parallax_core-0.1.0/src/parallax/core/object_query/_resolved.py +180 -0
- parallax_core-0.1.0/src/parallax/core/object_query/serde.py +288 -0
- parallax_core-0.1.0/src/parallax/core/object_query/validate.py +239 -0
- parallax_core-0.1.0/src/parallax/core/pk_gen/__init__.py +57 -0
- parallax_core-0.1.0/src/parallax/core/predicate/__init__.py +89 -0
- parallax_core-0.1.0/src/parallax/core/predicate/_execution_values.py +202 -0
- parallax_core-0.1.0/src/parallax/core/predicate/_interpretation.py +84 -0
- parallax_core-0.1.0/src/parallax/core/predicate/_nodes.py +299 -0
- parallax_core-0.1.0/src/parallax/core/predicate/_perspective.py +74 -0
- parallax_core-0.1.0/src/parallax/core/predicate/_resolved.py +336 -0
- parallax_core-0.1.0/src/parallax/core/predicate/serde.py +338 -0
- parallax_core-0.1.0/src/parallax/core/predicate/validate.py +1119 -0
- parallax_core-0.1.0/src/parallax/core/py.typed +0 -0
- parallax_core-0.1.0/src/parallax/core/read_delivery/__init__.py +23 -0
- parallax_core-0.1.0/src/parallax/core/read_delivery/_convert.py +676 -0
- parallax_core-0.1.0/src/parallax/core/read_delivery/_delivery.py +158 -0
- parallax_core-0.1.0/src/parallax/core/read_delivery/_evidence.py +40 -0
- parallax_core-0.1.0/src/parallax/core/read_delivery/_fetch.py +265 -0
- parallax_core-0.1.0/src/parallax/core/read_delivery/_page/__init__.py +113 -0
- parallax_core-0.1.0/src/parallax/core/read_delivery/_page/_cadence.py +64 -0
- parallax_core-0.1.0/src/parallax/core/read_delivery/_page/_judgement.py +163 -0
- parallax_core-0.1.0/src/parallax/core/read_delivery/_page/_rows.py +1380 -0
- parallax_core-0.1.0/src/parallax/core/read_delivery/_page/_stored_data.py +297 -0
- parallax_core-0.1.0/src/parallax/core/read_delivery/_page/_views.py +320 -0
- parallax_core-0.1.0/src/parallax/core/read_delivery/_page_reader.py +613 -0
- parallax_core-0.1.0/src/parallax/core/read_delivery/_paging.py +154 -0
- parallax_core-0.1.0/src/parallax/core/read_delivery/_publication.py +67 -0
- parallax_core-0.1.0/src/parallax/core/read_delivery/_read_plan.py +775 -0
- parallax_core-0.1.0/src/parallax/core/read_delivery/_row_converter.py +382 -0
- parallax_core-0.1.0/src/parallax/core/read_delivery/_row_decoding.py +176 -0
- parallax_core-0.1.0/src/parallax/core/read_delivery/_row_lane.py +275 -0
- parallax_core-0.1.0/src/parallax/core/read_delivery/_row_recording.py +288 -0
- parallax_core-0.1.0/src/parallax/core/read_delivery/_stream.py +580 -0
- parallax_core-0.1.0/src/parallax/core/read_planning/__init__.py +837 -0
- parallax_core-0.1.0/src/parallax/core/read_planning/_include_tree.py +272 -0
- parallax_core-0.1.0/src/parallax/core/relationship/__init__.py +24 -0
- parallax_core-0.1.0/src/parallax/core/relationship/_compile.py +183 -0
- parallax_core-0.1.0/src/parallax/core/relationship/_endpoints.py +106 -0
- parallax_core-0.1.0/src/parallax/core/relationship/_facet.py +171 -0
- parallax_core-0.1.0/src/parallax/core/relationship/_rules.py +379 -0
- parallax_core-0.1.0/src/parallax/core/sql_gen/__init__.py +8 -0
- parallax_core-0.1.0/src/parallax/core/sql_gen/_compile.py +1235 -0
- parallax_core-0.1.0/src/parallax/core/sql_gen/_context.py +924 -0
- parallax_core-0.1.0/src/parallax/core/sql_gen/_inheritance.py +1198 -0
- parallax_core-0.1.0/src/parallax/core/sql_gen/_navigation.py +48 -0
- parallax_core-0.1.0/src/parallax/core/sql_gen/_planning.py +1567 -0
- parallax_core-0.1.0/src/parallax/core/sql_gen/_predicate.py +1773 -0
- parallax_core-0.1.0/src/parallax/core/sql_gen/_seek.py +389 -0
- parallax_core-0.1.0/src/parallax/core/sql_gen/_select_list.py +482 -0
- parallax_core-0.1.0/src/parallax/core/sql_gen/_write.py +1007 -0
- parallax_core-0.1.0/src/parallax/core/storage_layout/__init__.py +49 -0
- parallax_core-0.1.0/src/parallax/core/storage_layout/_compile.py +786 -0
- parallax_core-0.1.0/src/parallax/core/storage_layout/_facet.py +610 -0
- parallax_core-0.1.0/src/parallax/core/storage_layout/_roles.py +59 -0
- parallax_core-0.1.0/src/parallax/core/storage_layout/_rules.py +322 -0
- parallax_core-0.1.0/src/parallax/core/storage_layout/_temporal.py +134 -0
- parallax_core-0.1.0/src/parallax/core/temporal_read/__init__.py +649 -0
- parallax_core-0.1.0/src/parallax/core/temporal_read/_compile.py +115 -0
- parallax_core-0.1.0/src/parallax/core/temporal_read/_facet.py +179 -0
- parallax_core-0.1.0/src/parallax/core/temporal_write/__init__.py +3 -0
- parallax_core-0.1.0/src/parallax/core/temporal_write/_errors.py +40 -0
- parallax_core-0.1.0/src/parallax/core/temporal_write/coverage.py +287 -0
- parallax_core-0.1.0/src/parallax/core/temporal_write/expansion.py +1503 -0
- parallax_core-0.1.0/src/parallax/core/unit_work.py +147 -0
- parallax_core-0.1.0/src/parallax/core/value_object/__init__.py +9 -0
- parallax_core-0.1.0/src/parallax/core/value_object/_rules.py +165 -0
- parallax_core-0.1.0/src/parallax/core/wire/__init__.py +23 -0
- parallax_core-0.1.0/src/parallax/core/wire/_codec.py +768 -0
- parallax_core-0.1.0/src/parallax/core/wire/_facts.py +118 -0
- parallax_core-0.1.0/src/parallax/core/wire/_json.py +331 -0
- parallax_core-0.1.0/src/parallax/core/wire/_types.py +6 -0
- parallax_core-0.1.0/src/parallax/core/write_payload/__init__.py +5 -0
- parallax_core-0.1.0/src/parallax/core/write_payload/_preparer.py +352 -0
- parallax_core-0.1.0/src/parallax/core/write_payload/_storage.py +763 -0
- parallax_core-0.1.0/src/parallax/core/write_plan/__init__.py +40 -0
- parallax_core-0.1.0/src/parallax/core/write_plan/columns.py +124 -0
- parallax_core-0.1.0/src/parallax/core/write_plan/keys.py +93 -0
- parallax_core-0.1.0/src/parallax/core/write_plan/managed_row.py +353 -0
- parallax_core-0.1.0/src/parallax/core/write_plan/observe.py +445 -0
- parallax_core-0.1.0/src/parallax/core/write_plan/payload.py +280 -0
- parallax_core-0.1.0/src/parallax/core/write_plan/plan.py +479 -0
- parallax_core-0.1.0/src/parallax/core/write_plan/planned_rows.py +126 -0
- parallax_core-0.1.0/src/parallax/core/write_plan/predecessor_rows.py +105 -0
- parallax_core-0.1.0/src/parallax/core/write_plan/steps.py +884 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Python build / test artifacts (uv, hatchling, pytest-cov, pyright).
|
|
2
|
+
.venv/
|
|
3
|
+
__pycache__/
|
|
4
|
+
*.pyc
|
|
5
|
+
*.egg-info/
|
|
6
|
+
build/
|
|
7
|
+
dist/
|
|
8
|
+
coverage.xml
|
|
9
|
+
.coverage
|
|
10
|
+
.coverage.*
|
|
11
|
+
.pytest_cache/
|
|
12
|
+
.ruff_cache/
|
|
13
|
+
# An editable install compiles parallax-postgres's Cython sources in place.
|
|
14
|
+
packages/parallax-postgres/src/**/*.c
|
|
15
|
+
*.so
|
|
16
|
+
*.pyd
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: parallax-core
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Parallax common runtime: the class-free engine spine (domain model, Predicate algebra, SQL lowering, unit of work, abstract database port).
|
|
5
|
+
Project-URL: Documentation, https://github.com/davidsunglee/parallax/blob/main/languages/python/docs/guide/README.md
|
|
6
|
+
Project-URL: Repository, https://github.com/davidsunglee/parallax
|
|
7
|
+
Project-URL: Changelog, https://github.com/davidsunglee/parallax/blob/main/languages/python/docs/releases.md
|
|
8
|
+
Author: Parallax
|
|
9
|
+
License-Expression: Apache-2.0
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
License-File: NOTICE
|
|
12
|
+
Requires-Python: >=3.14
|
|
13
|
+
Requires-Dist: pydantic-core>=2.46
|
|
14
|
+
Requires-Dist: pydantic>=2.13
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
|
|
17
|
+
# parallax-core
|
|
18
|
+
|
|
19
|
+
Parallax common runtime: the class-free engine spine. Part of the Parallax Python target (`slice-snapshot-1`). See the [Python binding](https://github.com/davidsunglee/parallax/blob/main/languages/python/spec/python.md).
|
|
20
|
+
|
|
21
|
+
Install this distribution with `python -m pip install parallax-core==0.1.0`.
|
|
22
|
+
Its metadata installs exact matching first-party dependencies. The
|
|
23
|
+
[getting-started guide](https://github.com/davidsunglee/parallax/blob/main/languages/python/docs/guide/01-getting-started.md#install)
|
|
24
|
+
explains application composition and supported environments; the
|
|
25
|
+
[release notes](https://github.com/davidsunglee/parallax/blob/main/languages/python/docs/releases.md) record publication status.
|
|
26
|
+
|
|
27
|
+
Licensed under Apache-2.0; the distribution includes `LICENSE` and `NOTICE`.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# parallax-core
|
|
2
|
+
|
|
3
|
+
Parallax common runtime: the class-free engine spine. Part of the Parallax Python target (`slice-snapshot-1`). See the [Python binding](https://github.com/davidsunglee/parallax/blob/main/languages/python/spec/python.md).
|
|
4
|
+
|
|
5
|
+
Install this distribution with `python -m pip install parallax-core==0.1.0`.
|
|
6
|
+
Its metadata installs exact matching first-party dependencies. The
|
|
7
|
+
[getting-started guide](https://github.com/davidsunglee/parallax/blob/main/languages/python/docs/guide/01-getting-started.md#install)
|
|
8
|
+
explains application composition and supported environments; the
|
|
9
|
+
[release notes](https://github.com/davidsunglee/parallax/blob/main/languages/python/docs/releases.md) record publication status.
|
|
10
|
+
|
|
11
|
+
Licensed under Apache-2.0; the distribution includes `LICENSE` and `NOTICE`.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "parallax-core"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Parallax common runtime: the class-free engine spine (domain model, Predicate algebra, SQL lowering, unit of work, abstract database port)."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.14"
|
|
7
|
+
license = "Apache-2.0"
|
|
8
|
+
license-files = ["LICENSE", "NOTICE"]
|
|
9
|
+
authors = [{ name = "Parallax" }]
|
|
10
|
+
dependencies = [
|
|
11
|
+
"pydantic>=2.13",
|
|
12
|
+
# Imported directly for Pydantic's own missing-value sentinel. Every Pydantic
|
|
13
|
+
# release pins one pydantic-core, so this floor is the one `pydantic>=2.13`
|
|
14
|
+
# itself requires.
|
|
15
|
+
"pydantic-core>=2.46",
|
|
16
|
+
]
|
|
17
|
+
|
|
18
|
+
[project.urls]
|
|
19
|
+
Documentation = "https://github.com/davidsunglee/parallax/blob/main/languages/python/docs/guide/README.md"
|
|
20
|
+
Repository = "https://github.com/davidsunglee/parallax"
|
|
21
|
+
Changelog = "https://github.com/davidsunglee/parallax/blob/main/languages/python/docs/releases.md"
|
|
22
|
+
|
|
23
|
+
[build-system]
|
|
24
|
+
requires = ["hatchling"]
|
|
25
|
+
build-backend = "hatchling.build"
|
|
26
|
+
|
|
27
|
+
# PEP 420 namespace package: the wheel ships `parallax.core.*` only, with no
|
|
28
|
+
# `parallax/__init__.py` at the shared namespace root.
|
|
29
|
+
[tool.hatch.build.targets.wheel]
|
|
30
|
+
packages = ["src/parallax"]
|
|
31
|
+
|
|
32
|
+
[tool.hatch.build.targets.sdist]
|
|
33
|
+
include = ["src/parallax", "README.md", "LICENSE", "NOTICE"]
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from parallax.core.base import TemporalBound
|
|
4
|
+
from parallax.core.entity import (
|
|
5
|
+
MANY_TO_ONE,
|
|
6
|
+
MAX,
|
|
7
|
+
ONE_TO_MANY,
|
|
8
|
+
ONE_TO_ONE,
|
|
9
|
+
READ_ONLY,
|
|
10
|
+
READ_WRITE,
|
|
11
|
+
TABLE_PER_CONCRETE_SUBTYPE,
|
|
12
|
+
AbstractRoot,
|
|
13
|
+
AbstractSubtype,
|
|
14
|
+
AllPredicate,
|
|
15
|
+
Attr,
|
|
16
|
+
Bitemporal,
|
|
17
|
+
ConcreteSubtype,
|
|
18
|
+
Document,
|
|
19
|
+
DomainModel,
|
|
20
|
+
EditError,
|
|
21
|
+
EditViolation,
|
|
22
|
+
Entity,
|
|
23
|
+
EntityDefinitionError,
|
|
24
|
+
Float32,
|
|
25
|
+
IncludePath,
|
|
26
|
+
Int32,
|
|
27
|
+
MetamodelDefinitionError,
|
|
28
|
+
MetamodelLookupError,
|
|
29
|
+
ObjectQuery,
|
|
30
|
+
Predicate,
|
|
31
|
+
Rel,
|
|
32
|
+
Sequence,
|
|
33
|
+
SortKey,
|
|
34
|
+
TablePerHierarchy,
|
|
35
|
+
TxTemporal,
|
|
36
|
+
ValueObject,
|
|
37
|
+
asc,
|
|
38
|
+
attr,
|
|
39
|
+
desc,
|
|
40
|
+
index,
|
|
41
|
+
rel,
|
|
42
|
+
)
|
|
43
|
+
from parallax.core.model_formation import MetamodelValidationError
|
|
44
|
+
from parallax.core.object_query import LATEST, TX_TIME, VALID_TIME
|
|
45
|
+
from parallax.core.predicate import ModelRejectedError, QueryDefinitionError
|
|
46
|
+
from parallax.core.temporal_read import Edge, Pin, TemporalReadError, UndeclaredAxisError
|
|
47
|
+
|
|
48
|
+
__all__ = [
|
|
49
|
+
"LATEST",
|
|
50
|
+
"MANY_TO_ONE",
|
|
51
|
+
"MAX",
|
|
52
|
+
"ONE_TO_MANY",
|
|
53
|
+
"ONE_TO_ONE",
|
|
54
|
+
"READ_ONLY",
|
|
55
|
+
"READ_WRITE",
|
|
56
|
+
"TABLE_PER_CONCRETE_SUBTYPE",
|
|
57
|
+
"TX_TIME",
|
|
58
|
+
"VALID_TIME",
|
|
59
|
+
"AbstractRoot",
|
|
60
|
+
"AbstractSubtype",
|
|
61
|
+
"AllPredicate",
|
|
62
|
+
"Attr",
|
|
63
|
+
"Bitemporal",
|
|
64
|
+
"ConcreteSubtype",
|
|
65
|
+
"Document",
|
|
66
|
+
"DomainModel",
|
|
67
|
+
"Edge",
|
|
68
|
+
"EditError",
|
|
69
|
+
"EditViolation",
|
|
70
|
+
"Entity",
|
|
71
|
+
"EntityDefinitionError",
|
|
72
|
+
"Float32",
|
|
73
|
+
"IncludePath",
|
|
74
|
+
"Int32",
|
|
75
|
+
"MetamodelDefinitionError",
|
|
76
|
+
"MetamodelLookupError",
|
|
77
|
+
"MetamodelValidationError",
|
|
78
|
+
"ModelRejectedError",
|
|
79
|
+
"ObjectQuery",
|
|
80
|
+
"Pin",
|
|
81
|
+
"Predicate",
|
|
82
|
+
"QueryDefinitionError",
|
|
83
|
+
"Rel",
|
|
84
|
+
"Sequence",
|
|
85
|
+
"SortKey",
|
|
86
|
+
"TablePerHierarchy",
|
|
87
|
+
"TemporalBound",
|
|
88
|
+
"TemporalReadError",
|
|
89
|
+
"TxTemporal",
|
|
90
|
+
"UndeclaredAxisError",
|
|
91
|
+
"ValueObject",
|
|
92
|
+
"asc",
|
|
93
|
+
"attr",
|
|
94
|
+
"desc",
|
|
95
|
+
"index",
|
|
96
|
+
"rel",
|
|
97
|
+
]
|
|
File without changes
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Callable
|
|
4
|
+
|
|
5
|
+
from parallax.core._execution._publication import ModelSelection, ServingModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["AdoptedExecution", "ExecutionFailure"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ExecutionFailure(Exception):
|
|
11
|
+
"""An ordinary failure escaping an execution, under the edition it adopted.
|
|
12
|
+
|
|
13
|
+
:attr:`edition` is always an actual Adopted Edition — there is no
|
|
14
|
+
edition-less variant, because a failure before adoption keeps its own type
|
|
15
|
+
— and :attr:`cause` is the exception that escaped, which is also the
|
|
16
|
+
``__cause__`` so native chaining reads the same object. A transaction
|
|
17
|
+
invocation reports its final attempt's edition; a rollback that did not
|
|
18
|
+
complete arrives with both of its live errors inside the cause.
|
|
19
|
+
|
|
20
|
+
The constructor settles both, and each is read-only from then on: what a
|
|
21
|
+
failure reports is what it was raised with, so no handler can restate the
|
|
22
|
+
edition an execution ran under or the error that escaped it. The state the
|
|
23
|
+
interpreter owns — chaining, traceback, and notes — stays writable, which
|
|
24
|
+
is why the two facts are held privately rather than by a frozen
|
|
25
|
+
``__setattr__``.
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
def __init__(self, edition: str, cause: Exception) -> None:
|
|
29
|
+
super().__init__(f"execution under model edition {edition!r} failed: {cause!r}")
|
|
30
|
+
self._edition = edition
|
|
31
|
+
self._cause = cause
|
|
32
|
+
|
|
33
|
+
@property
|
|
34
|
+
def edition(self) -> str:
|
|
35
|
+
return self._edition
|
|
36
|
+
|
|
37
|
+
@property
|
|
38
|
+
def cause(self) -> Exception:
|
|
39
|
+
return self._cause
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class AdoptedExecution:
|
|
43
|
+
"""One root execution's adoption of the Serving Model's current selection.
|
|
44
|
+
|
|
45
|
+
:meth:`adopt` records the selection the execution runs under from now on,
|
|
46
|
+
and :meth:`contextualized` runs the execution's body and names that
|
|
47
|
+
edition on whatever ordinary failure escapes it. A transaction calls
|
|
48
|
+
:meth:`adopt` once per attempt and :meth:`contextualized` once around the
|
|
49
|
+
whole retry loop, so the edition a failure reports is the last one adopted.
|
|
50
|
+
"""
|
|
51
|
+
|
|
52
|
+
__slots__ = ("_selection", "_serving")
|
|
53
|
+
|
|
54
|
+
def __init__(self, serving: ServingModel) -> None:
|
|
55
|
+
self._serving = serving
|
|
56
|
+
self._selection: ModelSelection | None = None
|
|
57
|
+
|
|
58
|
+
def adopt(self) -> ModelSelection:
|
|
59
|
+
"""Take the selection currently serving, and retain it as this
|
|
60
|
+
execution's own until the next adoption."""
|
|
61
|
+
selection = self._serving.current()
|
|
62
|
+
self._selection = selection
|
|
63
|
+
return selection
|
|
64
|
+
|
|
65
|
+
@property
|
|
66
|
+
def edition(self) -> str:
|
|
67
|
+
"""The edition most recently adopted; reading it before the first
|
|
68
|
+
adoption is a programming error rather than an absent value."""
|
|
69
|
+
selection = self._selection
|
|
70
|
+
if selection is None:
|
|
71
|
+
raise RuntimeError("an execution has no edition before it has adopted a selection")
|
|
72
|
+
return selection.edition
|
|
73
|
+
|
|
74
|
+
def contextualized[T](self, body: Callable[[], T]) -> T:
|
|
75
|
+
"""Run ``body``, naming the adopted edition on an ordinary failure.
|
|
76
|
+
|
|
77
|
+
An :class:`ExecutionFailure` that already carries an edition passes
|
|
78
|
+
through, so a nested execution's failure is contextualized exactly
|
|
79
|
+
once, and every other ``BaseException`` propagates untouched.
|
|
80
|
+
"""
|
|
81
|
+
try:
|
|
82
|
+
return body()
|
|
83
|
+
except ExecutionFailure:
|
|
84
|
+
raise
|
|
85
|
+
except Exception as exc:
|
|
86
|
+
raise ExecutionFailure(self.edition, exc) from exc
|