Closed keniley1 closed 1 year ago
@cticenhour Do you think my recent copyright notice fix #85 addresses this issue, at least partially?
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!
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?
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
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?
Just got out of a meeting - will take a look at this shortly.
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
Awesome, thank you!
Any MOOSE headers that have been unintentionally left in the source code over the past year should be replaced with CRANE-specific headers.