-
Notifications
You must be signed in to change notification settings - Fork 176
Use a short SPDX license header for LLM-centered files #1489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| # Files below use a short SPDX license identifier instead of the full | ||
| # Apache 2.0 header because they are NOT included in official releases | ||
| # (sdist / wheel). The `export-ignore` attribute ensures `git archive` | ||
| # (and tools that rely on it) will exclude them automatically. | ||
|
|
||
| .github export-ignore |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| <!-- SPDX-License-Identifier: Apache-2.0 --> | ||
|
|
||
| [Summary of contribution] | ||
|
|
||
| ## For new dataflows: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,9 +23,6 @@ jobs: | |
| working-directory: dev_tools/language_server | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - name: Check for missing Apache 2 license headers | ||
| run: python3 scripts/check_license_headers.py | ||
| working-directory: ${{ github.workspace }} | ||
|
Comment on lines
-26
to
-28
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why remove?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This answers all similar comments: After the proposed change, license headers are being enforced by pre-commit hooks. This approach has several benefits:
Whereas the main downside is it's somewhat harder to customize if a specific file requires special treatment.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. issue is people submit without running pre-commit hooks :(
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The assumption was that the hooks run on CI too. It's just that instead of a custom script we use a hook - which is more standard.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add that to CI then?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It already runs as part of the "Unit Tests" job's "check linting with prek" stage. I'll move this to a separate "Static checks" job for better visibility.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
|
|
||

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@potiuk I configured the hooks to accept the license being below the frontmatter using:
In case this comes in handy in Airflow too...