Skip to content

Commit 1f17cc1

Browse files
chore: switch to SPDX license headers (#4533)
1 parent 05113dc commit 1f17cc1

692 files changed

Lines changed: 1007 additions & 7225 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.git-blame-ignore-revs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Switch to SPDX license headers (#4533)
2+
# TODO: update with the squash-merge commit SHA after merge

.github/workflows/lint.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,3 +1353,22 @@ jobs:
13531353

13541354
- name: Run tests
13551355
run: tox -e lint-opamp-client
1356+
1357+
lint-license-header-check:
1358+
name: license-header-check
1359+
runs-on: ubuntu-latest
1360+
timeout-minutes: 30
1361+
steps:
1362+
- name: Checkout repo @ SHA - ${{ github.sha }}
1363+
uses: actions/checkout@v4
1364+
1365+
- name: Set up Python 3.14
1366+
uses: actions/setup-python@v5
1367+
with:
1368+
python-version: "3.14"
1369+
1370+
- name: Install tox
1371+
run: pip install tox-uv
1372+
1373+
- name: Run tests
1374+
run: tox -e lint-license-header-check

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313

1414
### Added
1515

16+
- Switch to SPDX license headers and add CI enforcement
17+
([#4533](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4533))
1618
- Bump `pylint` to `4.0.5`
1719
([#4244](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4244))
1820
- `opentelemetry-instrumentation-sqlite3`: Add uninstrument, error status, suppress, and no-op tests

CONTRIBUTING.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,16 @@ The continuous integration overrides that environment variable with as per the c
306306

307307
## Style Guide
308308

309+
* All Python files must include the following SPDX license header as the first
310+
two lines (or immediately after a shebang line):
311+
312+
```python
313+
# Copyright The OpenTelemetry Authors
314+
# SPDX-License-Identifier: Apache-2.0
315+
```
316+
317+
This is enforced by CI via `tox -e lint-license-header-check`.
318+
309319
* docstrings should adhere to the [Google Python Style
310320
Guide](http://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings)
311321
as specified with the [napoleon

_template/version.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,4 @@
11
# Copyright The OpenTelemetry Authors
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
2+
# SPDX-License-Identifier: Apache-2.0
143

154
__version__ = "0.63b0.dev"

docs/conf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright The OpenTelemetry Authors
2+
# SPDX-License-Identifier: Apache-2.0
3+
14
# Configuration file for the Sphinx documentation builder.
25
#
36
# This file only contains a selection of the most common options. For a full

exporter/opentelemetry-exporter-credential-provider-gcp/src/opentelemetry/gcp_credential_provider/__init__.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
11
# Copyright 2025 Google LLC
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
2+
# SPDX-License-Identifier: Apache-2.0
143

154
import google.auth
165
import grpc
Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,4 @@
11
# Copyright The OpenTelemetry Authors
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
2+
# SPDX-License-Identifier: Apache-2.0
143

154
__version__ = "0.63b0.dev"

exporter/opentelemetry-exporter-credential-provider-gcp/tests/test_credential_provider.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
11
# Copyright 2023 Google LLC
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# https://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
2+
# SPDX-License-Identifier: Apache-2.0
143
from os import environ
154
from unittest import TestCase
165
from unittest.mock import MagicMock, patch

exporter/opentelemetry-exporter-prometheus-remote-write/example/sampleapp.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
11
# Copyright The OpenTelemetry Authors
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
2+
# SPDX-License-Identifier: Apache-2.0
143

154
import logging
165
import random

0 commit comments

Comments
 (0)