Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Requirements #189

Merged
merged 2 commits into from
Oct 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,7 @@ jobs:
- name: Run Unit Tests
run: |
python3 -m pytest
- name: Run MyPy
run: |
pip install enum34 mypy typed-ast
./mypy-run.sh
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ply>= 3.4
six>= 1.3.0
3 changes: 2 additions & 1 deletion test/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
mock>=2.0.0,<5.0
coverage
coverage==5.3
pytest<5
10 changes: 4 additions & 6 deletions test/test_python_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from stone.ir import (
AnnotationType,
AnnotationTypeParam,
Api,
ApiNamespace,
ApiRoute,
CustomAnnotation,
Expand Down Expand Up @@ -42,7 +43,7 @@ def _evaluate_namespace(self, ns):
return backend.output_buffer_to_string()

def _evaluate_namespace_definition(self, api, ns):
# type: (ApiNamespace) -> typing.Text
# type: (Api, ApiNamespace) -> typing.Text
backend = self._mock_backend()
backend._generate_base_namespace_module(api, ns)
return backend.output_buffer_to_string()
Expand All @@ -66,11 +67,8 @@ def test_namespace_comments(self):

route_schema = self._mk_route_schema()

class ApiHolder(object):
pass

api = ApiHolder()
api.route_schema = route_schema
api = Api('0.0')
api.add_route_schema(route_schema)

result = self._evaluate_namespace_definition(api, ns)

Expand Down
27 changes: 9 additions & 18 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]

envlist = py{35,36,37,py3},check,lint,mypy,codecov
envlist = py{35,36,37,38,py3},test_unit,check,lint,mypy,codecov
skip_missing_interpreters = true


Expand All @@ -10,29 +10,23 @@ ignore = E128,E301,E302,E305,E402,W503,W504
max-line-length = 100


[travis]

python =
3.5: py35, mypy
3.6: py36, mypy
3.7: py37, lint, mypy
pypy3: pypy3, mypy


[testenv]
[testenv:test_unit]

commands =
python setup.py test {posargs}
pytest
deps =
zipp < 2.0.0 ; python_version <= "2.7"
-rtest/requirements.txt

[testenv:check]

commands =
python setup.py check -m -r -s -v
python setup.py bdist_wheel sdist
twine check dist/*

deps =
docutils
setuptools
wheel
twine

usedevelop = true

Expand All @@ -55,8 +49,6 @@ usedevelop = true

[testenv:mypy]

basepython = python3.6

commands =
./mypy-run.sh

Expand All @@ -74,5 +66,4 @@ commands =
coverage xml

deps =
pytest
-rtest/requirements.txt