Add relational schema design plan and Rust hello binding fallback - #13
Draft
leynos wants to merge 1 commit into
Draft
Add relational schema design plan and Rust hello binding fallback#13leynos wants to merge 1 commit into
leynos wants to merge 1 commit into
Conversation
- Introduce a comprehensive ExecPlan for relational schema design covering TEI headers, canonical episodes, ingestion jobs, source documents, series profiles, and approval states. - Document design decisions, context, concrete steps, validation criteria, and interfaces for schema development. - Provide a roadmap to implement SQLAlchemy models, Alembic migrations, tests, and documentation updates. - Aim to support auditable ingestion, approval workflows, and stable downstream service interfaces. This new document guides the development, testing, and documentation of the canonical content foundation schema. Co-authored-by: devboxerhub[bot] <devboxerhub[bot]@users.noreply.github.com>
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the
✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
Reviewer's GuideAdds a living ExecPlan document for upcoming relational schema design work and refactors the public episodic.hello entrypoint to resolve an optional Rust implementation via a new helper module with a Python fallback. Sequence diagram for episodic.hello resolution with optional Rust bindingsequenceDiagram
actor User
participant PythonRuntime
participant episodic as episodic_package
participant _hello as episodic__hello_module
participant RustExt as _episodic_rs_extension
participant Pure as episodic_pure_module
User->>PythonRuntime: from episodic import hello
PythonRuntime->>episodic: import episodic
episodic->>_hello: from ._hello import hello
_hello->>PythonRuntime: __import(_episodic_rs)
alt Rust extension available
PythonRuntime-->>_hello: returns RustExt
_hello->>RustExt: access hello
RustExt-->>_hello: function hello
_hello-->>episodic: bind hello to RustExt.hello
else Rust extension missing
PythonRuntime-->>_hello: raises ModuleNotFoundError
_hello->>Pure: from .pure import hello
Pure-->>_hello: Python hello function
_hello-->>episodic: bind hello to Pure.hello
end
episodic-->>PythonRuntime: export hello in __all__
PythonRuntime-->>User: hello bound to chosen implementation
User->>PythonRuntime: print(hello())
PythonRuntime->>episodic: call hello()
episodic->>_hello: delegate to bound hello
Class diagram for modules involved in episodic.hello resolutionclassDiagram
class episodic {
+hello()
}
class episodic__hello {
+PACKAGE_NAME : str
+hello()
}
class episodic_pure {
+hello()
}
class _episodic_rs {
+hello()
}
episodic --> episodic__hello : imports hello from
episodic__hello --> _episodic_rs : optionally imports
episodic__hello --> episodic_pure : falls back to
Flow diagram for hello implementation selection in episodic._helloflowchart TD
A[Start import of episodic._hello] --> B[Set PACKAGE_NAME = episodic]
B --> C[Attempt to import module _episodic_rs]
C -->|Import succeeds| D[Bind hello = rust.hello]
C -->|ModuleNotFoundError| E[Import hello from episodic.pure]
D --> F[hello refers to Rust implementation]
E --> F[hello refers to Python implementation]
F --> G[episodic.__init__ does from ._hello import hello]
G --> H[episodic.hello is available to callers]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
Design rationale
How to test locally
Validation plan
Documentation updates
Artifacts and notes
◳ Generated by DevBoxer ◰
ℹ️ Tag @devboxerhub to ask questions and address PR feedback
📎 Task: https://www.devboxer.com/task/d3154e2f-0f5f-41f6-a32f-76f3fe7830ad
Summary by Sourcery
Introduce a relational schema design exec plan document and centralize resolution of the optional Rust-backed hello binding behind a dedicated helper module.
Enhancements:
Documentation: