Parent sprint: #87
Depends on: #88, #89, #90, #91, #92, #93, #94, #96
Recommended order: 10
Codex-ready: yes
Goal
Add tests and small fixes so lvl1 assembly produces valid, inspectable SBOL artifacts before protocol JSON conversion, and does not write default output files unless explicitly requested.
Background
BuildCompiler.assembly_lvl1() calls Assembly(...).run(), extends self.indexed_plasmids, then calls assembly_plan_RDF_to_JSON(product_doc). The JSON conversion writes output.json by default when no output path is supplied. For compiler-only and test workflows, default filesystem side effects make results hard to reproduce and can hide whether SBOL is valid before conversion.
src/buildcompiler/sbol2build.py has real assembly logic: digestion, ligation, activity creation, product implementations, and final document output. This issue should validate that behavior with canonical fixtures.
Scope
- Add tests that run lvl1 assembly using the local canonical fixture.
- Assert the returned products are canonical
Plasmid objects or documented compatible objects.
- Assert the final SBOL document contains:
- assembly activity;
- product ComponentDefinition;
- product Implementation;
- relevant usages/provenance where currently implemented.
- Assert the final SBOL document can serialize and reload.
- Assert the generated product can be re-indexed as inventory.
- Change
assembly_plan_RDF_to_JSON usage so assembly does not write output.json unless an output path is explicitly requested.
- Add or update tests for in-memory JSON return behavior.
Non-goals
- Do not rewrite the digestion/ligation algorithm.
- Do not implement lvl2 assembly.
- Do not run PUDU or Opentrons.
- Do not require live SynBioHub.
Acceptance criteria
Verification
pytest -k "assembly and sbol"
pytest -k "assembly_plan_RDF_to_JSON or output_json"
ruff check .
Codex implementation notes
- Prefer adding an optional
output_path argument or write_json=False flag over removing JSON support.
- Validate SBOL before JSON conversion in tests.
- Keep filesystem writes inside temporary directories when tests need them.
- If SBOL validation APIs are brittle, at minimum test serialize/reload and object presence deterministically.
Parent sprint: #87
Depends on: #88, #89, #90, #91, #92, #93, #94, #96
Recommended order: 10
Codex-ready: yes
Goal
Add tests and small fixes so lvl1 assembly produces valid, inspectable SBOL artifacts before protocol JSON conversion, and does not write default output files unless explicitly requested.
Background
BuildCompiler.assembly_lvl1()callsAssembly(...).run(), extendsself.indexed_plasmids, then callsassembly_plan_RDF_to_JSON(product_doc). The JSON conversion writesoutput.jsonby default when no output path is supplied. For compiler-only and test workflows, default filesystem side effects make results hard to reproduce and can hide whether SBOL is valid before conversion.src/buildcompiler/sbol2build.pyhas real assembly logic: digestion, ligation, activity creation, product implementations, and final document output. This issue should validate that behavior with canonical fixtures.Scope
Plasmidobjects or documented compatible objects.assembly_plan_RDF_to_JSONusage so assembly does not writeoutput.jsonunless an output path is explicitly requested.Non-goals
Acceptance criteria
assembly_lvl1()or the JSON helper no longer writesoutput.jsonby default during tests.Verification
Codex implementation notes
output_pathargument orwrite_json=Falseflag over removing JSON support.