Skip to content

Commit dd4b40b

Browse files
get tox to work, do flake8 checking
1 parent cdf011d commit dd4b40b

12 files changed

+75
-254
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ restapi.egg-info/
33
build/
44
dist/
55
.noseids
6+
*.egg-info/
7+
.cache/
8+
.tox/

MANIFEST.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
include *.txt *.ini *.cfg *.rst
1+
include *.txt *.ini *.cfg *.rst *.md
22
recursive-include restapi *.ico *.png *.css *.gif *.jpg *.pt *.txt *.mak *.mako *.js *.html *.xml

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# REST API for the backfeed-protocol
22

3-
## Installation
3+
## Running the tests
44

5-
python setup.py install
5+
tox
66

7-
## Running the tests
7+
## Installation
88

9-
python setup.py test
9+
pip install .
1010

1111
## Starting a server
1212

requirements.txt

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pyramid==1.6.1
2+
pyramid_chameleon
3+
pyramid_debugtoolbar
4+
waitress
5+
cornice
6+
--editable=/home/jelle/projects/backfeed/protocol-python/src/protocol

restapi/static/pyramid-16x16.png

-1.29 KB
Binary file not shown.

restapi/static/pyramid.png

-12.6 KB
Binary file not shown.

restapi/static/theme.css

-152
This file was deleted.

restapi/static/theme.min.css

-1
This file was deleted.

restapi/templates/mytemplate.pt

-67
This file was deleted.
File renamed without changes.

setup.py

+30-29
Original file line numberDiff line numberDiff line change
@@ -9,37 +9,38 @@
99
CHANGES = f.read()
1010

1111
requires = [
12-
'pyramid',
13-
'pyramid_chameleon',
14-
'pyramid_debugtoolbar',
15-
'waitress',
16-
'cornice',
17-
'backfeed-protocol',
18-
]
12+
# 'pyramid',
13+
# 'pyramid_chameleon',
14+
# 'pyramid_debugtoolbar',
15+
# 'waitress',
16+
# 'cornice',
17+
# 'backfeed-protocol',
18+
]
1919

20-
setup(name='restapi',
21-
version='0.0',
22-
description='restapi',
23-
long_description=README + '\n\n' + CHANGES,
24-
classifiers=[
20+
setup(
21+
name='backfeed-protocol-restapi',
22+
version='0.1',
23+
description='restapi',
24+
long_description=README + '\n\n' + CHANGES,
25+
classifiers=[
2526
"Programming Language :: Python",
2627
"Framework :: Pyramid",
2728
"Topic :: Internet :: WWW/HTTP",
2829
"Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
29-
],
30-
author='',
31-
author_email='',
32-
url='',
33-
keywords='web pyramid pylons',
34-
packages=find_packages(),
35-
include_package_data=True,
36-
zip_safe=False,
37-
install_requires=requires,
38-
dependency_links=['http://github.com/Backfeed/protocol-python/tarball/master'],
39-
tests_require=requires,
40-
test_suite="restapi",
41-
entry_points="""\
42-
[paste.app_factory]
43-
main = restapi:main
44-
""",
45-
)
30+
],
31+
author='',
32+
author_email='',
33+
url='',
34+
keywords='web pyramid pylons',
35+
packages=find_packages(),
36+
include_package_data=True,
37+
zip_safe=False,
38+
install_requires=requires,
39+
dependency_links=['http://github.com/Backfeed/backfeed-protocol-restapi/tarball/master'],
40+
tests_require=requires,
41+
test_suite="restapi",
42+
entry_points="""\
43+
[paste.app_factory]
44+
main = restapi:main
45+
""",
46+
)

tox.ini

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
[tox]
2+
envlist = py27, style
3+
4+
[testenv]
5+
setenv =
6+
PYTHONPATH = {toxinidir}:{toxinidir}/restapi
7+
deps =
8+
-r{toxinidir}/requirements.txt
9+
pytest
10+
commands =
11+
py.test --basetemp={envtmpdir}
12+
13+
[testenv:style]
14+
deps =
15+
-r{toxinidir}/requirements.txt
16+
flake8
17+
commands =
18+
python setup.py flake8
19+
20+
[testenv:docs]
21+
changedir=docs/
22+
deps =
23+
-r{toxinidir}/requirements.txt
24+
sphinx
25+
commands =
26+
sphinx-build -b linkcheck ./ _build/
27+
sphinx-build -b html ./ _build/
28+
29+
[flake8]
30+
# ignore lines that are too long
31+
ignore=E501

0 commit comments

Comments
 (0)