Browse Source

Adding MANIFEST.in, test-requirements.txt, tox.ini to pass gate

Change-Id: I7e05401b1f6b46829d8ab64fe3580b16719ec5f3
tags/0.1.0^0
Nathan Buckner 3 years ago
parent
commit
11bb15178c
8 changed files with 36 additions and 7 deletions
  1. 4
    0
      .gitreview
  2. 1
    0
      MANIFEST.in
  3. 1
    1
      pip-requires
  4. 6
    4
      setup.py
  5. 1
    1
      syntribos/clients/http/parser.py
  6. 1
    1
      syntribos/tests/fuzz/datagen.py
  7. 2
    0
      test-requirements.txt
  8. 20
    0
      tox.ini

+ 4
- 0
.gitreview View File

@@ -0,0 +1,4 @@
1
+[gerrit]
2
+host=review.openstack.org
3
+port=29418
4
+project=openstack/syntribos

+ 1
- 0
MANIFEST.in View File

@@ -0,0 +1 @@
1
+include README.md LICENSE pip-requires HISTORY.rst

+ 1
- 1
pip-requires View File

@@ -1 +1 @@
1
-opencafe
1
+opencafe>=0.2.1,<0.2.2

+ 6
- 4
setup.py View File

@@ -14,22 +14,24 @@ See the License for the specific language governing permissions and
14 14
 limitations under the License.
15 15
 """
16 16
 from setuptools import setup, find_packages
17
+import os
17 18
 
18 19
 
19
-requires = open('pip-requires').readlines()
20
+base_path = os.path.dirname(os.path.abspath(__file__))
21
+requires = open(os.path.join(base_path, 'pip-requires')).readlines()
20 22
 setup(
21 23
     name='syntribos',
22 24
     version='0.0.1',
23 25
     description=('API Security Scanner'),
24 26
     long_description='{0}\n\n{1}'.format(
25
-        open('README.md').read(),
26
-        open('HISTORY.rst').read()),
27
+        open(os.path.join(base_path, 'README.md')).read(),
28
+        open(os.path.join(base_path, 'HISTORY.rst')).read()),
27 29
     author='Rackspace Cloud QE',
28 30
     author_email='nathan.buckner@rackspace.com',
29 31
     packages=find_packages(),
30 32
     include_package_data=True,
31 33
     install_requires=requires,
32
-    license=open('LICENSE').read(),
34
+    license=open(os.path.join(base_path, 'LICENSE')).read(),
33 35
     zip_safe=False,
34 36
     entry_points={'console_scripts': [
35 37
         'syntribos = syntribos.runner:entry_point']},

+ 1
- 1
syntribos/clients/http/parser.py View File

@@ -40,7 +40,7 @@ class RequestCreator(object):
40 40
                 break
41 41
         method, url, params, version = cls._parse_url_line(lines[0], endpoint)
42 42
         headers = cls._parse_headers(lines[1:index])
43
-        data = cls._parse_data(lines[index+1:])
43
+        data = cls._parse_data(lines[index + 1:])
44 44
         return cls.request_model_type(
45 45
             method=method, url=url, headers=headers, params=params, data=data,
46 46
             action_field=action_field)

+ 1
- 1
syntribos/tests/fuzz/datagen.py View File

@@ -49,7 +49,7 @@ class FuzzMixin(object):
49 49
             start, stop = match.span()
50 50
             yield "{0}{1}{2}".format(
51 51
                 cls.remove_braces(data[:start]),
52
-                string, cls.remove_braces(data[stop+1:]))
52
+                string, cls.remove_braces(data[stop + 1:]))
53 53
 
54 54
     @classmethod
55 55
     def _build_combinations(cls, stri, dic, skip_var):

+ 2
- 0
test-requirements.txt View File

@@ -0,0 +1,2 @@
1
+flake8>=2.2.4,<=2.4.1
2
+nose

+ 20
- 0
tox.ini View File

@@ -0,0 +1,20 @@
1
+[tox]
2
+envlist=pep8,py27,py34
3
+
4
+[testenv]
5
+setenv=VIRTUAL_ENV={envdir}
6
+deps=-r{toxinidir}/pip-requires
7
+     -r{toxinidir}/test-requirements.txt
8
+
9
+[testenv:py27]
10
+commands=nosetests
11
+
12
+[testenv:py34]
13
+commands=nosetests
14
+
15
+[testenv:pep8]
16
+commands=flake8
17
+
18
+[flake8]
19
+ignore=F401,E402
20
+

Loading…
Cancel
Save