Parent sprint: #87
Depends on: none
Recommended order: 1
Codex-ready: yes
Goal
Add a first-class local SBOL indexing entry point so BuildCompiler can index already-loaded sbol2.Document objects without requiring SynBioHub registry credentials, auth token, or network access.
Background
The current BuildCompiler.__init__ takes collections, sbh_registry, auth_token, and sbol_doc, creates a sbol2.PartShop, and immediately calls _index_collections(collections). _index_collections treats every collection item as a URI and calls self.sbh.pull(uri, self.sbol_doc). This makes local/offline SBOL collection debugging difficult and hides whether a collection was actually indexed from local data.
Scope
Implement one of these equivalent APIs, choosing the smallest compatible change:
BuildCompiler.from_local_documents(
collection_docs: list[sbol2.Document],
design_doc: sbol2.Document | None = None,
)
or:
compiler = BuildCompiler(... minimal args ...)
compiler.index_document(collection_doc)
Preferred direction:
- Keep existing constructor behavior working if tests or notebooks rely on it.
- Add a new factory/classmethod for local documents rather than breaking current users.
- Reuse the same indexing logic that SynBioHub-pulled documents will use in later issues.
- Avoid any SynBioHub calls in local mode.
Non-goals
- Do not implement a full clean-architecture rewrite.
- Do not implement new route selection, assembly, or protocol behavior.
- Do not require PUDU, Opentrons, or SBOLInventory.
Acceptance criteria
Verification
Run:
pytest tests/unit tests/integration -k "local and index"
ruff check .
Adjust test paths if the repository currently uses a different layout.
Codex implementation notes
- This is a seam-creation issue. Keep it minimal.
- If the current constructor is too rigid, add a private alternate constructor/helper rather than rewriting the class.
- Prefer explicit names like
from_local_documents and index_document over hidden behavior.
- Make any test fixture tiny; do not require live SynBioHub access.
Parent sprint: #87
Depends on: none
Recommended order: 1
Codex-ready: yes
Goal
Add a first-class local SBOL indexing entry point so BuildCompiler can index already-loaded
sbol2.Documentobjects without requiring SynBioHub registry credentials, auth token, or network access.Background
The current
BuildCompiler.__init__takescollections,sbh_registry,auth_token, andsbol_doc, creates asbol2.PartShop, and immediately calls_index_collections(collections)._index_collectionstreats every collection item as a URI and callsself.sbh.pull(uri, self.sbol_doc). This makes local/offline SBOL collection debugging difficult and hides whether a collection was actually indexed from local data.Scope
Implement one of these equivalent APIs, choosing the smallest compatible change:
or:
Preferred direction:
Non-goals
Acceptance criteria
sbol2.Documentobjects can be indexed without constructing a realsbol2.PartShopor callingpull.indexed_plasmids,indexed_backbones,restriction_enzyme_implementations, andligase_implementations.Verification
Run:
Adjust test paths if the repository currently uses a different layout.
Codex implementation notes
from_local_documentsandindex_documentover hidden behavior.