BF remove python from compile system - #60
Conversation
…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
| shell_name=$(basename "$SHELL") | ||
|
|
||
| local config_filename=".bashrc" | ||
| case "$shell_name" in |
There was a problem hiding this comment.
@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.
There was a problem hiding this comment.
okay - i need more coffee, we are not writing into the bashrc, just looking for it.
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
@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:
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:
(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.
|
One other comment is to update the name of the script to include .sh to make it obvious it's a shell script. |
|
tools/README.md also needs to be updated. Right now it says that ww4_setup does the following:
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
left a comment
There was a problem hiding this comment.
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
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
Testing