Add the Paratext 9 import service, storage, and commands - #268
Add the Paratext 9 import service, storage, and commands#268jasonleenaylor wants to merge 2 commits into
Conversation
Add an optional pt9Import provenance field (per-file hashes and the import timestamp) to InterlinearProject, and add the storage contract for imports: savePt9Import creates the source project's single import record or replaces it wholesale, keeping only id and createdAt; updateAnalysis and updateProjectMetadata reject pt9Import-carrying projects while deleteProject stays allowed; getPt9ImportForSource finds the one import for a source. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Add pt9ImportService.importPt9Project: fetch the source project's PT9 interlinear files through the platformScripture.Pt9Interlinear projectInterface, parse them, rebuild the text layer for each referenced book from the project's USJ, convert, and persist the outcome as the source's single frozen import project with a fixed localized name and description. An empty source aborts a first import and leaves an existing import unchanged with a warning. Register two commands: interlinearizer.importPt9Project (import or sync) and interlinearizer.createEditableCopy, which clones an import's analysis into a new editable project without import provenance. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Superseded by #273: the parsed-model adoption (paranext/paranext-core#2707) rewrote the service to consume the platform's parsed payload, so the stack was rebuilt fresh rather than force-pushed over this history. |
Add the backend import pipeline for Paratext 9 interlinear data, stacked on
the converter (#240). Two commits: the storage layer, then the service and
commands.
hashes and the import timestamp). A project carrying it is frozen: storage
rejects every user write, and only the import's own save path replaces its
content. Deleting stays allowed.
project or replace it wholesale, keeping only id and createdAt),
getPt9ImportForSource, and createEditableCopy (clone an import's analysis
into a new editable project with no provenance).
platformScripture.Pt9Interlinear projectInterface (Add read-only PT9 interlinear projectInterface to the Paratext PDP paranext/paranext-core#2707),
parses them, rebuilds each referenced book's text layer from the project's
USJ, converts, and persists the result with a fixed localized name and
description. A source with no interlinear data aborts a first import and
leaves an existing import unchanged with a warning; only an explicit delete
removes an import.
and interlinearizer.createEditableCopy.
test-data XML fixtures verbatim while the real parsers and converter run,
so the tests exercise raw XML through to the persisted analysis and prove
the Pt9Interlinear wire shapes end to end.
Depends on paranext/paranext-core#2707 for the projectInterface at runtime;
the types compile against the local checkout.
🤖 Generated with Claude Code
This change is