Skip to content

ADD: aws downloader, REF: big change, logging#64

Open
RBhupi wants to merge 9 commits into
mainfrom
devel
Open

ADD: aws downloader, REF: big change, logging#64
RBhupi wants to merge 9 commits into
mainfrom
devel

Conversation

@RBhupi

@RBhupi RBhupi commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

PR tags (required)

Select all that apply.

  • docs-only
  • tests-only
  • tiny-change (<5 lines, single class/file)
  • code-change
  • scientific/algorithmic
  • design/architecture
  • GUI

What changed

2-4 bullets in plain language.

Replaced the third-party library with a native adapt/downloaders/ package: an anonymous (unsigned) S3 client, paginated list_objects_v2, and size-verified atomic downloads (.part → verify → os.replace).
NexradS3 is a drop-in backend for the acquisition source (get_avail_scans_in_range / get_avail_radars / download); modules/acquisition only swaps its conn, otherwise unchanged.
Removed nexradaws from pyproject.toml, requirements.txt, environment.yml and added boto3; isolated boto3 to downloaders/ via the heavy-dep fitness test and a new downloaders_are_leaf import-linter contract.
Added offline unit tests mirroring the nexradaws spec, plus a live-AWS parity test (KTLX 2013-05-20 18–22 → 53 scans, real verified download).
Why
1-2 lines on the user/problem impact.

Drops an external dependency we don't control, adds the download verification nexradaws lacked, and concentrates all S3 I/O in one reusable leaf so future datasets (GOES/GLM/MRMS) reuse s3.py unchanged.

Issues closed
List issue references this PR closes
Closes #20 #63

None.

Target version (required)
Aiming for: next patch (current dev line v0.1.3.x)

Validation
Mark each item as done or N/A. Add one short evidence line for each item.

I ran ruff

Evidence (command + pass/fail): ruff check src tests → All checks passed
N/A reason (if not run):
I ran import-linter

Evidence (command + pass/fail): lint-imports → 8 contracts kept, 0 broken (incl. new downloaders_are_leaf)
N/A reason (if not run):
I ran tests

Evidence (command + pass/fail): pytest -m "not integration" → 1095 passed, 2 skipped; pytest -m integration tests/integration/test_nexrad_downloader_integration.py → 2 passed (53-scan parity + real download)
N/A reason (if not run):
AI usage & manual verification
If AI tools were used, complete this section.

AI used: yes
Model/tooling: Claude (Claude Code, Opus 4.x)
Tasks delegated to AI: S3-layout research, implementing the downloaders/ package and tests removing the dependency, and updating the create-adapt-module skill docs.
Manual verification performed: live adapt run-nexrad --radar KGSP realtime run downloaded and processed real scans end-to-end; confirmed Adapt imports/runs with nexradaws made unimportable; reviewed the full diff.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.67883% with 114 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.59%. Comparing base (993ee80) to head (89516af).

Files with missing lines Patch % Lines
src/adapt/runtime/orchestrator.py 58.69% 30 Missing and 8 partials ⚠️
src/adapt/persistence/execution_history.py 78.49% 13 Missing and 7 partials ⚠️
src/adapt/modules/tracking/module.py 92.19% 7 Missing and 4 partials ⚠️
src/adapt/modules/tracking/identity.py 81.81% 3 Missing and 3 partials ⚠️
src/adapt/runtime/observability.py 96.44% 3 Missing and 3 partials ⚠️
src/adapt/modules/tracking/events.py 91.30% 2 Missing and 2 partials ⚠️
src/adapt/modules/tracking/matching/overlap.py 87.50% 2 Missing and 2 partials ⚠️
src/adapt/runtime/history_handler.py 89.18% 1 Missing and 3 partials ⚠️
src/adapt/runtime/provenance.py 80.95% 3 Missing and 1 partial ⚠️
src/adapt/runtime/run_reporter.py 92.00% 3 Missing and 1 partial ⚠️
... and 8 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #64      +/-   ##
==========================================
+ Coverage   84.53%   86.59%   +2.06%     
==========================================
  Files          82      105      +23     
  Lines        5637     6700    +1063     
  Branches      783      895     +112     
==========================================
+ Hits         4765     5802    +1037     
- Misses        614      615       +1     
- Partials      258      283      +25     
Flag Coverage Δ
unittests 86.59% <91.67%> (+2.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@RBhupi RBhupi requested review from sgupta92 and zssherman and removed request for sgupta92 June 29, 2026 03:56
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.

Improve logging

2 participants