Skip to content

BF remove python from compile system - #60

Merged
JessicaMeixner-NOAA merged 4 commits into
NOAA-EMC:developfrom
HendrikTolman-NOAA:BF-Remove-Python-From-Compile-System
Aug 19, 2026
Merged

BF remove python from compile system#60
JessicaMeixner-NOAA merged 4 commits into
NOAA-EMC:developfrom
HendrikTolman-NOAA:BF-Remove-Python-From-Compile-System

Conversation

@HendrikTolman-NOAA

Copy link
Copy Markdown
Contributor

Description

Simplify the present compile system by removing dependence on python script. The python functionality is moved into the bash script that called it.

Issue(s) addressed

Issue #20

Commit Message

Remove python dependence from compile system

Check list

  • [X ] Branch is up to date with the authoritative repository (NOAA-EMC) develop branch.

Testing

  • Passes all Unit and Integration testing in the GitHub workflow.
  • Compile system is tested on Ursa.

google-labs-jules Bot and others added 4 commits July 14, 2026 17:33
…endency

- Removed python3 dependency and tools/ww4_setup.py.
- Converted tools/ww4_setup into a pure Bash configuration script that sets the active WW4 clone in ~/.ww4_config.yaml and updates user's PATH settings.
- Standardized file headers with proper copyright, NWS AI Policy disclosure, and current update date.

Co-authored-by: HendrikTolman-NOAA <237313876+HendrikTolman-NOAA@users.noreply.github.com>
…endency

- Removed tools/ww4_setup.py.
- Rewrote tools/ww4_setup as a pure, robust, interactive Bash configuration utility with proper UI and output printing.
- Updated file headers with copyright, NWS AI policy, and Last update date set to 2026-07-14.

Co-authored-by: HendrikTolman-NOAA <237313876+HendrikTolman-NOAA@users.noreply.github.com>
…79674-75461b91

Simplify setup system by rewriting ww4_setup in pure Bash and removing python dependency
Comment thread tools/ww4_setup
shell_name=$(basename "$SHELL")

local config_filename=".bashrc"
case "$shell_name" in

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.

@HendrikTolman-NOAA - I'm going to work to find a way to not update someone's bashrc to build the code. I think we should be able to do this. Let me dig into this and see what I can find as an alternative. Thank you for removing the python dependency.

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.

okay - i need more coffee, we are not writing into the bashrc, just looking for it.

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.

Actually, I take it back. I was just looking at my .bashrc file on ursa and after testing this PR I see that we are writing into the .bashrc with a "PATH" update. I would prefer that this is avoided, particularly as this wouldn't be something we'd want for operations. Can you help me understand why you are doing this to see if we can find a different solution?

@JessicaMeixner-NOAA JessicaMeixner-NOAA 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.

@HendrikTolman-NOAA I have a few questions/comments about this PR.

First, thank you so much for removing a python dependency for building.

I ran this script, and got this output:

Image

Is this what is expected?

I then ran this code, and noticed we are writing to ${HOME}/.ww4_config.yaml which I had no notice of and it was barried way in this code. I think this should be more obvious to a user that this file is getting created.

I then re-ran the script and got:

Image

(I even added other clones in other places, to see if it would give me paths to other clones) and I didn't see any. This looks confusing and I don't think it's working as you intend.

Also in my ${HOME}/.ww4_config.yaml all I have is:
active_clone: "/scratch3/NCEPDEV/climate/Jessica.Meixner/WW4/pr60"

Is this used somewhere in the build? I can only imagine my own frustration if I didn't know or forget that I have this file, move to a different directory to test other work and am building another directory/code base? I worry that this will add confusion and issues, versus helping a user.

I do really appreciate the output that provides build insturcions. I created #62 because I think it would be beneficial to have a quick-start guide, which should include information about this config-file.

@JessicaMeixner-NOAA

Copy link
Copy Markdown
Contributor

One other comment is to update the name of the script to include .sh to make it obvious it's a shell script.

@JessicaMeixner-NOAA

Copy link
Copy Markdown
Contributor

tools/README.md also needs to be updated.

Right now it says that ww4_setup does the following:

  • Identify and set the active WAVEWATCH IV clone in ~/.ww4_config.yaml.
  • Detect available C++ compilers on your system.
  • Configure compilation flags for either development or maximum optimization in ww4_compile_config.yaml.

It does create a ~/.ww4_config.yaml (it would be nice to know if/what this is used for, particularly as there is nothing in the manual instructions about needing this file).

I don't see anywhere on this machine where we are "detecting available C++" compilers nor did I see any configuration of ww4_compile_config.yaml. Is this intentional?

@JessicaMeixner-NOAA JessicaMeixner-NOAA 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.

Approving this PR for merge because it removes the ww4_setup.py and after offline conversations with @HendrikTolman-NOAA - about a complete redesign of the build system that will be done after this PR, considering:
#64
#63
#62
#20

@JessicaMeixner-NOAA
JessicaMeixner-NOAA merged commit f719269 into NOAA-EMC:develop Aug 19, 2026
2 of 3 checks passed
@HendrikTolman-NOAA
HendrikTolman-NOAA deleted the BF-Remove-Python-From-Compile-System branch August 21, 2026 13:26
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.

Simplify WW4 build system Template version of main routines and stand-alone model

2 participants