Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,25 @@ jobs:
- name: Run tests
run: tox -e lint-opentelemetry-opentracing-shim

lint-opentelemetry-opentracing-example:
name: opentelemetry-opentracing-example
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.14
uses: actions/setup-python@v5
with:
python-version: "3.14"

- name: Install tox
run: pip install tox-uv

- name: Run tests
run: tox -e lint-opentelemetry-opentracing-example

lint-opentelemetry-opencensus-shim:
name: opentelemetry-opencensus-shim
runs-on: ubuntu-latest
Expand Down
9 changes: 9 additions & 0 deletions docs/examples/opentracing/.pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[MASTER]
init-hook='import sys; sys.path.insert(0, ".")'

[MESSAGES CONTROL]
disable=missing-docstring,
too-few-public-methods

[FORMAT]
expected-line-ending-format=
7 changes: 2 additions & 5 deletions docs/examples/opentracing/rediscache.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,8 @@
import pickle
from functools import wraps

# FIXME The pylint disablings are needed here because the code of this
# example is being executed against the tox.ini of the main
# opentelemetry-python project. Find a way to separate the two.
import redis # pylint: disable=import-error
import redis_opentracing # pylint: disable=import-error
import redis
import redis_opentracing


class RedisCache:
Expand Down
11 changes: 11 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ envlist =
py3{9,10,11,12,13,14,14t}-test-opentelemetry-opentracing-shim
pypy3-test-opentelemetry-opentracing-shim
lint-opentelemetry-opentracing-shim
lint-opentelemetry-opentracing-example

py3{9,10,11,12,13,14}-test-opentelemetry-opencensus-shim
; opencensus-shim intentionally excluded from pypy3 (grpcio install fails)
Expand Down Expand Up @@ -408,3 +409,13 @@ deps =
pre-commit
commands =
pre-commit run --color=always --all-files {posargs}

[testenv:lint-opentelemetry-opentracing-example]
deps =
-r dev-requirements.txt
-r {toxinidir}/docs/examples/opentracing/requirements.txt
setenv =
PYTHONPATH = {toxinidir}/docs/examples/opentracing
commands =
pylint --rcfile {toxinidir}/docs/examples/opentracing/.pylintrc {toxinidir}/docs/examples/opentracing

Loading