Skip to content

Testing overhaul#481

Merged
sg-s merged 9 commits intomainfrom
bulk-docking-fix-317
Mar 19, 2026
Merged

Testing overhaul#481
sg-s merged 9 commits intomainfrom
bulk-docking-fix-317

Conversation

@sg-s
Copy link
Collaborator

@sg-s sg-s commented Mar 18, 2026

changes

  • Pocket has local_path/remote_path and lazy loading
  • Protein has local_path/remote_path and lazy loading
  • Ligand has local_path/remote_path and lazy loading
  • protein finder notebook tests
  • docking (function) notebook tests
  • docking (bulk) notebook tests

@sg-s sg-s requested a review from a team as a code owner March 18, 2026 19:19
Copy link

@claude claude bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates docking and pocket-finding flows to align with newer platform tooling and improves local/mock test behavior by standardizing endpoints and fixtures.

Changes:

  • Adds/updates SDF fixtures for bulk docking and cleans up an existing ligand fixture.
  • Deprecates Protein.find_pockets() in favor of PocketFinder, and updates docs/notebooks accordingly.
  • Introduces Entity download support plus Pocket model changes for remote-path/lazy coordinate loading, and bumps the bulk docking tool version.

Reviewed changes

Copilot reviewed 53 out of 95 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
tests/fixtures/files/testing/brd-9.sdf Adds test ligand fixture (compound 9).
tests/fixtures/files/testing/brd-8.sdf Adds test ligand fixture (compound 8).
tests/fixtures/files/testing/brd-7.sdf Adds test ligand fixture (compound 7).
tests/fixtures/files/testing/brd-6.sdf Adds test ligand fixture (compound 6).
tests/fixtures/files/testing/brd-5.sdf Adds test ligand fixture (compound 5).
tests/fixtures/files/testing/brd-4.sdf Adds test ligand fixture (compound 4).
tests/fixtures/files/testing/brd-3.sdf Adds test ligand fixture (compound 3).
tests/fixtures/files/testing/brd-2.sdf Cleans up fixture to remove multipart/form-data wrapper and extra fields.
tests/fixtures/files/docking/brd-2/ef091970-fd5c-47f2-b05c-58be5cc46130.sdf Adds docking pose fixture output.
tests/fixtures/files/docking/brd-2/cb1b1de5-5400-45be-82f9-424d04c47d18.sdf Adds docking pose fixture output.
tests/fixtures/files/docking/brd-2/b6378671-dc11-4af5-af61-7ee0c87a9849.sdf Adds docking pose fixture output.
tests/fixtures/files/docking/brd-2/b5d1c56d-e418-4930-ba54-b3dcbd35ac52.sdf Adds docking pose fixture output.
tests/fixtures/files/docking/brd-2/b110fa65-4735-4e9e-8dcf-98459348fa67.sdf Adds docking pose fixture output.
tests/fixtures/files/docking/brd-2/aacd8d02-a938-43d5-9627-abd795a9fa6b.sdf Adds docking pose fixture output.
tests/fixtures/files/docking/brd-2/9d72d378-ad13-40c9-925d-e00e0f9ce09d.sdf Adds docking pose fixture output.
tests/fixtures/files/docking/brd-2/8e07bc10-87ff-4854-8ee8-1db51e1f6e86.sdf Adds docking pose fixture output.
tests/fixtures/files/docking/brd-2/856f45c2-d927-4dfc-ae65-5e95a70102cd.sdf Adds docking pose fixture output.
tests/fixtures/files/docking/brd-2/732277f7-2981-4bed-94a0-c0629a76f575.sdf Adds docking pose fixture output.
tests/fixtures/files/docking/brd-2/654baf26-79a1-4f27-96f7-53f42983f791.sdf Adds docking pose fixture output.
tests/fixtures/files/docking/brd-2/4c2877f5-fab5-4b3b-889f-c98091a0e236.sdf Adds docking pose fixture output.
tests/fixtures/files/docking/brd-2/41a75564-901a-4685-b0cc-3de6b884f2ff.sdf Adds docking pose fixture output.
tests/fixtures/files/docking/brd-2/3747fa13-e216-4393-803b-0387e772dc8f.sdf Adds docking pose fixture output.
tests/fixtures/files/docking/brd-2/30e60b4d-f003-40ed-822b-14572a503378.sdf Adds docking pose fixture output.
tests/fixtures/files/docking/brd-2/15b068ad-2409-456d-9a50-310501f8af93.sdf Adds docking pose fixture output.
tests/conftest.py Updates remote paths and adds a Pocket fixture; adds a tool-exists helper.
src/utils/constants.py Splits local gateway vs mock endpoints; makes local default to mock server.
src/platform/constants.py Bumps bulk docking tool version to 0.7.7.
src/exceptions.py Adds MethodDeprecatedError and exports it.
src/drug_discovery/structures/protein.py Deprecates Protein.find_pockets() and raises a dedicated error.
src/drug_discovery/structures/pocket.py Makes Pocket an Entity, adds lazy remote loading, path resolution, hashing, and file writing helpers.
src/drug_discovery/structures/entity.py Adds remote_path/local_path and a generic download() helper.
src/drug_discovery/pocket_finder.py Clarifies run() semantics and propagates status.
src/drug_discovery/execution_mixins.py Hardens quotation parsing when field is null.
docs/notebooks/clean/pocketfinder.ipynb Adds a cleaned PocketFinder usage notebook.
docs/notebooks/clean/docking-single-ligand.ipynb Updates notebook to current APIs (Docking, Pocket.from_result, BRD fixtures).
docs/notebooks/clean/docking-many-ligands.ipynb Replaces deprecated find_pockets() usage with PocketFinder.
docs/dev/mock-server.md Documents local mock behavior and gateway override environment variable.
docs/dd/tutorial/docking.md Updates tutorial to use PocketFinder instead of deprecated method.
docs/dd/how-to/proteins.md Updates “find pockets” examples to use PocketFinder.
docs/dd/how-to/find-pockets.md Updates guide to PocketFinder API and quotes/runs semantics.
conftest.py Removes special-casing/overrides now that local endpoint defaults to mock.
Dockerfile Removes container build file.
.cursor/skills/fix-failing-test.md Updates internal guide snippet to use PocketFinder.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +36 to +37
_remote_path_base = "entities/pockets/"
_preferred_ext = ".pdb"
else:
raise ValueError("Could not extract coordinates from structure")

