Skip to content

Disambiguating HTTP-related failures in chemdbqueries tests#63

Merged
timbernat merged 7 commits into
mainfrom
CI-http-requests
Jun 13, 2026
Merged

Disambiguating HTTP-related failures in chemdbqueries tests#63
timbernat merged 7 commits into
mainfrom
CI-http-requests

Conversation

@timbernat

@timbernat timbernat commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Description

PubChemPy enforces a maximum "5 queries per second" limit in its PUGREST query API which this library frequently exceeds in CI matrix runs, causing false positive test failures due to dynamic throttling, rather than any issue with the code in this library. This PR aims to make response error handling and related tests aware of these shutoffs, and to handle these exceptions more gracefully to provide more helpful CI results

Todos

Notable points that this PR has either accomplished or will accomplish.

  • chembdqueries.py sources
    • Make pubchem-agnostic HTTPError wrap retain context about why request failed
  • test_chemdbqueries.py:
    • Catch and skip tests related to server disconnections (namely, codes 500, 503, and 504)

Questions

  • Question1

Status

  • Check CI passes
    • Attempt multiple runs before changes to see if errors are logged first (i.e. intentionally overload server requests and see if they can be detected in tests)

@timbernat timbernat self-assigned this Jun 12, 2026
@timbernat timbernat added enhancement New feature or request dependency Changes to how library code interacts with or imports external libraries Internal Changes how internal components are implemented/interact with minimal effect on API labels Jun 12, 2026
@timbernat timbernat changed the title Ci http requests Disambiguating HTTP-related faulres in chemdbqueries tests Jun 12, 2026
@timbernat timbernat changed the title Disambiguating HTTP-related faulres in chemdbqueries tests Disambiguating HTTP-related failures in chemdbqueries tests Jun 12, 2026
@timbernat timbernat merged commit f37d05a into main Jun 13, 2026
4 checks passed
@timbernat timbernat deleted the CI-http-requests branch June 13, 2026 03:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependency Changes to how library code interacts with or imports external libraries enhancement New feature or request Internal Changes how internal components are implemented/interact with minimal effect on API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant