Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yearupdate #1385

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Yearupdate #1385

wants to merge 3 commits into from

Conversation

jubich
Copy link
Member

@jubich jubich commented Feb 3, 2024

  • Discuss new files (utils/srcmanip/change_header_year, utils/srcmanip/set_new_source_headers)
  • Squash into one commit

Copy link

codecov bot commented Feb 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.65%. Comparing base (206db78) to head (2590751).
Report is 16 commits behind head on main.

❗ Current head 2590751 differs from pull request most recent head bd96950. Consider uploading reports for the commit bd96950 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1385      +/-   ##
==========================================
- Coverage   70.86%   70.65%   -0.21%     
==========================================
  Files         231      231              
  Lines       44203    43915     -288     
==========================================
- Hits        31323    31029     -294     
- Misses      12880    12886       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bhourahine
Copy link
Member

@jubich How does the change_header_year interact with set_new_source_headers? It seems like the former deals wit h a wider set of files, but does not process other changes to F90 headers.
The pylint score for the newer file isn't great:
pylint --rcfile=../srccheck/pylint/pylintrc-3.ini ./change_header_year

@jubich
Copy link
Member Author

jubich commented Feb 4, 2024

The idea behind change_header_year is to change the year in any file whose header matches the template, while the second file set_new_source_headers is used to create a header in imported files (.f90, .sh, .py, ...) that do not yet have a header.
I have decoupled the function of the original script (creating AND changing the year) into creating OR changing the year.
This offers the advantage of finer control.

As for the pylint score, I have not checked it. 😅

@jubich
Copy link
Member Author

jubich commented Feb 10, 2024

Both files are now formatted with black. I have also added encoding="utf-8" to with open(). Now change_header_year has a pylint score of 9.52 and set_new_source_headers has a score of 9.30.

@jubich
Copy link
Member Author

jubich commented Apr 11, 2024

Should I squash these commits now or is there any further feedback?

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.

None yet

3 participants