Skip to content
This repository was archived by the owner on Aug 30, 2023. It is now read-only.

Commit 5a40dc6

Browse files
committed
Expand build process
1 parent 0e8b604 commit 5a40dc6

File tree

8 files changed

+64
-35
lines changed

8 files changed

+64
-35
lines changed

.travis.yml

+18-8
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,32 @@
11
sudo: false
22
language: python
33
services:
4+
- memcached
5+
- postgresql
46
- redis-server
57
python:
6-
- "2.7"
8+
- '2.7'
79
cache:
810
directories:
911
- node_modules
10-
- $HOME/.cache/pip
11-
- "$HOME/virtualenv/python2.7.9"
12+
- "$HOME/.cache/pip"
13+
deploy:
14+
provider: pypi
15+
user: getsentry
16+
password:
17+
secure: kVmxKHkBWRLYyZme05p+WZSJmb8GjHV9uyuaSCVMRlqWCW+GXRB7P1xXR2jb9URTlNdcs56Ab/UrwzCbMFGC8LmwCeFVgIR/ltytVZG2FgXZPWaeA4dH25qK2oGWgzJ/xeiMpmuJqN9hRl25MX6jG7FZKvrrOkG7+8tpPd1yO+uYWZQbnebZMjcPBqEpn7CC0hR39GSoyVAbydpMe5hwENGQM26CepcicdrelfawItoUrXrkJzBHkIQQTO/xRSbCtRJOtzI5lwtv3GP0hcbOy5tI5dhG/93pLwZRc5+dZaCaP7oaVeOcBjN0zfINRQobt8d6h2Qgvd/YyFkGi0/xKn1zMmKIVLOG6VsYwEAUq8wNOsP4A/jdm4Y0J/1oEZStCkpaGpx85TYi4kq1hWQdyqaVJSPhh4Tk4roIaS2zOYQl+nIpbHqmJ4FJrg1il+TCdjBXobATQ1mKRBUrjD+RDzH/r4ogbd8+UwvvvevpqS2K+/wgT6UD0MzDInv9S29CUQvuFhPoqyJb5XRddHMRE9EEK/2Z8tFN91sDATnqfXHgwnvu00q/nKP5JnijBPzGmx7ydgUViIukklDrlPvo9BbRJz0Vr2vbAvMTrLMLCXqi5CwTm+v+iaOf/YaCziaG2vx0eVASYjpOLCedSgRZBubPM8z4E/HMXhChN7sVDWk=
18+
on:
19+
tags: true
20+
distributions: sdist bdist_wheel
1221
env:
1322
global:
14-
- SENTRY_LIGHT_BUILD=1
15-
- SKIP_BACKEND_VALIDATION=1
23+
- PIP_DOWNLOAD_CACHE=".pip_download_cache"
24+
before_install:
25+
- pip install codecov
1626
install:
17-
- pip install -e .
18-
- pip install "file://`pwd`#egg=sentry-auth-github[tests]"
27+
- make develop
1928
script:
20-
- py.test
29+
- PYFLAKES_NODOCTEST=1 flake8
30+
- coverage run --source=. -m py.test tests
2131
after_success:
2232
- codecov

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work.
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright 2015 Functional Software, Inc.
189+
Copyright 2016 Functional Software, Inc.
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

Makefile

+25-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,26 @@
1-
test:
1+
.PHONY: clean develop install-tests lint publish test
2+
3+
develop:
4+
pip install "pip>=7"
25
pip install -e .
3-
pip install "file://`pwd`#egg=sentry-auth-github[tests]"
4-
py.test -x
6+
make install-tests
7+
8+
install-tests:
9+
pip install .[tests]
10+
11+
lint:
12+
@echo "--> Linting python"
13+
flake8
14+
@echo ""
15+
16+
test:
17+
@echo "--> Running Python tests"
18+
py.test tests || exit 1
19+
@echo ""
20+
21+
publish:
22+
python setup.py sdist bdist_wheel upload
23+
24+
clean:
25+
rm -rf *.egg-info src/*.egg-info
26+
rm -rf dist build

sentry_auth_github/client.py

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from requests.exceptions import RequestException
44
from sentry import http
55
from sentry.utils import json
6-
from urllib import urlencode
76

87
from .constants import API_DOMAIN
98

sentry_auth_github/provider.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
from __future__ import absolute_import, print_function
22

3-
from collections import namedtuple
4-
from django.conf import settings
53
from sentry.auth.exceptions import IdentityNotValid
64
from sentry.auth.providers.oauth2 import (
75
OAuth2Callback, OAuth2Provider, OAuth2Login
86
)
9-
from urllib import urlencode
107

118
from .client import GitHubApiError, GitHubClient
129
from .constants import (
@@ -86,6 +83,6 @@ def refresh_identity(self, auth_identity):
8683

8784
try:
8885
if not client.is_org_member(access_token, self.org['id']):
89-
raise IdentityNotValid(e)
86+
raise IdentityNotValid
9087
except GitHubApiError as e:
9188
raise IdentityNotValid(e)

sentry_auth_github/views.py

+1
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ def handle(self, request, helper):
102102
'form': form,
103103
})
104104

105+
105106
class SelectOrganizationForm(forms.Form):
106107
org = forms.ChoiceField(label='Organization')
107108

setup.cfg

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1+
[wheel]
2+
universal = 1
3+
14
[pytest]
2-
python_files=test*.py
3-
addopts=--tb=native
4-
norecursedirs=bin dist docs htmlcov script hooks node_modules .* {args}
5+
python_files = test*.py
6+
addopts = --tb=native -p no:doctest
7+
norecursedirs = bin dist docs htmlcov script hooks node_modules .* {args}
58

69
[flake8]
7-
ignore = F999,E501,E128,E124,E402,W503,E731,F841
10+
ignore = F999,E501,E128,E124,E402,W503,E731,C901
811
max-line-length = 100
9-
exclude = .tox,.git,docs/*
10-
11-
[wheel]
12-
universal = 1
12+
exclude = .tox,.git,*/migrations/*,node_modules/*,docs/*

setup.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,29 @@
33
sentry-auth-github
44
==================
55
6-
:copyright: (c) 2015 Functional Software, Inc
6+
:copyright: (c) 2016 Functional Software, Inc
77
"""
88
from setuptools import setup, find_packages
99

1010

11-
tests_require = [
12-
'pytest',
13-
'mock',
11+
install_requires = [
12+
'sentry>=7.0.0',
1413
]
1514

16-
install_requires = [
17-
'sentry',
15+
tests_require = [
16+
'mock',
17+
'flake8>=2.0,<2.1',
1818
]
1919

2020
setup(
2121
name='sentry-auth-github',
2222
version='0.1.0',
23-
author='David Cramer',
24-
author_email='dcramer@gmail.com',
23+
author='Sentry',
24+
author_email='support@getsentry.com',
2525
url='https://www.getsentry.com',
2626
description='GitHub authentication provider for Sentry',
2727
long_description=__doc__,
28-
license='',
28+
license='Apache 2.0',
2929
packages=find_packages(exclude=['tests']),
3030
zip_safe=False,
3131
install_requires=install_requires,
@@ -35,7 +35,7 @@
3535
entry_points={
3636
'sentry.apps': [
3737
'auth_github = sentry_auth_github',
38-
],
38+
],
3939
},
4040
classifiers=[
4141
'Intended Audience :: Developers',

0 commit comments

Comments
 (0)