-
Notifications
You must be signed in to change notification settings - Fork 609
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
266 additions
and
58 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[codespell] | ||
# skipping auto generated folders | ||
skip = ./.tox,./.mypy_cache,./docs/_build,./target,*/LICENSE,./venv | ||
skip = ./.tox,./.mypy_cache,./docs/_build,./target,*/LICENSE,./venv,*-requirements*.txt | ||
ignore-words-list = ot |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: lint 1 | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- 'release/*' | ||
pull_request: | ||
env: | ||
CORE_REPO_SHA: 955c92e91b5cd4bcfb43c39efcef086b040471d2 | ||
|
||
jobs: | ||
test-1: | ||
env: | ||
RUN_MATRIX_COMBINATION: ${{ matrix.python-version }}-${{ matrix.package }}-${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails | ||
matrix: | ||
package: | ||
- "resource/opentelemetry-resource-detector-container" | ||
- "sdk-extension/opentelemetry-sdk-extension-aws" | ||
os: [ubuntu-20.04] | ||
steps: | ||
- name: Checkout Contrib Repo @ SHA - ${{ github.sha }} | ||
uses: actions/checkout@v4 | ||
- name: Set up Python ${{ env[matrix.python-version] }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
- name: Install tox | ||
run: pip install tox | ||
- name: Cache tox environment | ||
# Preserves .tox directory between runs for faster installs | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
.tox | ||
~/.cache/pip | ||
key: v7-build-tox-cache-${{ env.RUN_MATRIX_COMBINATION }}-${{ hashFiles('tox.ini', 'gen-requirements.txt', 'dev-requirements.txt') }} | ||
- name: run tox | ||
run: tox -c ${{ matrix.package }}/tox.ini -e lint |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: spellcheck 1 | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- 'release/*' | ||
pull_request: | ||
env: | ||
CORE_REPO_SHA: 955c92e91b5cd4bcfb43c39efcef086b040471d2 | ||
|
||
jobs: | ||
test-1: | ||
env: | ||
RUN_MATRIX_COMBINATION: ${{ matrix.python-version }}-${{ matrix.package }}-${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails | ||
matrix: | ||
package: | ||
- "resource/opentelemetry-resource-detector-container" | ||
- "sdk-extension/opentelemetry-sdk-extension-aws" | ||
os: [ubuntu-20.04] | ||
steps: | ||
- name: Checkout Contrib Repo @ SHA - ${{ github.sha }} | ||
uses: actions/checkout@v4 | ||
- name: Set up Python ${{ env[matrix.python-version] }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
- name: Install tox | ||
run: pip install tox | ||
- name: Cache tox environment | ||
# Preserves .tox directory between runs for faster installs | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
.tox | ||
~/.cache/pip | ||
key: v7-build-tox-cache-${{ env.RUN_MATRIX_COMBINATION }}-${{ hashFiles('tox.ini', 'gen-requirements.txt', 'dev-requirements.txt') }} | ||
- name: run tox | ||
run: tox -c ${{ matrix.package }}/tox.ini -e spellcheck |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: test 1 | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- 'release/*' | ||
pull_request: | ||
env: | ||
CORE_REPO_SHA: 955c92e91b5cd4bcfb43c39efcef086b040471d2 | ||
|
||
jobs: | ||
test-1: | ||
env: | ||
py38: 3.8 | ||
py39: 3.9 | ||
py310: "3.10" | ||
py311: "3.11" | ||
pypy3: pypy-3.8 | ||
RUN_MATRIX_COMBINATION: ${{ matrix.python-version }}-${{ matrix.package }}-${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails | ||
matrix: | ||
python-version: [py38, py39, py310, py311, pypy3] | ||
package: | ||
- "resource/opentelemetry-resource-detector-container" | ||
- "sdk-extension/opentelemetry-sdk-extension-aws" | ||
os: [ubuntu-20.04] | ||
exclude: | ||
- python-version: py311 | ||
package: "prometheus-remote-write" | ||
- python-version: pypy3 | ||
package: "prometheus-remote-write" | ||
steps: | ||
- name: Checkout Contrib Repo @ SHA - ${{ github.sha }} | ||
uses: actions/checkout@v4 | ||
- name: Set up Python ${{ env[matrix.python-version] }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ env[matrix.python-version] }} | ||
- name: Install tox | ||
run: pip install tox | ||
- name: Cache tox environment | ||
# Preserves .tox directory between runs for faster installs | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
.tox | ||
~/.cache/pip | ||
key: v7-build-tox-cache-${{ env.RUN_MATRIX_COMBINATION }}-${{ hashFiles('tox.ini', 'gen-requirements.txt', 'dev-requirements.txt') }} | ||
- name: run tox | ||
run: tox -c ${{ matrix.package }}/tox.ini -e test-${{ matrix.python-version }} -- -ra |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
coverage==7.5.1 | ||
pytest-cov==5.0.0 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
astroid==3.1.0 | ||
black==24.4.2 | ||
click==8.1.7 | ||
Deprecated==1.2.14 | ||
dill==0.3.8 | ||
flake8==7.0.0 | ||
importlib-metadata==7.0.0 | ||
isort==5.13.2 | ||
mccabe==0.7.0 | ||
mypy-extensions==1.0.0 | ||
packaging==24.0 | ||
pathspec==0.12.1 | ||
platformdirs==4.2.1 | ||
pycodestyle==2.11.1 | ||
pyflakes==3.2.0 | ||
pylint==3.1.0 | ||
tomlkit==0.12.4 | ||
typing_extensions==4.11.0 | ||
wrapt==1.16.0 | ||
zipp==3.18.1 |
This file contains 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
48 changes: 48 additions & 0 deletions
48
resource/opentelemetry-resource-detector-container/tox.ini
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
[tox] | ||
isolated_build = True | ||
skipsdist = True | ||
skip_missing_interpreters = True | ||
envlist = | ||
test-py3{8,9,10,11} | ||
test-pypy3 | ||
lint | ||
coverage | ||
spellcheck | ||
|
||
[testenv] | ||
setenv = | ||
; override CORE_REPO_SHA via env variable when testing other branches/commits than main | ||
; i.e: CORE_REPO_SHA=dde62cebffe519c35875af6d06fae053b3be65ec tox -e <env to test> | ||
CORE_REPO_SHA={env:CORE_REPO_SHA:main} | ||
CORE_REPO=git+https://github.com/open-telemetry/opentelemetry-python.git@{env:CORE_REPO_SHA} | ||
|
||
commands_pre = | ||
test,lint,coverage: pip install opentelemetry-api@{env:CORE_REPO}\#egg=opentelemetry-api&subdirectory=opentelemetry-api | ||
test,lint,coverage: pip install opentelemetry-semantic-conventions@{env:CORE_REPO}\#egg=opentelemetry-semantic-conventions&subdirectory=opentelemetry-semantic-conventions | ||
test,lint,coverage: pip install opentelemetry-sdk@{env:CORE_REPO}\#egg=opentelemetry-sdk&subdirectory=opentelemetry-sdk | ||
test,lint,coverage: pip install opentelemetry-test-utils@{env:CORE_REPO}\#egg=opentelemetry-test-utils&subdirectory=tests/opentelemetry-test-utils | ||
test,lint,coverage: pip install -e . | ||
|
||
test,coverage: pip install -r {toxinidir}/test-requirements.txt | ||
|
||
lint: pip install -r {toxinidir}/../../lint-requirements.txt | ||
|
||
coverage: pip install -r {toxinidir}/../../coverage-requirements.txt | ||
|
||
spellcheck: pip install -r {toxinidir}/../../spellcheck-requirements.txt | ||
|
||
commands = | ||
test: pytest {toxinidir}/tests {posargs} | ||
|
||
lint: black --diff --check --config {toxinidir}/../../pyproject.toml {toxinidir} | ||
lint: isort --diff --check-only --settings-path {toxinidir}/../../.isort.cfg {toxinidir} | ||
lint: flake8 --config {toxinidir}/../../.flake8 {toxinidir} | ||
lint: pylint --rcfile={toxinidir}/../../.pylintrc {toxinidir}/src/opentelemetry | ||
lint: pylint --rcfile={toxinidir}/../../.pylintrc {toxinidir}/tests | ||
|
||
coverage: coverage erase | ||
coverage: pytest --cov={toxinidir}/src --cov-append --cov-branch --cov-report='' {toxinidir}/tests | ||
coverage: coverage report --show-missing | ||
coverage: coverage xml | ||
|
||
spellcheck: codespell --config {toxinidir}/../../.codespellrc {toxinidir} |
1 change: 1 addition & 0 deletions
1
sdk-extension/opentelemetry-sdk-extension-aws/benchmark-requirements.txt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pytest-benchmark==4.0.0 |
File renamed without changes.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
[tox] | ||
isolated_build = True | ||
skipsdist = True | ||
skip_missing_interpreters = True | ||
envlist = | ||
test-py3{8,9,10,11} | ||
test-pypy3 | ||
lint | ||
coverage | ||
spellcheck | ||
|
||
[testenv] | ||
setenv = | ||
; override CORE_REPO_SHA via env variable when testing other branches/commits than main | ||
; i.e: CORE_REPO_SHA=dde62cebffe519c35875af6d06fae053b3be65ec tox -e <env to test> | ||
CORE_REPO_SHA={env:CORE_REPO_SHA:main} | ||
CORE_REPO=git+https://github.com/open-telemetry/opentelemetry-python.git@{env:CORE_REPO_SHA} | ||
|
||
commands_pre = | ||
test,lint,coverage,benchmark: pip install opentelemetry-api@{env:CORE_REPO}\#egg=opentelemetry-api&subdirectory=opentelemetry-api | ||
test,lint,coverage,benchmark: pip install opentelemetry-semantic-conventions@{env:CORE_REPO}\#egg=opentelemetry-semantic-conventions&subdirectory=opentelemetry-semantic-conventions | ||
test,lint,coverage,benchmark: pip install opentelemetry-sdk@{env:CORE_REPO}\#egg=opentelemetry-sdk&subdirectory=opentelemetry-sdk | ||
test,lint,coverage,benchmark: pip install opentelemetry-test-utils@{env:CORE_REPO}\#egg=opentelemetry-test-utils&subdirectory=tests/opentelemetry-test-utils | ||
test,lint,coverage,benchmark: pip install -e . | ||
|
||
test,coverage,benchmark: pip install -r {toxinidir}/test-requirements.txt | ||
|
||
lint: pip install -r {toxinidir}/../../lint-requirements.txt | ||
|
||
coverage: pip install -r {toxinidir}/../../coverage-requirements.txt | ||
|
||
spellcheck: pip install -r {toxinidir}/../../spellcheck-requirements.txt | ||
|
||
benchmark: pip install -r {toxinidir}/benchmark-requirements.txt | ||
|
||
commands = | ||
test: pytest {toxinidir}/tests {posargs} | ||
|
||
lint: black --diff --check --config {toxinidir}/../../pyproject.toml {toxinidir} | ||
lint: isort --diff --check-only --settings-path {toxinidir}/../../.isort.cfg {toxinidir} | ||
lint: flake8 --config {toxinidir}/../../.flake8 {toxinidir} | ||
lint: pylint --rcfile={toxinidir}/../../.pylintrc {toxinidir}/src/opentelemetry | ||
lint: pylint --rcfile={toxinidir}/../../.pylintrc {toxinidir}/tests | ||
|
||
coverage: coverage erase | ||
coverage: pytest --cov={toxinidir}/src --cov-append --cov-branch --cov-report='' {toxinidir}/tests | ||
coverage: coverage report --show-missing | ||
coverage: coverage xml | ||
|
||
spellcheck: codespell --config {toxinidir}/../../.codespellrc {toxinidir} | ||
|
||
benchmark: pytest {toxinidir}/benchmarks --benchmark-json=benchmark.json |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
codespell==2.2.6 |
Oops, something went wrong.