Conversation
There was a problem hiding this comment.
Pull request overview
This PR tightens result retrieval across drug-discovery execution types by consistently scoping result-explorer queries to the producing tool’s tool_key, and improves interactive usability of Structure Report results via richer representations.
Changes:
- Add
tool_keyscoping toclient.results.get(...)calls acrossExecution.get_resultsand several tool-specific workflows (Protein Prep, ABFE, Metabolism). - Add interactive-friendly
__repr__and_repr_html_toStructureReportResult, with tests asserting output shape. - Update the Protein Prep notebook content and extend Copilot guidance to codify the
tool_keyfiltering expectation.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/drug_discovery/execution.py |
Injects a default tool_key filter into get_results() calls to avoid cross-tool result mixing. |
src/drug_discovery/protein_prep.py |
Scopes prepared-protein result lookup to the Protein Prep tool’s tool_key. |
src/drug_discovery/metabolism.py |
Scopes ligand-id result queries to the Metabolism tool’s tool_key. |
src/drug_discovery/abfe.py |
Scopes ABFE visualization/result lookups to the ABFE tool’s tool_key. |
src/drug_discovery/structure_report.py |
Adds concise __repr__ and rich HTML rendering for StructureReportResult. |
tests/test_executions.py |
Adds unit tests asserting Execution.get_results() tool_key scoping behavior. |
tests/test_structure_report.py |
Adds assertions for StructureReportResult text/HTML representations. |
docs/notebooks/clean/protein-prep.ipynb |
Expands the notebook to include Structure Report usage and updates Protein Prep flow examples. |
.github/copilot-instructions.md |
Documents the project expectation to include tool_key filters when the producing tool is known. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| "from deeporigin.drug_discovery import BRD_DATA_DIR, Protein, ProteinPrep, StructureReport\n", | ||
| "from deeporigin.platform import DeepOriginClient\n", | ||
| "\n", | ||
| "client = DeepOriginClient.from_disk()\n", | ||
| "protein = Protein.from_file(BRD_DATA_DIR / \"brd.pdb\")" | ||
| "client" |
| request_kwargs = dict(kwargs) | ||
| if self.tool_key: | ||
| filter_dict = dict(request_kwargs.get("filter_dict") or {}) | ||
| filter_dict.setdefault("tool_key", {"eq": self.tool_key}) | ||
| request_kwargs["filter_dict"] = filter_dict |
Make ProteinPrep the sole preparation session: nested PocketFinderConfig, route loops-on/pocket runs to deeporigin.target-preparation v2, keep recommend and light prepare on protein-prep, and expose get_report / get_pockets with dual-key history. Drop the draft TargetPrep public API.
Emit find_pockets instead of nested pocket for target-preparation and protein-prep 8.0.0, route loops-off crystal pockets through direct protein-prep, and reject define-by-selection on the composite path.
|
Stacked the flat |
Remove Protein.register(); sync stages files and calls served import-dataset. Mock server register_protein updates the canonical protein row.
|
Latest commit on this branch: Companion toolbox PR: will link after creation — search |
|
Companion toolbox PR: https://github.com/deeporiginbio/platform-toolbox/pull/1066 |
…ataset plumbing runs Fail closed without a resolved project, stamp projectId on the execution, and set visibility=hidden so register_protein/register_pose do not clutter Activity. Pin import-dataset tool version to major 2.
Summary
This PR drifted from Structure Report / Protein Prep polish into the locked one-class preparation contract paired with Target Preparation 2.0 (DDOS-7091).
ProteinPrep+StructureReportas the public surface; do not ship a publicTargetPrep.PocketFinderConfig; optionalpocketonProteinPrep.recommend()→ alwaysdeeporigin.protein-prepdeeporigin.protein-prep(run())deeporigin.target-preparationv2 (start()/ quote /confirm())get_results()→ preparedProteinfor either Tool key.get_report()/get_pockets()(raise if excluded;Noneif pending;[]for valid zero-pocket).from_id/list/from_last_run; pin Target Preparation major 2.Depends on platform-toolbox Target Preparation 2.0.0 registration on the environment under test (toolbox PR #1016).
Jira: DDOS-7091
Test plan
uv run pytest --env local -x tests/test_protein_prep.py(routing, getters, quote)ProteinPrepget_report/get_pocketsscripts/notebooks.shif dirty notebook is refreshed