SynBioHub PartShop client, collection pulls, and stricter Golden Gate digest handling#85
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 869b543df5
ℹ️ 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".
| auth_token=auth_token, | ||
| email=email, | ||
| password=password, | ||
| sbol_doc=sbol_doc, |
There was a problem hiding this comment.
Forward caller-provided SBOL document to SynBioHub path
When full_build takes the SynBioHub constructor branch, it only forwards sbol_doc and drops the sbol_document argument; if callers pass repository_url/auth options together with sbol_document (the other public parameter), from_synbiohub receives None and creates a new sbol2.Document, so the user’s preloaded SBOL content is silently ignored during planning/execution. This is a regression in mixed local+remote workflows and can cause missing inventory/component resolution.
Useful? React with 👍 / 👎.
Motivation
sbol2.PartShopto enable authenticated and anonymous repository access and automatic collection pulls into the in-memory SBOL document using theBuildCompilerconvenience constructor.Description
PartShopRepositoryClientinsrc/buildcompiler/sbol/repository.pyimplementing auth-token and email/password login,pull_identity, and a safe__repr__that does not expose secrets.src/buildcompiler/api/compiler.pyto acceptrepository_url,email, andpasswordinBuildCompiler.from_synbiohubandfull_build, create ansbol2.Documentwhen needed, instantiatePartShopRepositoryClient, and pull configuredcollections; expose the client on theBuildCompilerinstance asrepository_client.pull_clientcallback intoFullBuildExecutor.from_dependenciesso theSbolResolvercan use the repository pull function during planning/execution, and exportPartShopRepositoryClientfrombuildcompiler.sbol.src/buildcompiler/sbol2build.pywith_select_expected_digest_fragmentto require exactly two digest fragments and to explicitly choose theinsert(smaller) orbackbone(larger) fragment, with improved error messages.README.mdand include a new authenticated SynBioHub tutorial notebook undernotebooks/demonstrating login and collection pulls.tests/unit/sbol/test_repository.pyto validatePartShopRepositoryClientbehaviors and extendtests/unit/api/test_compiler_api.pyto test repository integration and authentication edge cases.Testing
tests/unit/sbol/test_repository.py, which exercise anonymous pulls, token auth, login flow, and__repr__, and they passed.tests/unit/api/test_compiler_api.pyto validateBuildCompiler.from_synbiohubargument validation and collection pulls with a fakePartShop, and the tests passed.pytestfor the modified areas and observed success for the new and adjusted tests.Codex Task