Retrieve 3D conformers - #24
Open
tmcgrath325 wants to merge 9 commits into
Open
Conversation
timholy
reviewed
May 6, 2025
timholy
left a comment
Member
There was a problem hiding this comment.
This looks great, thanks for contributing this!
tmcgrath325
force-pushed
the
tmm/conformers
branch
from
July 6, 2026 16:54
01775d1 to
61926b7
Compare
Under HTTP/2 all requests to a host multiplex over one shared connection, so a single wedged connection stalls every subsequent request. Pin HTTP/1.1, whose independent pooled connections confine a stall to the one request, and bound the read-inactivity time so a request cannot hang indefinitely. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Route get_conformers_for_cid through _http_request so conformer retrieval inherits the HTTP/1.1 and read-timeout defaults, and sleep between successive per-conformer SDF fetches. Expose sleep_interval and readtimeout as keyword arguments. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
tmcgrath325
force-pushed
the
tmm/conformers
branch
from
July 8, 2026 22:46
61926b7 to
ded010f
Compare
BrokenRecord's `ignore_headers` deletes the named headers from the request when it records, not just when it compares. Playback reads the recorded `Host` header to verify that a request targets the expected server, so ignoring "Host" yields "Expected request to , got pubchem.ncbi.nlm.nih.gov" on every replay. Drop it from the list and restore the header in the stored recordings. Ignore "Cookie" instead: NCBI sets an `ncbi_sid` cookie on the first live response, which otherwise makes every later playback in the same session fail the header check. This allows a subset of the recordings to be regenerated without deleting them all.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds a way to retrieve conformers (SDF) for a compound via
get_conformers_for_cid. Information about these conformers can be found in the documentation for the PubChem3D Project.To get tests to pass, I've regenerated the BrokenRecord files for all tests, added a new xref entry for cyclic guanosine monophosphate, and tinkered with the CI. I'd be happy to separate out these changes to a separate PR if that's preferable.
There seem to be some kinks that still need ironing out with BrokenRecord before this is ready to be merged, since records generated in my local environment fail tests in CI due to mismatched headers.