Skip to content

CI: check OSMC-PL 1.8 license header in Julia src files#76

Open
SVAGEN26 wants to merge 2 commits into
OpenModelica:masterfrom
SVAGEN26:add-julia-license-check
Open

CI: check OSMC-PL 1.8 license header in Julia src files#76
SVAGEN26 wants to merge 2 commits into
OpenModelica:masterfrom
SVAGEN26:add-julia-license-check

Conversation

@SVAGEN26

Copy link
Copy Markdown
Contributor

Summary

Adds a CI check that every .jl file under src/ carries the OSMC-PL 1.8 license header with an up-to-date copyright year. This mirrors OpenModelica's check_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.txt exclusion list with .gitignore-style (last-match-wins) semantics.
  • .github/workflows/check-license.yml — runs python3 .CI/scripts/check_julia_license.py --summary src on every pull request.
  • Header normalization — brought the 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, and src/CodeGeneration/mtkExternals.jl is 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

@codecov

codecov Bot commented Jun 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 21.40%. Comparing base (48757b0) to head (068043d).
⚠️ Report is 42 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #76      +/-   ##
==========================================
- Coverage   24.78%   21.40%   -3.39%     
==========================================
  Files          28       44      +16     
  Lines        3430    21219   +17789     
==========================================
+ Hits          850     4541    +3691     
- Misses       2580    16678   +14098     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JKRT

JKRT commented Jun 24, 2026

Copy link
Copy Markdown
Member

@SVAGEN26 I think you missed committing one file

Rebuilt on current master (the previous branch was based on a pre-dev-fix
OMBackend, so master's src — including the new src/precompile.jl from OpenModelica#77 — was
never brought to standard, and the license check failed on the merge).

- .github/workflows/check-license.yml: runs check_julia_license.py on src per PR.
- .CI/scripts/check_julia_license.py: the checker (Julia #= =# headers, OSMC-PL 1.8
  + current year), plus julia-license-exceptions.txt.
- .gitignore: negate /.CI/ (the `/.*` rule was silently excluding it).
- Bring all 51 src/*.jl to the OSMC-PL 1.8 header (was a mix of missing and 1.2).
  src/CodeGeneration/mtkExternals.jl is excluded — vendored MIT ModelingToolkit
  code — and left untouched.

Verified: check_julia_license.py --summary src -> PASSED (51 checked, 1 skipped).
All modified .jl files still parse under Julia 1.12.

Co-authored-by: JKRT <jtinnerholm@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
@SVAGEN26 SVAGEN26 force-pushed the add-julia-license-check branch from 363c093 to 3f456ec Compare July 2, 2026 18:35
Co-authored-by: JKRT <jtinnerholm@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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.

2 participants