-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change upload_forcing
worker to persist previous day for missing runoff files via symlinks instead of failing
#233
Conversation
This commit reinstates the required 201702 runoff files in the nowcast configuration YAML file. Those files, previously marked for removal in the 202111 version, are required for nowcast-agrif operation. It also replaces the associated TODO comments with explanations that reflect this requirement.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #233 +/- ##
==========================================
+ Coverage 77.61% 77.65% +0.04%
==========================================
Files 133 133
Lines 18678 18705 +27
Branches 1899 1900 +1
==========================================
+ Hits 14496 14526 +30
+ Misses 4116 4113 -3
Partials 66 66
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Add assertion that the 202108 runoff file template exists in the config and has the expected format. This ensures this test case would catch any change in the file template format.
Reformatted the test case for upload_live_ocean_files function in upload_forcing module. A mock implementation of symlink_to function has been added and used instead of patching it inline. This change provides a clearer, simplified method to test the functionality.
The code now handles FileNotFoundError exceptions when trying to upload a river runoff forcing file by creating a symbolic link to the previous day's file. Relevant tests have also been updated and expanded to ensure that these new changes work as expected and do not introduce any new issues.
upload_forcing
worker to persist missing runoff files via symlinks instead of failingupload_forcing
worker to persist previous day for missing runoff files via symlinks instead of failing
The update modifies the handling of missing river runoff files in the upload_forcing worker. Instead of linking to the file from one day prior, the system now refers to the file from two days before. Accompanying tests are adjusted accordingly to ensure proper operation. Also correct the indentation of the symlink code path. re: bugs in ba31610
Finally tested successfully in production on 2-Feb-2024. |
re: issue #232