Repository navigation
Add REUSE-compliant copyright and license headers - #57
Merged
Merged
Conversation
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.
The Eclipse IP team asked us to add copyright statements and license information (REUSE, SPDX) to the source files as part of the IP review of this repository (iplab issue 32776). This follows the same scheme as eclipse-aascw/aas-core3.0-python#62.
What changes
LICENSE. Python, TOML, YAML,.gitignoreandpylint.rcuse#,mypy.iniuses;. In Java files the header goes above the existing comment and thepackageline. Indev_scripts/continuous_integration_of_dev_scripts/precommit.pyit goes after the shebang. In bothpom.xmlfiles it is an XML comment after the XML declaration.doc/overview.htmlgets an HTML comment before<body>, so it doesn't show up in the Javadoc overview.REUSE.tomlcovers the files that shouldn't carry an inline header:README.md,CONTRIBUTING.md,AUTHORSanddev_scripts/semantic-patching/README.md.dev_scripts/codegen/snippets/**: aas-core-codegen inserts these verbatim into the generated code, so a header there would end up in the middle ofVerification.javaand the types.test_data/**andsrc/test/java/testgen_rev.txt: JSON can't carry comments, the recorded outputs are compared byte-for-byte, and the update script reads the revision file.LICENSES/MIT.txtadds the license text in the layout REUSE expects. The rootLICENSEis unchanged.dev_scripts/codegen/codegen.pynow prepends the header to every Java file in the output directorysrc/main/java/aas_core/aas3_0. It doesn't rely on theautomatically generated by aas-core-codegenmarker, because the generated builders ingeneration/don't carry it.PatchVerificationre-printsVerification.javawith JavaParser. That keeps the header, but drops the empty line after it.update_to_aas_core_meta_codegen.pynow restores the header after patching, soVerification.javastarts like the other generated files.dev_scripts/codegen/meta_model.pyis a verbatim copy from aas-core-meta. It is attributed to2024 aas-core-meta AUTHORS(as in that repository'sLICENSE), anddownload_aas_core_meta_model.pynow prepends that header on download. It skips the prepend if the downloaded file already containsSPDX-License-Identifier:, so the header isn't duplicated once aas-core-meta carries it upstream..github/workflows/reuse.ymlrunsreuse lint(pinnedreuse==6.3.0) on pushes and pull requests tomain, so CI catches files added without headers. The existing workflows are unchanged apart from the header.Verification
reuse lint: 13115/13115 files have copyright and license information. The repository is compliant with REUSE 3.3.9db4f51, the semantic patching andmvn spotless:apply, before and after this change. The diff against the committed files is identical in both runs, apart from the added headers. That leftover diff is a pre-existing difference, not caused by this PR: the current JavaParser drops the trailingautomatically generatedcomment at the end ofVerification.java. So the headers survive regeneration and change nothing else.download_aas_core_meta_model.pyoffline against the pinned aas-core-meta commit11b116c5. The output equals the committedmeta_model.py. With an upstream file that already has a header, the header is written only once.mvn spotless:check,mvn test-compileandmvn javadoc:javadocpass (JDK 17).check_docs_package_version.py --validatepasses.dev_scripts/.Follow-up
The generated tests (
src/test/java/Test*.java,Common*.java) come from aas-core3.0-testgen and carry inline headers now. When they are regenerated and copied over, the headers need to be kept or re-added. TheREUSEworkflow will flag it if they're missing.