Skip to content

Fix data access to external resources#155

Merged
AndrewSazonov merged 4 commits intodevelopfrom
fix-external-data-accsess
Apr 14, 2026
Merged

Fix data access to external resources#155
AndrewSazonov merged 4 commits intodevelopfrom
fix-external-data-accsess

Conversation

@AndrewSazonov
Copy link
Copy Markdown
Member

No description provided.

@AndrewSazonov AndrewSazonov requested a review from Copilot April 14, 2026 11:15
@AndrewSazonov AndrewSazonov added the [scope] bug Bug report or fix (major.minor.PATCH) label Apr 14, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.78%. Comparing base (b3011a6) to head (abe823a).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #155      +/-   ##
===========================================
+ Coverage    82.90%   88.78%   +5.88%     
===========================================
  Files          145      145              
  Lines         8418     8429      +11     
  Branches       854      855       +1     
===========================================
+ Hits          6979     7484     +505     
+ Misses        1150      675     -475     
+ Partials       289      270      -19     
Flag Coverage Δ
integration 75.13% <84.21%> (+18.80%) ⬆️
unittests 79.27% <94.73%> (+0.02%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 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.

Copy link
Copy Markdown
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 download_data() to fetch datasets via a pinned GitHub raw-content URL derived from an index “path” field (instead of consuming full external URLs directly), aligning data access with a more controlled/pinned resource layout.

Changes:

  • Switched dataset index records from url to path, and added URL construction helpers (_build_data_url, _record_path).
  • Updated download_data() to build the download URL from the record path and derive filenames from the record path suffix.
  • Updated unit tests to reflect the new index schema and URL construction behavior.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/easydiffraction/utils/utils.py Builds dataset URLs from a repo/ref/root + record path; updates download_data() accordingly.
tests/unit/easydiffraction/utils/test_utils_coverage.py Updates mocked dataset index records to use path instead of url.
tests/unit/easydiffraction/test___init__.py Updates lazy-function test to assert download_data() calls pooch.retrieve with the constructed URL.

Comment thread src/easydiffraction/utils/utils.py
Comment thread src/easydiffraction/utils/utils.py
Comment thread src/easydiffraction/utils/utils.py Outdated
Copy link
Copy Markdown
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

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@AndrewSazonov AndrewSazonov merged commit aaa9927 into develop Apr 14, 2026
35 checks passed
@AndrewSazonov AndrewSazonov deleted the fix-external-data-accsess branch April 27, 2026 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[scope] bug Bug report or fix (major.minor.PATCH)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants