8000 fix: Package metadata and docs (#565) · etherscan-io/sentry-python@4ff2688 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4ff2688

Browse files
authored
fix: Package metadata and docs (getsentry#565)
* fix: Make package metadata consistent in setup.py * doc: Add guidance for writing tests for integrations
1 parent 5cc777c commit 4ff2688

File tree

3 files changed

+31
-8
lines changed

3 files changed

+31
-8
lines changed

CONTRIBUTING.md

Lines changed: 16 additions & 3 deletions
8000
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,19 @@ The usual release process goes like this:
4444

4545
* Allow the user to disable the integration by changing the client. Check `Hub.current.get_integration(MyIntegration)` from within your signal handlers to see if your integration is still active before you do anything impactful (such as sending an event).
4646

47-
2. Write the [docs](https://github.com/getsentry/sentry-docs). Answer the following questions:
47+
2. Write tests.
48+
49+
* Think about the minimum versions supported, and test each version in a separate env in `tox.ini`.
50+
51+
* Create a new folder in `tests/integrations/`, with an `__init__` file that skips the entire suite if the package is not installed.
52+
53+
3. Update package metadata.
54+
55+
* We use `extras_require` in `setup.py` to communicate minimum version requirements for integrations. People can use this in combination with tools like Poetry or Pipenv to detect conflicts between our supported versions and their used versions programmatically.
56+
57+
Do not set upper-bounds on version requirements as people are often faster in adopting new versions of a web framework than we are in adding them to the test matrix or our package metadata.
58+
59+
4. Write the [docs](https://github.com/getsentry/sentry-docs). Answer the following questions:
4860

4961
* What does your integration do? Split in two sections: Executive summary at top and exact behavior further down.
5062

@@ -56,5 +68,6 @@ The usual release process goes like this:
5668

5769
Tip: Put most relevant parts wrapped in `<!--WIZARD-->..<!--ENDWIZARD-->` tags for usage from within the Sentry UI.
5870

59-
3. Merge docs after new version has been released (auto-deploys on merge).
60-
4. (optional) Update data in [`sdk_updates.py`](https://github.com/getsentry/sentry/blob/master/src/sentry/sdk_updates.py) to give users in-app suggestions to use your integration. May not be applicable or doable for all kinds of integrations.
71+
5. Merge docs after new version has been released (auto-deploys on merge).
72+
73+
6. (optional) Update data in [`sdk_updates.py`](https://github.com/getsentry/sentry/blob/master/src/sentry/sdk_updates.py) to give users in-app suggestions to use your integration. May not be applicable or doable for all kinds of integrations.

setup.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,18 @@
2525
license="BSD",
2626
install_requires=["urllib3>=1.10.0", "certifi"],
2727
extras_require={
28-
"flask": ["flask>=0.8", "blinker>=1.1"],
28+
"flask": ["flask>=0.11", "blinker>=1.1"],
2929
"bottle": ["bottle>=0.12.13"],
3030
"falcon": ["falcon>=1.4"],
31+
"django": ["django>=1.8"],
32+
"sanic": ["sanic>=0.8"],
33+
"celery": ["celery>=3"],
34+
"beam": ["beam>=2.12"],
35+
"rq": ["0.6"],
36+
"aiohttp": ["aiohttp>=3.5"],
37+
"tornado": ["tornado>=5"],
38+
"sqlalchemy": ["sqlalchemy>=1.2"],
39+
"pyspark": ["pyspark>=2.4.4"],
3140
},
3241
classifiers=[
3342
"Development Status :: 5 - Production/Stable",
@@ -43,6 +52,7 @@
4352
"Programming Language :: Python :: 3.5",
4453
"Programming Language :: Python :: 3.6",
4554
"Programming Language :: Python :: 3.7",
55+
"Programming Language :: Python :: 3.8",
4656
"Topic :: Software Development :: Libraries :: Python Modules",
4757
],
4858
)

tox.ini

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ envlist =
3232
{pypy,py2.7,py3.5,py3.6,py3.7,py3.8}-celery-{4.1,4.2,4.3}
3333
{pypy,py2.7}-celery-3
3434

35-
py2.7-beam-{12,13}
36-
py3.7-beam-{12,13,master}
35+
py2.7-beam-{2.12,2.13}
36+
py3.7-beam-{2.12,2.13,master}
3737

3838
# The aws_lambda tests deploy to the real AWS and have their own matrix of Python versions.
3939
py3.7-aws_lambda
@@ -99,8 +99,8 @@ deps =
9999
{py3.5,py3.6}-sanic: aiocontextvars==0.2.1
100100
sanic: aiohttp
101101

102-
beam-12: apache-beam>=2.12.0, <2.13.0
103-
beam-13: apache-beam>=2.13.0, <2.14.0
102+
beam-2.12: apache-beam>=2.12.0, <2.13.0
103+
beam-2.13: apache-beam>=2.13.0, <2.14.0
104104
beam-master: git+https://github.com/apache/beam#egg=apache-beam&subdirectory=sdks/python
105105

106106
celery-3: Celery>=3.1,<4.0

0 commit comments

Comments
 (0)
0