Restructure and Add --environment CLI Argument#68
Merged
Conversation
…roperty construction
Contributor
Author
|
@ZareanBijan, @cosumi-rtx, this is ready for review. It includes some CLI arg changes and notably changes how the scripts are called (they are called as modules now). Please let me know if any concerns or if I should move / rename things before we merge, but I think these improvements should go into the pending release. |
cosumi-rtx
approved these changes
May 12, 2026
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.
Scripts Moved and Made into Modules
This moves the executable scripts
run_forecast.py,run_calibration.py,run_default.py,run_tests.py, andrun_regionalization.pyby moving them further down into thebin_mounted/dir intobin_mounted/ngen_rte/and turns them into executable modules rather than standalone scripts (affects how to call them and how their imports work).For example:
Call previously:
python "/ngen-app/bin/bin_mounted/run_forecast.py" --helpEquivalent call going forward:
python -um "ngen_rte.run_forecast" --helpCLI Arguments Updated
run_forecast.py➕ Added:
-e / --environment➖ Removed:
-fprov / --forcing_providerrun_default.py➡️ Renamed:
-dur / --historical_sim_duration->-dur / --duration➕ Added:
-e / --environment➖ Removed:
-fprov / --forcing_providerrun_calibration.py➡️ Renamed:
-dur / --calib_sim_duration->-dur / --duration➡️ Renamed:
-fsrc / --forcing_source->-fconfig / --forcing_configuration➕ Added:
-e / --environment➖ Removed:
-fprovider / --forcing_providerrun_regionalization.pyNo changes
run_tests.py➡️ Renamed:
-fregion / --global_domain->-gdomain / --global_domain➡️ Renamed:
-fcname / --fcst_run_name->-rname / --fcst_run_name➕ Added:
-e / --environment➖ Removed:
-fprovider / --forcing_providerCode Simplified
This simplifies the codebase by:
RealizationBuilderkwargs construction much easier to read and understand.python -m ngen_rte.run_forecastinstead ofpython bin_mounted/run_forecast.py.run_calibration.pyon a constructor that had been withinexecution_tests.py.This also adds the
-eaka--environmentCLI arg for choosing 'test' or 'oe' which affects the MSWMGeneralConfigoption by the same name, affecting the server URL used to fetch input data.