Skip to content

Commit b25af7f

Browse files
Oberon00c24t
authored andcommitted
Add eachdist.py to simplify build (open-telemetry#291)
1 parent 105fe2f commit b25af7f

File tree

10 files changed

+567
-76
lines changed

10 files changed

+567
-76
lines changed

.flake8

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ exclude =
1111
.svn
1212
.tox
1313
CVS
14+
.venv*/
15+
venv*/
1416
target
1517
__pycache__
1618
ext/opentelemetry-ext-jaeger/src/opentelemetry/ext/jaeger/gen/

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ lib
2020
lib64
2121
__pycache__
2222
venv*/
23+
.venv*/
2324

2425
# Installer logs
2526
pip-log.txt

.isort.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ line_length=79
1313
; docs: https://github.com/timothycrosley/isort#multi-line-output-modes
1414
multi_line_output=3
1515
skip=target
16-
skip_glob=ext/opentelemetry-ext-jaeger/src/opentelemetry/ext/jaeger/gen/*
16+
skip_glob=ext/opentelemetry-ext-jaeger/src/opentelemetry/ext/jaeger/gen/*,.venv*/*,venv*/*
1717
known_first_party=opentelemetry

CONTRIBUTING.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,14 @@ during their normal contribution hours.
2828

2929
## Development
3030

31-
This project uses [`tox`](https://tox.readthedocs.io) to automate some aspects
31+
To quickly get up and running, you can use the `scripts/eachdist.py` tool that
32+
ships with this project. First create a virtualenv and activate it.
33+
Then run `python scripts/eachdist.py develop` to install all required packages
34+
as well as the project's packages themselves (in `--editable` mode).
35+
You can then run `scripts/eachdist.py test` to test everything or
36+
`scripts/eachdist.py lint` to lint everything (fixing anything that is auto-fixable).
37+
38+
Additionally, this project uses [`tox`](https://tox.readthedocs.io) to automate some aspects
3239
of development, including testing against multiple Python versions.
3340

3441
You can run:

dev-requirements.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
pylint~=2.3
2+
flake8~=3.7
3+
isort~=4.3
4+
black>=19.3b0,==19.*
5+
mypy==0.740
6+
sphinx~=2.1
7+
sphinx-rtd-theme~=0.4
8+
sphinx-autodoc-typehints~=1.10.2
9+
pytest!=5.2.3
10+
pytest-cov>=2.8

eachdist.ini

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# These will be sorted first in that order.
2+
# All packages that are depended upon by others should be listed here.
3+
[DEFAULT]
4+
sortfirst=
5+
opentelemetry-api
6+
opentelemetry-sdk
7+
ext/opentelemetry-ext-wsgi
8+
ext/*
9+
10+
[lintroots]
11+
extraroots=examples/*,scripts/
12+
subglob=*.py,tests/,test/,src/*,examples/*
13+
14+
[testroots]
15+
extraroots=examples/*,tests/
16+
subglob=tests/,test/

ext/opentelemetry-ext-testutil/setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ package_dir=
3838
=src
3939
packages=find_namespace:
4040
install_requires =
41-
opentelemetry-ext-wsgi
41+
opentelemetry-api
4242

4343
[options.extras_require]
4444
test = flask~=1.0

pyproject.toml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,7 @@ line-length = 79
33
exclude = '''
44
(
55
/(
6-
\.eggs # exclude a few common directories in the
7-
| \.git # root of the project
8-
| \.hg
9-
| \.mypy_cache
10-
| \.tox
11-
| \.venv
12-
| \.vscode
13-
| _build
14-
| buck-out
15-
| target
16-
| build
17-
| dist
18-
| ext/opentelemetry-ext-jaeger/src/opentelemetry/ext/jaeger/gen # generated files
6+
ext/opentelemetry-ext-jaeger/src/opentelemetry/ext/jaeger/gen # generated files
197
)/
20-
| foo.py # also separately exclude a file named foo.py in
21-
# the root of the project
228
)
239
'''

0 commit comments

Comments
 (0)