Skip to content

Spec 015 T069: BioPAX in the library service - #755

Merged
adamjohnwright merged 3 commits into
mainfrom
s015/t069-biopax-service
Oct 29, 2026
Merged

adamjohnwright merged 3 commits into
mainfrom
s015/t069-biopax-service

Conversation

@adamjohnwright

Copy link
Copy Markdown
Contributor

Spec 015 (specs/015-graph-exports), T069. With #754 (T070, merged), node's .biopax endpoint now has a service behind it. Nothing is routed until T071.

The service:

  • GET /biopax/{stId} answers one event's BioPAX Level 3, from BioPAX3Exporter's library (main at 64c716a, built from source). It carries the release's per-event xml:base.
  • Files are kept per release on disk, written beside their final name and moved into place, as SBML's are.
  • SbmlFiles and SbmlController became ExportFiles and ExportController, with one ExportFiles per export.
  • The cap of two conversions at once is shared by both exports, so the heap holds at most two whatever node sends.

The build:

  • The pom holds Kotlin at the library's 2.4.21. Spring Boot 2.7 would bring 1.6.21.
  • The Dockerfile cmps the library jar and checks the jar's kotlin-stdlib and paxtools-core versions.
  • PINS.md has a new row, and pins.spec.ts follows. Its ARG pattern now allows a digit: as written it couldn't see BIOPAX3_EXPORTER.

check.sh:

  • A BioPAX stage over BioPAX3Exporter's fixture graph: one event of each of five kinds across both species, each checked by that commit's contained.py against its species' expected file, with the per-event base, plus a 404 and a 400.
  • A SERVICE_PORT setting, so it can run beside a deployment's own service.

Checked here:

  • The image built, with its unit tests and jar checks.
  • check.sh passed: SBML's three files valid and identical to expected, and the five BioPAX events contained and whole.
  • Against beta's current image, which has no BioPAX, the check failed with five 404s.

Measured on a private copy of release 98's graph, in a container held to the compose limits (1.5 GiB, 1 GiB heap). The BioPAX and SBML of Signal Transduction and Metabolism were all asked at once:

  • Memory: 1.10 GiB at peak, with no kill.
  • Time: the cap converted Metabolism's pair in 156–158 s, then Signal Transduction's, finishing at 300–310 s.
  • Consequence: in that worst case, the queued pair's readers get node's 503 ("took too long") at 290 s. The files are still made and kept, so the next request is answered at once. Alone, each conversion is about 150 s.

Unit tests:

  • ExportFilesTest (11) and ExportControllerTest (8).
  • New: an export with no diagram source never fetches one; each export keeps its own files; the cap is shared across exports; BioPAX is answered as RDF with SBML's errors.

Also, from #754's review:

  • Node's comment on the export shares now says what they protect.
  • BioPAX's own 503 messages are tested.
  • The slashed form joins the forms of the id that are tested.

🤖 Generated with Claude Code

adamjohnwright and others added 3 commits October 29, 2026 18:41
The service gains BioPAX3Exporter's library, built from main at 64c716a
(PINS.md, pins.spec.ts, whose ARG pattern now allows a digit): GET
/biopax/{stId} answers one event's BioPAX Level 3 with the release's
per-event xml:base, kept per release on disk as SBML's are. SbmlFiles and
SbmlController become ExportFiles and ExportController, one per export,
and the conversions' cap of two is shared by both, so the heap holds at
most two whatever node sends. The pom holds Kotlin at the library's 2.4.21
(Boot 2.7 would bring 1.6.21); the Dockerfile checks the jar's Kotlin and
Paxtools and compares the library's bytes. check.sh adds a BioPAX stage
over BioPAX3Exporter's fixture graph: five events of each kind and both
species, each contained in its species' expected file by that commit's
contained.py, with the per-event base; and 404 and 400.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s they are

The service's conversions are capped across both exports (T069), so node's
shares keep one export from taking the other's places in node, not at the
service; the comment says so. BioPAX's own 503 messages, the service's
503 with Retry-After 30 and an unreachable service, are tested, and the
slashed form joins the forms of the id; a changed message is caught.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hold

check.sh chooses, for each kind, the first fixture event its species'
expected file holds (the fixture has events beyond those files), and takes
a SERVICE_PORT, so it runs beside a deployment's own service. Run here: both
stages pass, and against beta's image, with no BioPAX, it fails. Measured
on a private copy of release 98's graph: the largest pathways' BioPAX and
SBML, four at once, peak at 1.10 GiB within T064's limits; the shared cap
queues the second pair past node's 290 s, recorded in T069.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@adamjohnwright
adamjohnwright merged commit 6c3357a into main Oct 29, 2026
8 checks passed
@adamjohnwright
adamjohnwright deleted the s015/t069-biopax-service branch October 29, 2026 19:32
adamjohnwright added a commit that referenced this pull request Oct 29, 2026
Spec 015 T069, from #755's review: check.sh's silent stop, old work, a fair cap
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