Skip to content

Fix (#167) romania deviating files once in a while#168

Merged
bart1 merged 2 commits intomainfrom
167-romania-has-once-in-a-while-a-strange-file-uri
Mar 5, 2026
Merged

Fix (#167) romania deviating files once in a while#168
bart1 merged 2 commits intomainfrom
167-romania-has-once-in-a-while-a-strange-file-uri

Conversation

@bart1
Copy link
Collaborator

@bart1 bart1 commented Jan 20, 2026

For the rare cases the urls is 0300 we use the alternative format

@bart1 bart1 linked an issue Jan 20, 2026 that may be closed by this pull request
@bart1 bart1 marked this pull request as ready for review January 20, 2026 13:25
@bart1 bart1 requested review from PietrH and peterdesmet January 20, 2026 13:25
@codecov
Copy link

codecov bot commented Jan 20, 2026

Codecov Report

❌ Patch coverage is 60.00000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.66%. Comparing base (4b6a386) to head (cdf1c95).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
R/get_pvol_ro.R 60.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #168      +/-   ##
==========================================
- Coverage   93.16%   91.66%   -1.50%     
==========================================
  Files          24       25       +1     
  Lines        1814     1896      +82     
==========================================
+ Hits         1690     1738      +48     
- Misses        124      158      +34     

☔ 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.

@bart1
Copy link
Collaborator Author

bart1 commented Jan 20, 2026

Codecov Report

❌ Patch coverage is 60.00000% with 6 lines in your changes missing coverage. Please review. ✅ Project coverage is 92.88%. Comparing base (4b6a386) to head (0530338).
Files with missing lines Patch % Lines
R/get_pvol_ro.R 60.00% 6 Missing ⚠️
Additional details and impacted files

☔ View full report in Codecov by Sentry. 📢 Have feedback on the report? Share it here.
🚀 New features to boost your workflow:

As far as i know it is not predictable when files with these names are produced therefore there is no test

Copy link
Contributor

@PietrH PietrH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you could test this via mocking: https://testthat.r-lib.org/reference/local_mocked_bindings.html

You'd then locally redefine read_pvol_from_url_per_param to return a httr2_http_404 condition on your test query default url, but a value you can test for (TRUE or a string, or whatever) on the modified, expected new url.

I'm not sure you should. But you could.

Otherwise, looks good. I'd maybe rename the second urls object to a different symbol so I could compare the two more easily when debugging. But that's only a very minor nitpick.

Nice fix! Shame there isn't a more descriptive server response other than the 404! What would happen if the second url also returns a 404?

Copy link
Collaborator Author

@bart1 bart1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update urls

@bart1
Copy link
Collaborator Author

bart1 commented Mar 5, 2026

I think you could test this via mocking: https://testthat.r-lib.org/reference/local_mocked_bindings.html

You'd then locally redefine read_pvol_from_url_per_param to return a httr2_http_404 condition on your test query default url, but a value you can test for (TRUE or a string, or whatever) on the modified, expected new url.

Might be nice in the future

Nice fix! Shame there isn't a more descriptive server response other than the 404! What would happen if the second url also returns a 404?

It will just return a 404. which most likely means the server is down

@bart1
Copy link
Collaborator Author

bart1 commented Mar 5, 2026

@PietrH if you approve I can merge ;)

@bart1 bart1 merged commit f4bc216 into main Mar 5, 2026
9 of 11 checks passed
@bart1 bart1 deleted the 167-romania-has-once-in-a-while-a-strange-file-uri branch March 5, 2026 10:57
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.

Romania has once in a while a strange file uri

2 participants