Skip to content
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

[REQUIRED FIRST] Fix lint by making pkg tests folders namespace pkgs #131

Merged
merged 7 commits into from
Nov 6, 2020
Merged
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
1 change: 0 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ omit =
*/setup.py
*/gen/*
reference/*
opentelemetry-python-core/*
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ extension-pkg-whitelist=

# Add list of files or directories to be excluded. They should be base names, not
# paths.
ignore=CVS,gen,opentelemetry-python-core
ignore=CVS,gen

# Add files or directories matching the regex patterns to be excluded. The
# regex matches against base names, not paths.
Expand Down
2 changes: 1 addition & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pylint~=2.3
pylint==2.4.4
flake8~=3.7
isort~=4.3
black>=19.3b0,==19.*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright The OpenTelemetry Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import pkg_resources

# IMPORTANT: Only the wsgi module needs this because it is always the first
# package that uses the `{rootdir}/*/tests/` path and gets installed by
# `eachdist.py` and according to `eachdist.ini`.

# Naming the tests module as a namespace package ensures that
# relative imports will resolve properly for subsequent test packages,
# as it enables searching for a composite of multiple test modules.
pkg_resources.declare_namespace(__name__)
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ line-length = 79
exclude = '''
(
/(
reference| # original files from DataDog
opentelemetry-python-core
reference # original files from DataDog
)/
)
'''
14 changes: 4 additions & 10 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -262,16 +262,6 @@ commands =
basepython: python3.8
recreate = True
deps =
-e {toxinidir}/opentelemetry-python-core/opentelemetry-proto
-e {toxinidir}/opentelemetry-python-core/opentelemetry-api
-e {toxinidir}/opentelemetry-python-core/opentelemetry-sdk
-e {toxinidir}/opentelemetry-python-core/opentelemetry-instrumentation
-e {toxinidir}/opentelemetry-python-core/opentelemetry-proto
-e {toxinidir}/opentelemetry-python-core/tests/util
-e {toxinidir}/opentelemetry-python-core/exporter/opentelemetry-exporter-jaeger
-e {toxinidir}/opentelemetry-python-core/exporter/opentelemetry-exporter-zipkin
-e {toxinidir}/opentelemetry-python-core/exporter/opentelemetry-exporter-prometheus
-e {toxinidir}/opentelemetry-python-core/exporter/opentelemetry-exporter-otlp
-c dev-requirements.txt
pylint
flake8
Expand All @@ -282,6 +272,10 @@ deps =
httpretty

commands_pre =
python -m pip install {toxinidir}/opentelemetry-python-core/opentelemetry-api
python -m pip install {toxinidir}/opentelemetry-python-core/opentelemetry-sdk
python -m pip install {toxinidir}/opentelemetry-python-core/tests/util
python -m pip install {toxinidir}/opentelemetry-python-core/opentelemetry-instrumentation
python scripts/eachdist.py install --editable --with-test-deps

commands =
Expand Down