Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Set up Python 3.14
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: "3.14"
cache: "pip"
Expand All @@ -36,9 +36,9 @@ jobs:
python-version: ["3.9", "3.13", "3.14"]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
Comment thread
thodson-usgs marked this conversation as resolved.
python-version: '3.x'
cache: 'pip'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sphinx-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: "3.13"
cache: "pip"
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ dataretrieval = ["py.typed"]
test = [
"pytest > 5.0.0",
"pytest-cov[all]",
"pytest-rerunfailures",
"coverage",
"requests-mock",
"ruff",
Expand Down
18 changes: 18 additions & 0 deletions tests/waterdata_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,24 @@
_normalize_str_iterable,
)

# Most tests in this module call the live USGS Water Data API. After
# PR #273, transient upstream errors (5xx / 429 / connection drops)
# propagate instead of silently truncating, which makes CI susceptible
# to flaking on a brief upstream blip. Auto-retry such failures, but
# only for the narrow set of transient-error trace patterns — library
# bugs raising other exception types still fail on the first try.
# Tests in this file that use ``requests_mock`` or ``mock.patch`` won't
# match these patterns and so are effectively unaffected.
pytestmark = pytest.mark.flaky(
Comment thread
thodson-usgs marked this conversation as resolved.
Outdated
reruns=2,
reruns_delay=5,
only_rerun=[
r"RuntimeError:\s*(?:429|5\d\d):", # _raise_for_non_200 output
r"ConnectionError",
r"ReadTimeout|ConnectTimeout|Timeout",
],
)
Comment thread
thodson-usgs marked this conversation as resolved.


def mock_request(requests_mock, request_url, file_path):
"""Mock request code"""
Expand Down
Loading