def _ensure_coordinates(self) -> np.ndarray:
@sg-s sg-s changed the title Bulk docking fix 317 Testing overhaul Mar 19, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the drug-discovery test/fixture setup and documentation to support new Pocket/Protein/Ligand local/remote paths, lazy file loading, and the newer PocketFinder API while expanding docking-related fixtures.

Changes:

  • Add/normalize SDF fixtures (testing ligands and docking pose outputs) used by notebook and platform/mock-driven tests.
  • Introduce shared Entity remote/local path + lazy download() behavior and update Pocket to use it; deprecate Protein.find_pockets() in favor of PocketFinder.
  • Update platform/test constants and docs/notebooks to align with the local mock server default and PocketFinder usage.

Reviewed changes

Copilot reviewed 53 out of 96 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
tests/fixtures/files/testing/brd-9.sdf Adds ligand fixture for testing.
tests/fixtures/files/testing/brd-8.sdf Adds ligand fixture for testing.
tests/fixtures/files/testing/brd-7.sdf Adds ligand fixture for testing.
tests/fixtures/files/testing/brd-6.sdf Adds ligand fixture for testing.
tests/fixtures/files/testing/brd-5.sdf Adds ligand fixture for testing.
tests/fixtures/files/testing/brd-4.sdf Adds ligand fixture for testing.
tests/fixtures/files/testing/brd-3.sdf Adds ligand fixture for testing.
tests/fixtures/files/testing/brd-2.sdf Cleans up ligand fixture formatting/metadata for tests.
tests/fixtures/files/docking/brd-2/ef091970-fd5c-47f2-b05c-58be5cc46130.sdf Adds docking pose output fixture.
tests/fixtures/files/docking/brd-2/cb1b1de5-5400-45be-82f9-424d04c47d18.sdf Adds docking pose output fixture.
tests/fixtures/files/docking/brd-2/b6378671-dc11-4af5-af61-7ee0c87a9849.sdf Adds docking pose output fixture.
tests/fixtures/files/docking/brd-2/b5d1c56d-e418-4930-ba54-b3dcbd35ac52.sdf Adds docking pose output fixture.
tests/fixtures/files/docking/brd-2/b110fa65-4735-4e9e-8dcf-98459348fa67.sdf Adds docking pose output fixture.
tests/fixtures/files/docking/brd-2/aacd8d02-a938-43d5-9627-abd795a9fa6b.sdf Adds docking pose output fixture.
tests/fixtures/files/docking/brd-2/9d72d378-ad13-40c9-925d-e00e0f9ce09d.sdf Adds docking pose output fixture.
tests/fixtures/files/docking/brd-2/8e07bc10-87ff-4854-8ee8-1db51e1f6e86.sdf Adds docking pose output fixture.
tests/fixtures/files/docking/brd-2/856f45c2-d927-4dfc-ae65-5e95a70102cd.sdf Adds docking pose output fixture.
tests/fixtures/files/docking/brd-2/732277f7-2981-4bed-94a0-c0629a76f575.sdf Adds docking pose output fixture.
tests/fixtures/files/docking/brd-2/654baf26-79a1-4f27-96f7-53f42983f791.sdf Adds docking pose output fixture.
tests/fixtures/files/docking/brd-2/4c2877f5-fab5-4b3b-889f-c98091a0e236.sdf Adds docking pose output fixture.
tests/fixtures/files/docking/brd-2/41a75564-901a-4685-b0cc-3de6b884f2ff.sdf Adds docking pose output fixture.
tests/fixtures/files/docking/brd-2/3747fa13-e216-4393-803b-0387e772dc8f.sdf Adds docking pose output fixture.
tests/fixtures/files/docking/brd-2/30e60b4d-f003-40ed-822b-14572a503378.sdf Adds docking pose output fixture.
tests/fixtures/files/docking/brd-2/15b068ad-2409-456d-9a50-310501f8af93.sdf Adds docking pose output fixture.
tests/conftest.py Adds Pocket fixture and tool-existence helper; updates remote paths.
src/utils/constants.py Splits local endpoints (gateway vs mock) and updates local default mapping.
src/platform/results.py Adds compute_job_id filter parameter to results search.
src/platform/constants.py Bumps docking tool version constant.
src/exceptions.py Exposes new MethodDeprecatedError for deprecated API calls.
src/drug_discovery/structures/protein.py Deprecates find_pockets; updates pocket rendering to use lazy local paths.
src/drug_discovery/structures/pocket.py Refactors Pocket to inherit Entity and support lazy local/remote paths.
src/drug_discovery/structures/entity.py Adds remote_path/local_path and a shared download() helper.
src/drug_discovery/pocket_finder.py Clarifies run() semantics and records status.
src/drug_discovery/execution_mixins.py Hardens quotation parsing when missing/None.
docs/notebooks/clean/pocketfinder.ipynb Adds/updates notebook demonstrating PocketFinder.
docs/notebooks/clean/docking-single-ligand.ipynb Updates notebook to new docking workflow + platform sync steps.
docs/notebooks/clean/docking-many-ligands.ipynb Replaces Protein.find_pockets() with PocketFinder.
docs/dev/mock-server.md Documents local mock/gateway behavior for DO_ENV=local.
docs/dd/tutorial/docking.md Updates tutorial to use PocketFinder.
docs/dd/how-to/proteins.md Updates how-to examples to use PocketFinder.
docs/dd/how-to/find-pockets.md Updates pocket finding guide to PocketFinder and new quote/run semantics.
conftest.py Simplifies local env setup now that local endpoint defaults to mock.
Dockerfile Removes Dockerfile from repository.
.cursor/skills/fix-failing-test.md Updates internal dev notes to use PocketFinder.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines 83 to 88
self,
*,
filter_dict: dict[str, Any] | None = None,
compute_job_id: str | None = None,
limit: int | None = 1000,
select: list[str] | None = None,
Comment on lines 118 to 119
# note -- job_compute_id is the same as executionId in the rest of the system
# IMPORTANT! execution_id is not the same as executionId in the rest of the system
Comment on lines +374 to +378
@staticmethod
def _resolve_paths(
entry: dict[str, Any],
idx: int,
) -> tuple[str | None, str | None]:
Comment on lines +391 to +395
raw_local = entry.get("file_path") or entry.get("local_path")
raw_remote = entry.get("remote_path")

has_local = isinstance(raw_local, str) and raw_local.strip()
has_remote = isinstance(raw_remote, str) and raw_remote.strip()
Comment on lines +1335 to +1337
# make sure we
for pocket in pockets:
pocket.download()
"id": "ab60e2eb-af8e-4852-a653-0c929e2415e5",
"metadata": {},
"source": [
"You don't have to explictitly initialize a client, but you can if you want:"
"protein = Protein.from_file(DATA_DIR / \"brd\" / \"brd.pdb\")\n",
"sim = Complex(protein=protein)\n",
"sim"
"You don't have to explictitly initialize a client, but you can if you want:"
@sg-s sg-s merged commit 099e2b7 into main Mar 19, 2026
9 of 14 checks passed
@sg-s sg-s deleted the bulk-docking-fix-317 branch March 19, 2026 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants