Skip to content

refactor: Version sourcing, license headers, and legacy cleanup - #127

Open
JoshCederstrom wants to merge 4 commits into
devfrom
refactor/update-headers
Open

refactor: Version sourcing, license headers, and legacy cleanup#127
JoshCederstrom wants to merge 4 commits into
devfrom
refactor/update-headers

Conversation

@JoshCederstrom

Copy link
Copy Markdown
Collaborator

This pull request merges housekeeping changes into the dev branch, targeting the upcoming v6.0.0 release. There are no changes to model physics, inputs, or outputs.

Three related cleanups: the copyright notices are made maintenance-free, four legacy utility programs are removed, and the version number is consolidated into a single source of truth that the C++ code reads rather than duplicates.

Copyright Notices

The license year in the source headers had been bumped with each release, which is not necessary and creates extra maintenance. License year is now only in LICENSE.txt.

Removed Legacy Utilities

Deleted InitialGW.cpp, RainInputCheck.cpp, RunsTracker.cpp, and mergeOutput.pl from src/utilities. None were part of the build, legacy code that is no longer applicable.

Version Handling

The version number was previously written in three places: both project() calls in CMakeLists.txt, and a hardcoded string in tControl.cpp.

The version is now declared once in CMakeLists.txt and consumed everywhere else. A small template is configured into the build tree as a generated header, which tControl.cpp includes. The generated header lives in the build directory only and is never checked in.

The startup banner also reports the git commit the binary was built from, with a -dirty marker when the working tree has uncommitted changes:

tRIBS Version 6.0.0, Summer 2026  [build 2b36b1f]

This is intended to make model runs traceable to an exact commit. The stamp is refreshed on every build rather than at configure time. Users building from a downloaded source archive see the banner without the build field.

@JoshCederstrom JoshCederstrom self-assigned this Jul 29, 2026
@JoshCederstrom
JoshCederstrom requested a review from a team as a code owner July 29, 2026 23:17
@JoshCederstrom JoshCederstrom added documentation Improvements or additions to documentation enhancement New feature or request labels Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant