Skip to content

Plan and implement full TAPAS-xq processing pipeline #46

@candyhazlett

Description

@candyhazlett

Description

Right now the TAPAS-xq integration only handles the first step — storing the TEI file via `ProcessTeiFileJob`. The full pipeline will eventually need to cover:

  1. Store TEI file to TAPAS-xq
  2. Get MODS metadata back from TAPAS-xq
  3. Run XSL transformations per view package to produce HTML fragments for the TAPAS reader

Each of these is its own job with its own error handling and status. This issue is for planning and building out the rest of that pipeline.

Related issues

Prerequisites

Sub-tasks tracked separately

Related storage work

Steps

  1. Resolve prerequisites (Rename processing_status to a more specific name #43, Handle 422 from tapas-xq as InvalidTeiError with descriptive message #51, Client#post and #delete don't rescue 404 from tapas-xq #52, Refactor TapasXq::Client — audit @ usage and extract shared error handlers #41) before or alongside this work
  2. Design the job chain — likely jobs that trigger the next step on success
  3. Wire `TapasXq::RetrievalService` into the application flow — the service already exists with `retrieve_tei`, `retrieve_mods`, and `retrieve_tfe` methods; the work is deciding where each is called (see Move MODS and TFE XML out of SQL storage #44 for details)
  4. Implement the XSL transformation step via `TapasXq::DeriveReaderService` (Add TapasXq::DeriveReaderService to generate reading interface XHTML #58), blocked on view packages sync (Add TapasXq::ViewPackagesService and sync ViewPackage model from tapas-xq registry #57)
  5. Update status tracking to handle multiple pipeline stages
  6. Implement `POST /tapas-xq/:project-id/:doc-id/tei` (TEI-only store, no MODS/TFE regeneration) — low priority; only needed if a use case emerges for re-storing TEI without regenerating supplemental files
  7. Write specs for each new job and service

Acceptance criteria

  • TEI store, MODS retrieval, and XSL transformation each have their own job
  • Status tracking reflects per-stage state
  • Pipeline works end-to-end in development with TAPAS-xq running
  • Specs cover happy path and error cases for each stage

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions