Implement BuildCompiler transformation orchestration stage#44
Implement BuildCompiler transformation orchestration stage#44Gonza10V wants to merge 1 commit intotransformationfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f4a8701c68
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| plasmid_impl_id = f"{plasmid.displayId}_impl" | ||
| plasmid_impl = doc.find(plasmid_impl_id) or sbol2.Implementation(plasmid_impl_id) | ||
| plasmid_impl.built = plasmid.identity |
There was a problem hiding this comment.
Use plasmid identity (not displayId) for impl lookup
This implementation key is derived only from plasmid.displayId, so two distinct plasmids that share a displayId (for example different SBOL versions or namespace variants) are forced to reuse one Implementation. Because the code then unconditionally sets plasmid_impl.built = plasmid.identity, later transformations can silently retarget the shared implementation and invalidate provenance for earlier activities/usages that referenced it.
Useful? React with 👍 / 👎.
| transformed_strain = sbol2.ModuleDefinition( | ||
| f"{chassis_name}_with_{plasmid.displayId}" |
There was a problem hiding this comment.
Make transformed strain IDs unique per transformation step
The transformed strain identity is based only on chassis_name and plasmid.displayId, so repeated inputs (or different plasmids with the same displayId) collide on the same ModuleDefinition/Implementation IDs. In those cases _add_if_absent suppresses later objects, and multiple transformation steps can map to the same SBOL artifact URI, losing a one-step-to-one-artifact mapping.
Useful? React with 👍 / 👎.
Summary
BuildCompiler.transformation(...)insrc/buildcompiler/buildcompiler.pyPlasmid,ComponentDefinition, and dict payloads_normalize_transformation_inputs_get_or_create_chassis_get_or_create_plasmid_implementation_add_if_absenttests/test_buildcompiler_transformation.pyfor:Validation
ruff check src/buildcompiler/buildcompiler.py tests/test_buildcompiler_transformation.py✅python -m unittest tests.test_buildcompiler_transformationsbol2is not installed and package installation is blocked by proxy/network restrictionsNotes
transformation).platingandfull_buildorchestration are left for subsequent phases.Codex Task