Skip to content

Latest commit

 

History

History
91 lines (64 loc) · 2.72 KB

contributing.md

File metadata and controls

91 lines (64 loc) · 2.72 KB

How to Contribute

We'd love to accept your patches and contributions to this project. There are just a few small guidelines you need to follow.

Contributor License Agreement

Contributions to this project must be accompanied by a Contributor License Agreement. You (or your employer) retain the copyright to your contribution; this simply gives us permission to use and redistribute your contributions as part of the project. Head over to https://cla.developers.google.com/ to see your current agreements on file or to sign a new one.

You generally only need to submit a CLA once, so if you've already submitted one (even if it was for a different project), you probably don't need to do it again.

Code reviews

All submissions, including submissions by project members, require review. We use GitHub pull requests for this purpose. Consult GitHub Help for more information on using pull requests.

It is a good idea to create your pull request as a Draft. Once you have looked over your pull request and all CI checks are passing, publish your changes.

Community Guidelines

This project follows Google's Open Source Community Guidelines.

Development Instructions

This project is a monorepo for several PyPI packages, each in a opentelemetry-* subdirectory.

Install tox

This project uses tox for development, so make sure it is installed on your system:

pip install tox

To create a virtual environment venv/ at the root of the repository (useful for pointing editors like vscode at), run:

tox -e dev

Running tests

This project supports python versions 3.5 to 3.9. To run tests, use tox:

# List all tox environments
tox -l

# Run python3.8 exporter tests
tox -e py38-ci-test-exporter

# Run all python3.8 tests in parallel
tox -f py38-test -pauto

# All checks that run in continuous integration use the "ci" factor, which
# makes it easy to test without submitting a PR. To run all of them in
# parallel, skipping any python versions that are not present on your system:
tox -s true -f ci -pauto

Running lint and autofix

# Run lint checks
tox -f lint

# To fix formatting and import ordering lint issues automatically
tox -f fix

Issues

tox usually recreates virtual environments for you whenever the config changes. However, it doesn't fully track external requirements files and your dependencies can be outdated. Either delete the .tox/ directory or use the -r flag with tox to recreate virtual environments.