Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into majorgreys/instru…
Browse files Browse the repository at this point in the history
…mentor-celery
  • Loading branch information
majorgreys committed Jun 4, 2020
2 parents 9dff127 + 75a1311 commit 551d673
Show file tree
Hide file tree
Showing 331 changed files with 12,677 additions and 1,749 deletions.
3 changes: 2 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
ignore =
E501 # line too long, defer to black
F401 # unused import, defer to pylint
W503 # allow line breaks after binary ops, not after
W503 # allow line breaks before binary ops
W504 # allow line breaks after binary ops
E203 # allow whitespace before ':' (https://github.com/psf/black#slices)
exclude =
.bzr
Expand Down
16 changes: 15 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,24 @@ jobs:
python-version: '3.7'
- name: Build wheels
run: ./scripts/build.sh
- name: Install twine
run: |
pip install twine
# The step below publishes to testpypi in order to catch any issues
# with the package configuration that would cause a failure to upload
# to pypi. One example of such a failure is if a classifier is
# rejected by pypi (e.g "3 - Beta"). This would cause a failure during the
# middle of the package upload causing the action to fail, and certain packages
# might have already been updated, this would be bad.
- name: Publish to TestPyPI
env:
TWINE_USERNAME: ${{ secrets.test_pypi_username }}
TWINE_PASSWORD: ${{ secrets.test_pypi_password }}
run: |
twine upload --repository testpypi --skip-existing --verbose dist/*
- name: Publish to PyPI
env:
TWINE_USERNAME: '__token__'
TWINE_PASSWORD: ${{ secrets.pypi_password }}
run: |
pip install twine
twine upload --skip-existing --verbose dist/*
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,7 @@ _build/
# mypy
.mypy_cache/
target

# Django example

docs/examples/django/db.sqlite3
21 changes: 14 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,20 @@ language: python

cache: pip

python:
- 'pypy3'
- '3.8'
- '3.4'
- '3.5'
- '3.6'
- '3.7'
matrix:
include:
- python: 3.8
env: TOXENV=lint
- python: pypy3
- python: 3.8
- python: 3.4
- python: 3.5
- python: 3.6
- python: 3.7
- python: 3.8
env: TOXENV=docker-tests
- python: 3.8
env: TOXENV=docs

#matrix:
# allow_failures:
Expand Down
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ Meeting notes are available as a public [Google doc](https://docs.google.com/doc

Approvers ([@open-telemetry/python-approvers](https://github.com/orgs/open-telemetry/teams/python-approvers)):

- [Alex Boten](https://github.com/codeboten), LightStep
- [Carlos Alberto Cortez](https://github.com/carlosalberto), LightStep
- [Christian Neumüller](https://github.com/Oberon00), Dynatrace
- [Chris Kleinknecht](https://github.com/c24t), Google
- [Diego Hurtado](https://github.com/ocelotl)
- [Hector Hernandez](https://github.com/hectorhdzg), Microsoft
- [Leighton Chen](https://github.com/lzchen), Microsoft
- [Mauricio Vásquez](https://github.com/mauriciovasquezbernal), Kinvolk
Expand All @@ -115,9 +115,15 @@ Approvers ([@open-telemetry/python-approvers](https://github.com/orgs/open-telem

Maintainers ([@open-telemetry/python-maintainers](https://github.com/orgs/open-telemetry/teams/python-maintainers)):

- [Chris Kleinknecht](https://github.com/c24t), Google
- [Alex Boten](https://github.com/codeboten), LightStep
- [Yusuke Tsutsumi](https://github.com/toumorokoshi), Zillow Group

### Thanks to all the people who already contributed!

<a href="https://github.com/open-telemetry/opentelemetry-python/graphs/contributors">
<img src="https://contributors-img.web.app/image?repo=open-telemetry/opentelemetry-python" />
</a>

*Find more about the maintainer role in [community repository](https://github.com/open-telemetry/community/blob/master/community-membership.md#maintainer).*

## Release Schedule
Expand Down
84 changes: 84 additions & 0 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Releasing OpenTelemetry Packages (for maintainers only)
This document explains how to publish all OT modules at version x.y.z. Ensure that you’re following semver when choosing a version number.

Release Process:
* [Checkout a clean repo](#checkout-a-clean-repo)
* [Create a new branch](#create-a-new-branch)
* [Open a Pull Request](#open-a-pull-request)
* [Create a Release](#Create-a-Release)
* [Move stable tag](#Move-stable-tag)
* [Update master](#Update-master)
* [Check PyPI](#Check-PyPI)
* [Troubleshooting](#troubleshooting)

## Checkout a clean repo
- To avoid pushing untracked changes, check out the repo in a new dir

## Create a new branch
The following script does the following:
- update master locally
- creates a new release branch `release/<version>`
- updates version and changelog files
- commits the change to a new branch `release/<version>-auto`

*NOTE: This script was run by a GitHub Action but required the Action bot to be excluded from the CLA check, which it currently is not.*

```bash
./scripts/prepare_release.sh 0.7b0
```

## Open a Pull Request

The PR should be opened from the `release/<version>-auto` branch created as part of running `prepare_release.sh` in the steps above.

## Create a Release

- Create the GH release from the release branch, using a new tag for this micro version, e.g. `v0.7.0`
- Copy the changelogs from all packages that changed into the release notes (and reformat to remove hard line wraps)


## Check PyPI

This should be handled automatically on release by the [publish action](https://github.com/open-telemetry/opentelemetry-python/blob/master/.github/workflows/publish.yml).

- Check the [action logs](https://github.com/open-telemetry/opentelemetry-python/actions?query=workflow%3APublish) to make sure packages have been uploaded to PyPI
- Check the release history (e.g. https://pypi.org/project/opentelemetry-api/#history) on PyPI

If for some reason the action failed, see [Publish failed](#publish-failed) below

## Move stable tag

This will ensure the docs are pointing at the stable release.

```bash
git tag -d stable
git tag stable
git push origin stable
```

## Update master

Ensure the version and changelog updates have been applied to master.

```bash
# checkout a new branch from master
git checkout -b v0.7b0-master-update
# cherry pick the change from the release branch
git cherry-pick $(git log -n 1 origin/release/0.7b0 --format="%H")
# update the version number, make it a "dev" greater than release number, e.g. 0.8.dev0
perl -i -p -e 's/0.7b0/0.8.dev0/' $(git grep -l "0.7b0" | grep -vi CHANGELOG)
# open a PR targeting master see #331
git commit -m
```

## Troubleshooting

### Publish failed

If for some reason the action failed, do it manually:

- Switch to the release branch (important so we don't publish packages with "dev" versions)
- Build distributions with `./scripts/build.sh`
- Delete distributions we don't want to push (e.g. `testutil`)
- Push to PyPI as `twine upload --skip-existing --verbose dist/*`
- Double check PyPI!
3 changes: 2 additions & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pylint==2.4.4
flake8~=3.7
flake8==3.7.9
isort~=4.3
black>=19.3b0,==19.*
mypy==0.740
Expand All @@ -11,3 +11,4 @@ pytest-cov>=2.8
readme-renderer~=24.0
httpretty~=1.0
celery>=4.0
opentracing~=2.2.0
10 changes: 9 additions & 1 deletion docs-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ sphinx-rtd-theme~=0.4
sphinx-autodoc-typehints~=1.10.2

# Required by ext packages
asgiref~=3.0
ddtrace>=0.34.0
aiohttp~= 3.0
Deprecated>=1.2.6
django>=2.2
PyMySQL~=0.9.3
flask~=1.0
mysql-connector-python~=8.0
Expand All @@ -12,6 +16,10 @@ prometheus_client>=0.5.0,<1.0.0
psycopg2-binary>=2.7.3.1
pymongo~=3.1
redis>=2.6
sqlalchemy>=1.0
thrift>=0.10.0
wrapt >=1.0.0,<2.0.0
wrapt>=1.0.0,<2.0.0
celery>=4.0
psutil~=5.7.0
boto~=2.0
google-cloud-trace >=0.23.0
30 changes: 28 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@
from os import listdir
from os.path import isdir, join

# configure django to avoid the following exception:
# django.core.exceptions.ImproperlyConfigured: Requested settings, but settings
# are not configured. You must either define the environment variable
# DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
from django.conf import settings

settings.configure()


source_dirs = [
os.path.abspath("../opentelemetry-api/src/"),
os.path.abspath("../opentelemetry-sdk/src/"),
Expand Down Expand Up @@ -68,6 +77,9 @@
"https://opentracing-python.readthedocs.io/en/latest/",
None,
),
"aiohttp": ("https://aiohttp.readthedocs.io/en/stable/", None),
"wrapt": ("https://wrapt.readthedocs.io/en/latest/", None),
"pymongo": ("https://pymongo.readthedocs.io/en/stable/", None),
}

# http://www.sphinx-doc.org/en/master/config.html#confval-nitpicky
Expand All @@ -79,8 +91,22 @@
nitpick_ignore = [
("py:class", "ValueT"),
("py:class", "MetricT"),
("py:class", "typing.Tuple"),
("py:class", "pymongo.monitoring.CommandListener"),
# Even if wrapt is added to intersphinx_mapping, sphinx keeps failing
# with "class reference target not found: ObjectProxy".
("py:class", "ObjectProxy"),
# TODO: Understand why sphinx is not able to find this local class
(
"py:class",
"opentelemetry.trace.propagation.httptextformat.HTTPTextFormat",
),
(
"any",
"opentelemetry.trace.propagation.httptextformat.HTTPTextFormat.extract",
),
(
"any",
"opentelemetry.trace.propagation.httptextformat.HTTPTextFormat.inject",
),
]

# Add any paths that contain templates here, relative to this directory.
Expand Down
Loading

0 comments on commit 551d673

Please sign in to comment.