Skip to content

Add the Paratext 9 import service, storage, and commands - #268

Draft
jasonleenaylor wants to merge 2 commits into
pt9-import-syncfrom
pt9-import-service
Draft

Add the Paratext 9 import service, storage, and commands#268
jasonleenaylor wants to merge 2 commits into
pt9-import-syncfrom
pt9-import-service

Conversation

@jasonleenaylor

@jasonleenaylor jasonleenaylor commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

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.

  • InterlinearProject gains an optional pt9Import provenance field (per-file
    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.
  • projectStorage gains savePt9Import (create the source's single import
    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).
  • pt9ImportService.importPt9Project fetches the raw files through the
    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.
  • Commands: interlinearizer.importPt9Project (serves both import and sync)
    and interlinearizer.createEditableCopy.
  • Service tests mock PAPI only: fake project data providers serve the
    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 Reviewable

jasonleenaylor and others added 2 commits August 21, 2026 14:34
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>
@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9f855c45-e168-40ba-be04-616cc86655c2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant