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

WIP: Issue-840 #841

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion hug/json_module.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os

HUG_USE_UJSON = bool(os.environ.get("HUG_USE_UJSON", 1))
HUG_USE_UJSON = os.environ.get("HUG_USE_UJSON", "false").lower() == 'true'
try: # pragma: no cover
if HUG_USE_UJSON:
import ujson as json
Expand Down
5 changes: 1 addition & 4 deletions requirements/build_common.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
-r common.txt
-r test.txt
flake8==3.5.0
pytest-cov==2.7.1
pytest==4.6.3
python-coveralls==2.9.2
wheel==0.33.4
PyJWT==1.7.1
pytest-xdist==1.29.0
numpy<1.16
8 changes: 5 additions & 3 deletions requirements/build_windows.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
-r common.txt
flake8==3.7.7
isort==4.3.20
marshmallow==2.18.1
pytest==4.6.3
wheel==0.33.4
pytest-xdist==1.29.0
numpy==1.15.4

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason for the reordering and blank lines? Just curious

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly as a visual aid as I was comparing requirements across files. I do like to have requirements having a similar purpose grouped together though, like the pytest requirements. I can remove the blank lines, or completely revert the file if you'd prefer.

pytest==4.6.3
pytest-xdist==1.29.0

marshmallow==2.18.1
18 changes: 9 additions & 9 deletions requirements/development.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
bumpversion==0.5.3
Cython==0.29.10

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And the reordering and blank lines in this file?

-r common.txt
flake8==3.7.7
ipython==7.5.0
isort==4.3.20
pytest-cov==2.7.1
pytest==4.6.3
python-coveralls==2.9.2
-r test.txt
tox==3.12.1
flake8==3.7.7
wheel
pytest-xdist==1.29.0
marshmallow==2.18.1
ujson==1.35
numpy<1.16

marshmallow==2.18.1

isort==4.3.20

ipython==7.5.0
ujson==1.35
1 change: 1 addition & 0 deletions requirements/marshmallow2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
marshmallow<3.0
1 change: 1 addition & 0 deletions requirements/marshmallow3.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
marshmallow==3.0.0rc6
4 changes: 4 additions & 0 deletions requirements/test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
pytest==4.6.3
pytest-cov==2.7.1
pytest-xdist==1.29.0
python-coveralls==2.9.2
29 changes: 19 additions & 10 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,33 @@ envlist=py{35,36,37,38,py3}-marshmallow{2,3}, cython-marshmallow{2,3}
[testenv]
deps=
-rrequirements/build_common.txt
marshmallow2: marshmallow <3.0
marshmallow3: marshmallow==3.0.0rc6
marshmallow2: -rrequirements/marshmallow2.txt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appreciate the cleanup in this file. Really want your PR merged for this.

marshmallow3: -rrequirements/marshmallow3.txt

whitelist_externals=flake8
commands=py.test --durations 3 --cov-report html --cov hug -n auto tests

[testdevelopment]
deps=
-rrequirements/development.txt
marshmallow2: -rrequirements/marshmallow2.txt
marshmallow3: -rrequirements/marshmallow3.txt

whitelist_externals=flake8
commands=py.test --durations 3 --cov-report html --cov hug -n auto tests

[testenv:py37-black]
deps=
-rrequirements/build_style_tools.txt
marshmallow==3.0.0rc6
-rrequirements/marshmallow3.txt

whitelist_externals=flake8
commands=black --check --verbose -l 100 hug

[testenv:py37-vulture]
deps=
-rrequirements/build_style_tools.txt
marshmallow==3.0.0rc6
-rrequirements/marshmallow3.txt

whitelist_externals=flake8
commands=vulture hug --min-confidence 100 --ignore-names req_succeeded
Expand All @@ -30,31 +39,31 @@ commands=vulture hug --min-confidence 100 --ignore-names req_succeeded
[testenv:py37-flake8]
deps=
-rrequirements/build_style_tools.txt
marshmallow==3.0.0rc6
-rrequirements/marshmallow3.txt

whitelist_externals=flake8
commands=flake8 hug

[testenv:py37-bandit]
deps=
-rrequirements/build_style_tools.txt
marshmallow==3.0.0rc6
-rrequirements/marshmallow3.txt

whitelist_externals=flake8
commands=bandit -r hug/ -ll

[testenv:py37-isort]
deps=
-rrequirements/build_style_tools.txt
marshmallow==3.0.0rc6
-rrequirements/marshmallow3.txt

whitelist_externals=flake8
commands=isort -c --diff --recursive hug

[testenv:py37-safety]
deps=
-rrequirements/build_style_tools.txt
marshmallow==3.0.0rc6
-rrequirements/marshmallow3.txt

whitelist_externals=flake8
commands=safety check -i 36810
Expand All @@ -65,5 +74,5 @@ basepython = {env:PYTHON:}\python.exe
commands=py.test hug -n auto tests

[testenv:cython]
deps=Cython
-rrequirements/build.txt
deps=-rrequirements/build.txt
Cython