Skip to content

delete old replace with new script - #163

Merged
nhsavage merged 3 commits into
mainfrom
single_main2
Jul 10, 2026
Merged

delete old replace with new script#163
nhsavage merged 3 commits into
mainfrom
single_main2

Conversation

@nhsavage

@nhsavage nhsavage commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

replace the two old scripts

also move all user configurable options to top of script

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

Coverage

Coverage Report
FileStmtsMissCoverMissing
lib/osop
   compare_terciles.py77770%9–331
   compute_products_func.py1351350%8–449
   compute_scores_func.py1551550%17–415
   ens_plotting.py1173868%106–111, 197, 270–289, 309–356
   plot_verify.py15813117%88–110, 142–228, 255–288, 318–410, 434–511
   pycpt_convert.py39428727%76–99, 116–122, 140, 163–169, 189–205, 219–225, 242–270, 290, 311–313, 340–531, 554, 569–571, 663, 736–744, 759–765, 776–791, 796–799, 804–808, 816–827, 843–897, 917–971, 1009–1044
   run_pycpt.py1261260%11–362
   util.py591280%89, 103, 131, 159–172, 179–184
TOTAL153796137% 

Tests Skipped Failures Errors Time
31 0 💤 0 ❌ 0 🔥 12.950s ⏱️

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR consolidates workflow execution by replacing the standalone forecast script with an updated run_all.sh, and moves user-configurable options to the top of the script for easier customization.

Changes:

  • Adds a user-configuration block at the top of run_all.sh, including toggles to run hindcast and/or forecast.
  • Extends run_all.sh to create forecast directory structure and execute forecast download/products/plot steps.
  • Deletes scripts/master.forecast.sh as part of replacing old scripts.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
scripts/run_all.sh Centralizes configuration, adds do_hc/do_fc flow control, and integrates forecast execution into the main run script.
scripts/master.forecast.sh Removed in favor of the consolidated run_all.sh workflow.
Comments suppressed due to low confidence (3)

scripts/run_all.sh:31

  • base_path is computed from $SCRATCH before any validation, and set -u is enabled later. If SCRATCH is unset/empty, this silently writes into /osop/... (or another unintended location), which is risky on shared systems. Consider asserting SCRATCH is set and quoting path construction.
    scripts/run_all.sh:72
  • Unquoted path variables in mkdir -p can word-split or glob if any directory component contains spaces or wildcard characters, and can also mis-handle paths beginning with -. Quoting and using -- makes these directory creations more robust.
    scripts/run_all.sh:125
  • cp should quote paths (and ideally use an explicit destination filename) to avoid word-splitting/globbing issues and to make it clear the intent is to copy the file into the forecast downloads directory.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nhsavage
nhsavage requested a review from Eleanor-Dean July 8, 2026 10:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (3)

scripts/run_all.sh:86

  • PYTHONPATH export will prepend a leading ":" when PYTHONPATH is unset/empty, which implicitly adds the current working directory to sys.path. That’s a security footgun and also regresses the safer pattern previously used in this script.
    scripts/run_all.sh:261
  • In the forecast path, the script continues into forecast_products/forecast_plots even when the per-centre download fails. This will typically cascade into avoidable failures/noisy logs; the hindcast path already continues on download failure, so forecast should mirror that behavior.
    scripts/run_all.sh:126
  • With do_hc=0, the script still rewrites $downloaddir/parseyml.yml and then copies it into the forecast downloads. That can break “forecast-only” runs that rely on previously-downloaded hindcast data, because get_any_hindcast.py / forecast_products.py use parseyml.yml to determine system IDs and will now see the new mapping rather than the one that matches existing hindcast files.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (3)

scripts/run_all.sh:262

  • In the forecast branch, a failed download currently falls through to forecast_products.py / forecast_plots.py. That can waste runtime and can produce misleading downstream errors when inputs are missing. Consider skipping the remainder of the loop for this centre when the download step fails (mirrors the hindcast path above).
    scripts/run_all.sh:287
  • This error message still references running master.sh, but this script now combines hindcast+forecast and is intended to replace the older scripts. Updating the message to describe the actual prerequisite (hindcast products/terciles exist for the same settings) will make failures easier to diagnose.
    scripts/run_all.sh:16
  • This PR deletes scripts/master.forecast.sh, but there are still user-facing references to that script elsewhere (e.g. docs and error messages). This will mislead users and can complicate troubleshooting. Please update those references to point to the new workflow/script name.

@nhsavage nhsavage self-assigned this Jul 9, 2026
@nhsavage nhsavage linked an issue Jul 10, 2026 that may be closed by this pull request
@nhsavage

Copy link
Copy Markdown
Contributor Author

also makes the default no borders

@nhsavage
nhsavage merged commit f4f09cc into main Jul 10, 2026
3 checks passed
@nhsavage
nhsavage deleted the single_main2 branch July 10, 2026 14:42
@nhsavage

Copy link
Copy Markdown
Contributor Author

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (3)
scripts/run_all.sh:262

  • In the forecast branch, a failed download currently falls through to forecast_products.py / forecast_plots.py. That can waste runtime and can produce misleading downstream errors when inputs are missing. Consider skipping the remainder of the loop for this centre when the download step fails (mirrors the hindcast path above).
    scripts/run_all.sh:287
  • This error message still references running master.sh, but this script now combines hindcast+forecast and is intended to replace the older scripts. Updating the message to describe the actual prerequisite (hindcast products/terciles exist for the same settings) will make failures easier to diagnose.
    scripts/run_all.sh:16
  • This PR deletes scripts/master.forecast.sh, but there are still user-facing references to that script elsewhere (e.g. docs and error messages). This will mislead users and can complicate troubleshooting. Please update those references to point to the new workflow/script name.

opened #165 to check these

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.

Make default borders none

3 participants