Addressing several issues: bug fixes and improvements - #25
Conversation
- Replace call to load_modules_wflow.sh with call to setup_conda.sh - Since we no longer have module loads, ROCOTO_PATH is provided as a variable in the machine file for each platform
… does this automatically
Read ROCOTO_PATH from the machine config file and prefix all calls to rocotorun and rocotostat with it, consistent with launch_vx_wflow.sh. Machines without ROCOTO_PATH (jet, noaacloud, linux, macos) fall back to bare binary names. rocoto_path is stored in the WE2E monitor YAML and propagated through update_expt_status/compare_rocotostat; added to all non-task entry skip lists to avoid being treated as a task. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The statuses loop in update_expt_status had 8-space indentation while the other two skip lists had 12-space indentation, so the replace_all edit missed it. This caused a TypeError when iterating over the expt dict since rocoto_path (a string) was not excluded from the task loop. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Resolve SCRIPT_DIR from ${BASH_SOURCE[0]} at the top and anchor all
relative file/directory references (conda_loc, conda/, environment.yml)
to it. Also replaces readlink -f with cd && pwd for macOS compatibility
without requiring GNU coreutils.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
A user-defined cd function in .bashrc that prints to stdout would corrupt any variable set via $(cd ... && pwd) command substitution. Using builtin cd bypasses shell functions and calls the built-in directly, preventing spurious output from being captured. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…! Also, make HAFS-A WE2E test case work on all platforms
…observations rather than model data
…ent <native> tag for rocoto when submitting to the HPSS queue (just like how get_obs tasks already do)
|
@mkavulich FYI I'm just starting my review. |
|
|
||
| ## TESTS CONDUCTED: | ||
| <!-- Explicitly state what tests were run on these changes, or if any are still pending (for README or other text-only changes, just put "None required"). Make note of the compilers used, the platform/machine, and other relevant details as necessary. For more complicated changes, or those resulting in scientific changes, please be explicit! --> | ||
| <!-- Explicitly state what tests were run on these changes, or if any are still pending (for README or other text-only changes, just put "None required"). Make note of the platform/machine, and other relevant details as necessary. For more complicated changes, or those resulting in scientific changes, please be explicit! --> |
There was a problem hiding this comment.
Remove comma after "platform/machine" (according to my middle school grammar lessons).
| # (conda_loc, conda/, environment.yml) work regardless of the caller's CWD. | ||
| SCRIPT_DIR=$(builtin cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) | ||
|
|
||
| # Check for existing conda/ subdirectory from previous installations |
There was a problem hiding this comment.
This comment would be clearer if changed to something like this:
# If the conda location file is not specified but a conda installation exists under dtc-vx-workflow from a previous installation...
There was a problem hiding this comment.
Updated the comment with more detail
| if ! conda env list | grep -q "^vx_workflow\s" ; then | ||
| mamba env create -n vx_workflow --file "${VX_WFLOW_DIR}/environment.yml" -y | ||
|
|
||
| # Check if conda location file exists |
There was a problem hiding this comment.
This comment would be clearer if changed to something like this:
# If the conda location file is not specified but a (system) conda installation is still available...
There was a problem hiding this comment.
Updated for a more clear and accurate comment
mkavulich
left a comment
There was a problem hiding this comment.
@gsketefian Thanks for your review, I believe I've addressed all your comments
|
|
||
| ## TESTS CONDUCTED: | ||
| <!-- Explicitly state what tests were run on these changes, or if any are still pending (for README or other text-only changes, just put "None required"). Make note of the compilers used, the platform/machine, and other relevant details as necessary. For more complicated changes, or those resulting in scientific changes, please be explicit! --> | ||
| <!-- Explicitly state what tests were run on these changes, or if any are still pending (for README or other text-only changes, just put "None required"). Make note of the platform/machine, and other relevant details as necessary. For more complicated changes, or those resulting in scientific changes, please be explicit! --> |
| # (conda_loc, conda/, environment.yml) work regardless of the caller's CWD. | ||
| SCRIPT_DIR=$(builtin cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) | ||
|
|
||
| # Check for existing conda/ subdirectory from previous installations |
There was a problem hiding this comment.
Updated the comment with more detail
| if ! conda env list | grep -q "^vx_workflow\s" ; then | ||
| mamba env create -n vx_workflow --file "${VX_WFLOW_DIR}/environment.yml" -y | ||
|
|
||
| # Check if conda location file exists |
There was a problem hiding this comment.
Updated for a more clear and accurate comment
|
@mkavulich Left a couple of replies and approved. |
DESCRIPTION OF CHANGES:
This PR resolves a number of open issues in the repository:
Resolved issues:
--launch cronoption for./run_we2e_tests.pyis broken #18 The capability of submitting rocoto tasks from cron was broken at some point in the early stages of this repository. The fix involves a few improvements/fixes:get_crontab_contents()andadd_crontab_line()functions were not updated properly when debug flags were re-configured in b92b0e2setup_conda.shto set up the python environment for cron submissionROCOTO_PATHis provided as a variable in the machine file for each platform in the cron submission scriptsLD_LIBRARY_PATHis unset is now handled correctlyOBS_DIRfor PCP combine Forecast tasksget_obs.pyfor NOHRSC observations.Other changes:
Type of change
BEST_TRACKvariable is renamed toBEST_TRACK_DIRandBEST_TRACK_FILEis now an option to specify the best track filename rather than having it hard-coded in conf files. There is now a check in setup.py to ensure that old user config files will fail with a descriptive error message.TESTS CONDUCTED:
Ran all WE2E tests on Ursa. All pass now!
DEPENDENCIES:
None
DOCUMENTATION:
None needed
ISSUE:
Fixes:
--launch cronoption for./run_we2e_tests.pyis broken #18CONTRIBUTORS (optional):
A few commits in this PR were authored, partially or in full, by Claude CLI. These commits include the specific model used as a co-author. All of these changes were manually reviewed by me and checked for correctness.