Skip to content

[CI] Add license header check to CI workflows#165

Merged
iansrobinson merged 2 commits intoawslabs:mainfrom
mykola-pereyma:ci/license-header-check
Mar 26, 2026
Merged

[CI] Add license header check to CI workflows#165
iansrobinson merged 2 commits intoawslabs:mainfrom
mykola-pereyma:ci/license-header-check

Conversation

@mykola-pereyma
Copy link
Copy Markdown
Contributor

Issue #, if available: 138

Summary

Add a CI check that verifies all .py files contain the required Apache-2.0 license header, and fix all existing files that were missing it.

Changes

CI workflow updates:

  • Added a license-header-check job to both lexical-graph-tests.yml and byokg-rag-tests.yml
  • The job scans all .py files in the respective package directory and fails if any are missing the header
  • The test job now depends on license-header-check passing first
  • Pure bash implementation — no external tools required

License header fixes:

  • Added the missing header to 56 .py files (46 in byokg-rag/, 10 in lexical-graph/)

Expected header

python

Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0

Closes #138

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Add a license-header-check job to both test workflows that verifies all
.py files contain the required Apache-2.0 license header. The test job
now depends on this check passing first.

Closes awslabs#138
Add the required license header to 56 files:
- 46 files in byokg-rag/
- 10 files in lexical-graph/
@iansrobinson iansrobinson merged commit 8be4423 into awslabs:main Mar 26, 2026
10 checks passed
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.

[CI] Add license header check

3 participants