From 17ee586001495b82f86b964358a2d4dbeac2b83c Mon Sep 17 00:00:00 2001 From: Leighton Chen Date: Mon, 7 Nov 2022 11:17:40 -0800 Subject: [PATCH 1/3] update --- CHANGELOG.md | 2 + CONTRIBUTING.md | 77 +++++++++++++++++++- azure-monitor-opentelemetry-distro/setup.cfg | 10 ++- tox.ini | 2 +- 4 files changed, 82 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 994d3ebd..880919a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ - Updated main and distro READMEs ([#205](https://github.com/microsoft/ApplicationInsights-Python/pull/205)) +- Update CONTRIBUTING.md, support Py3.11 + ([#205](https://github.com/microsoft/ApplicationInsights-Python/pull/205)) ## [1.0.0b8](https://github.com/microsoft/ApplicationInsights-Python/releases/tag/v1.0.0b8) - 2022-09-26 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1409f4dd..c9e28fd1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,18 +1,87 @@ # Azure Monitor Contributing Guide -TODO +This project welcomes contributions and suggestions. Most contributions require you to agree to a +Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us +the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com. + +When you submit a pull request, a CLA bot will automatically determine whether you need to provide +a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions +provided by the bot. You will only need to do this once across all repos using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). +For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or +contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. ## Reporting Bugs/Feature Requests -TODO +To report a bug or feature request, open up an [issue](https://github.com/microsoft/ApplicationInsights-Python/issues). Please provide as much information as possible. For example for a bug, describe your environment, provide steps to reproduce, expected behavior/actual behavior in the description. ## Contributing -TODO +Everyone is welcome to contribute code to this repository via GitHub +pull requests (PRs). + +To create a new PR, fork the project in GitHub and clone the upstream repo: + +```console +$ git clone https://github.com/microsoft/ApplicationInsights-Python.git +``` + +Add your fork as an origin: + +```console +$ git remote add fork https://github.com/YOUR_GITHUB_USERNAME/microsoft/ApplicationInsights-python.git +``` + +Run tests: + +```sh +# make sure you have all supported versions of Python installed +$ pip install tox # only first time. +$ tox # execute in the root of the repository +``` + +Check out a new branch, make modifications and push the branch to your fork: + +```sh +$ git checkout -b feature +# edit files +$ git commit +$ git push fork feature +``` + +Open up a pull request with your changes. ## Development -TODO +This project uses [tox](https://tox.readthedocs.io) to automate +some aspects of development, including testing against multiple Python versions. +To install `tox`, run: + +```console +$ pip install tox +``` + +We will use the Azure Monitor distro project as an example. +You can run `tox` with the following arguments: + +- `tox` to run all existing tox commands, including unit tests for all packages + under multiple Python versions +- `tox -e distro` to run the unit tests +- `tox -e py310-distro` to e.g. run the API unit tests under a specific + Python version +- `tox -e spellcheck` to run a spellcheck on all the code +- `tox -e lint` to run lint checks on all code + +`black` and `isort` are executed when `tox -e lint` is run. The reported errors can be tedious to fix manually. +An easier way to do so is: + +1. Run `.tox/lint/bin/black .` +2. Run `.tox/lint/bin/isort .` + +See +[`tox.ini`](https://github.com/microsoft/ApplicationInsights-Python/blob/main/tox.ini) +for more detail on available tox commands. ## Documentation diff --git a/azure-monitor-opentelemetry-distro/setup.cfg b/azure-monitor-opentelemetry-distro/setup.cfg index b015f286..b2f391f9 100644 --- a/azure-monitor-opentelemetry-distro/setup.cfg +++ b/azure-monitor-opentelemetry-distro/setup.cfg @@ -20,6 +20,7 @@ classifiers = Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3.11 License :: OSI Approved :: MIT License Typing :: Typed @@ -32,10 +33,11 @@ zip_safe = False include_package_data = True install_requires = azure-monitor-opentelemetry-exporter == 1.0.0b8 - opentelemetry-instrumentation ~= 0.33b0 - opentelemetry-instrumentation-requests ~= 0.33b0 - opentelemetry-instrumentation-flask ~= 0.33b0 - opentelemetry-instrumentation-psycopg2 ~= 0.33b0 + opentelemetry-instrumentation ~= 0.35b0 + opentelemetry-instrumentation-django ~= 0.35b0 + opentelemetry-instrumentation-requests ~= 0.35b0 + opentelemetry-instrumentation-flask ~= 0.35b0 + opentelemetry-instrumentation-psycopg2 ~= 0.35b0 [options.packages.find] where = src diff --git a/tox.ini b/tox.ini index 7cd775c2..44223021 100644 --- a/tox.ini +++ b/tox.ini @@ -2,7 +2,7 @@ skipsdist = True skip_missing_interpreters = True envlist = - py3{6,7,8,9,10}-distro + py3{6,7,8,9,10,11}-distro lint [testenv] From 37dec424b2bd586fc9cae290feece775b380011a Mon Sep 17 00:00:00 2001 From: Leighton Chen Date: Mon, 7 Nov 2022 11:58:33 -0800 Subject: [PATCH 2/3] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 880919a3..797a3fe9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ - Updated main and distro READMEs ([#205](https://github.com/microsoft/ApplicationInsights-Python/pull/205)) - Update CONTRIBUTING.md, support Py3.11 - ([#205](https://github.com/microsoft/ApplicationInsights-Python/pull/205)) + ([#210](https://github.com/microsoft/ApplicationInsights-Python/pull/210)) ## [1.0.0b8](https://github.com/microsoft/ApplicationInsights-Python/releases/tag/v1.0.0b8) - 2022-09-26 From e7bcbaa109facaf5d76353de541f9f2636b3b0cb Mon Sep 17 00:00:00 2001 From: Leighton Chen Date: Tue, 8 Nov 2022 09:25:52 -0800 Subject: [PATCH 3/3] Update CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c9e28fd1..a0614b81 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -14,7 +14,7 @@ contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additio ## Reporting Bugs/Feature Requests -To report a bug or feature request, open up an [issue](https://github.com/microsoft/ApplicationInsights-Python/issues). Please provide as much information as possible. For example for a bug, describe your environment, provide steps to reproduce, expected behavior/actual behavior in the description. +To report a bug or feature request, open up an [issue](https://github.com/microsoft/ApplicationInsights-Python/issues). Please provide as much information as possible. For a bug, describe your environment, provide steps to reproduce, expected behavior/actual behavior in the description, etc. ## Contributing