lcpp-org / crane

A MOOSE application dedicated to general Chemical ReAction NEtworks for plasma chemistry and thermochemistry problems.
https://crane-plasma-chemistry.readthedocs.io/
GNU Lesser General Public License v2.1
21 stars 20 forks source link

Standardize Headers #25

Closed keniley1 closed 1 year ago

keniley1 commented 5 years ago

Any MOOSE headers that have been unintentionally left in the source code over the past year should be replaced with CRANE-specific headers.

smpeyres commented 1 year ago

@cticenhour Do you think my recent copyright notice fix #85 addresses this issue, at least partially?

cticenhour commented 1 year ago

A partial fix I think. To close, you need to create your own header to mark your source files. Feel free to modify this script in Zapdos in order to get something in place for CRANE. Let me know if you have questions!

smpeyres commented 1 year ago

I modified the script so that it references crane instead, but executing "python3 fixup_headers.py" in crane/scripts doesn't do anything. Am I missing something?

cticenhour commented 1 year ago

The comment at the top of the file tells you that running it without a flag is a "dry run" to let you see what might be changed without actually performing anything. You might need to use the -v flag to see more output (see the bottom of the file for available options). To run the script and allow it to make changes you should use:

python3 fixup_headers.py -u
smpeyres commented 1 year ago

I am not seeing any changes when I run "python3 fixup_headers.py -u"...

This is what my bash terminal reads: (moose) smpeyres_linux@DESKTOP-FG2P909:~/projects/crane/scripts$ python3 fixup_headers.py -u

Any suggestions?

cticenhour commented 1 year ago

Just got out of a meeting - will take a look at this shortly.

cticenhour commented 1 year ago

Ah.....you need to run this from the top-level CRANE directory. See line 41:

 for dirpath, dirnames, filenames in os.walk(os.getcwd() + ""):

os.getcwd() is going to get the location of your Current Working Directory (the location where you are running the script) and then do a "walk" (or, catalog of what files exist below that directory) to obtain a list of the rest of the files. Then, the script will iterate through that list, looking for .C, .h, and .py files it needs to check.

TL;DR: Run:

cd ~/projects/crane
python3 ./scripts/fixup_headers.py -u
smpeyres commented 1 year ago

Awesome, thank you!