Skip to content
Closed
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
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ install:
- pip install tox-travis

script:
- tox
- (cd opentelemetry-api; tox)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wondering, is this part of the WIP or are we only building what is inside the api package?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll eventually build everything, for now only API has code to build.


branches:
only:
Expand Down
File renamed without changes.
14 changes: 14 additions & 0 deletions opentelemetry-api/tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[tox]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious, given we will have other packages (e.g. opentelemetry-sdk) under this repo, do we want to have a single global tox, or a tox file per package?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know what best practises are here, but I'd imagine we will have quite some code/config duplication with multiple toxfiles 🤔 I think OpenCensus-python used nox, maybe that tool is better in this regard?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From a conversation with @reyang: nox gives us a combined coverage report if we have branches that depend on python version, but tox made it easier to run tests in parallel on travis. We'll stick with tox and burn the coverage bridge when we come to it.

I don't know whether it'll be easier to have one or multiple tox files. It does make it easier now to have it under opentelemetry-api since there's no code yet to check in the SDK.

skipsdist = True
envlist = py{34,35,36,37}-unit, py37-lint, py37-mypy

[testenv]
deps =
py{34,35,36,37}-unit: -e .
py37-lint: pylint
py37-mypy: mypy

commands =
py{34,35,36,37}-unit: python -c "from opentelemetry import trace"
py37-lint: pylint opentelemetry/
py37-mypy: mypy opentelemetry/
4 changes: 3 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
[tox]
skipsdist = True
envlist = py37-lint, py37-mypy
envlist = py{34,35,36,37}-unit, py37-lint, py37-mypy
Copy link
Contributor

@lzchen lzchen Jul 7, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there is going to be multiple tox files, is the idea to have a different build per package? I think we need to define what makes sense in the project structure to "build differently".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still TBD, I don't have an opinion on this.


[testenv]
deps =
py{34,35,36,37}-unit: -e .
py37-lint: pylint
py37-mypy: mypy

commands =
py{34,35,36,37}-unit: python -c "from opentelemetry import trace"
py37-lint: pylint opentelemetry-api/opentelemetry/
py37-mypy: mypy opentelemetry-api/opentelemetry/