CI: check OSMC-PL 1.8 license header in Julia src files#76
Open
SVAGEN26 wants to merge 1 commit into
Open
Conversation
Add a CI check that every `.jl` file under `src/` carries the OSMC-PL 1.8 license header with an up-to-date copyright year, mirroring OpenModelica's `check_runtime_license.py` (adapted for Julia `#= ... =#` block comments). - `.CI/scripts/check_julia_license.py`: the checker (supports --fix-license, --update-year, --summary and a `.CI/scripts/julia-license-exceptions.txt` exclusion list with .gitignore-style semantics). - `.CI/scripts/julia-license-exceptions.txt`: excludes src/CodeGeneration/mtkExternals.jl, which is vendored ModelingToolkit code under the MIT "Expat" License — NOT OSMC-PL. - `.github/workflows/check-license.yml`: runs it on `src` for pull requests. - Upgraded the existing OSMC-PL 1.2 headers (and added missing ones) to the OSMC-PL 1.8 header so the check passes. mtkExternals.jl is left untouched. Co-Authored-By: JKRT <jtinnerholm@gmail.com> Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #76 +/- ##
==========================================
- Coverage 24.78% 21.67% -3.11%
==========================================
Files 28 43 +15
Lines 3430 20615 +17185
==========================================
+ Hits 850 4468 +3618
- Misses 2580 16147 +13567 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Member
|
@SVAGEN26 I think you missed committing one file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a CI check that every
.jlfile undersrc/carries the OSMC-PL 1.8 license header with an up-to-date copyright year. This mirrors OpenModelica'scheck_runtime_license.py, adapted for Julia#= ... =#block comments.What's included
.CI/scripts/check_julia_license.py— the checker. Supports--fix-license,--update-year,--summary, and a.CI/scripts/julia-license-exceptions.txtexclusion list with.gitignore-style (last-match-wins) semantics..github/workflows/check-license.yml— runspython3 .CI/scripts/check_julia_license.py --summary srcon every pull request.src/files up to the OSMC-PL 1.8 header so the check passes on this PR. The existing OSMC-PL 1.2 headers were upgraded to 1.8, andsrc/CodeGeneration/mtkExternals.jlis excluded (vendored ModelingToolkit code under the MIT "Expat" License — not OSMC-PL), via the exceptions list.Notes
The check only looks at
src/(not examples/tests). Headers are verified for presence of the OSMC-PL 1.8 text, the "This file is part of OpenModelica." mark, and a current copyright year.🤖 Generated with Claude Code