Python Script to upload operational files#65
Open
RohanSunkarapalli wants to merge 21 commits intoAlabamaWaterInstitute:mainfrom
Open
Python Script to upload operational files#65RohanSunkarapalli wants to merge 21 commits intoAlabamaWaterInstitute:mainfrom
RohanSunkarapalli wants to merge 21 commits intoAlabamaWaterInstitute:mainfrom
Conversation
…kes the output to display much faster
…s and url's with respective to the files needed
sepehrkrz
previously approved these changes
Oct 12, 2023
Contributor
Author
|
I've added the test-cases for the listofnwmfilenames.py. I've almost covered all the inputs, functions what are used in the script. Tried to add every possible test case. |
Contributor
Author
|
@jameshalgren |
61 tasks
jameshalgren
requested changes
Oct 16, 2023
Contributor
There was a problem hiding this comment.
This is definitely moving the right direction. Thanks!
Please:
- Correct the bug in the url test so that it properly either registers the fault when requesting an invalid urlbase dict entry or use keyword arguments to make the function return the default url.
- Re-create this PR with ONLY the test script and attach it to CIROH-UA/nwmurl#6
- Make sure not to check in the .pyc files
- Add specific tests for the individual folders in the issue list -- combinations are generally: CONUS, alaska, puertorico, hawaii; short_range, medium_range, long_range, analysis (with ensemble members for some of those); and forcing vs. model output (model output is anything not specifically labeled as forcing).
|
|
||
| def test_selecturlbase(): | ||
| assert selecturlbase({1: "https://example.com/"}, 1) == "https://example.com/" | ||
| assert selecturlbase({1: "https://example.com/"}, 2, "default") == "default" |
Contributor
There was a problem hiding this comment.
Fails. Needs to select a valid dict key, spit out the default, or some useful warning.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There are two sub-folders in listofnwmfilenames folder where one is reglar approach which follows validation of URL'S and then starts uploading the valid url's which are generated. Another approach is directly acquiring gcloud api's and uploading the files based on the url's which is comparatively much faster as it skips validation.