From 6cd2205f1f600a8d03d0ab898c6e7d0b72cfac3f Mon Sep 17 00:00:00 2001 From: Curtis Castrapel Date: Thu, 12 Apr 2018 08:52:47 -0700 Subject: [PATCH 1/4] up-reqs --- Makefile | 8 ++++---- lemur/common/schema.py | 2 +- lemur/migrations/alembic.ini | 2 +- requirements-dev.txt | 10 ++++++---- requirements-docs.txt | 5 +++-- requirements-tests.txt | 19 +++++++++++++------ requirements.txt | 14 ++++++++++---- 7 files changed, 38 insertions(+), 22 deletions(-) diff --git a/Makefile b/Makefile index d3d3ecc2..92181461 100644 --- a/Makefile +++ b/Makefile @@ -110,10 +110,10 @@ ifndef VIRTUAL_ENV endif @echo "--> Updating Python requirements" pip install --upgrade pip-tools - pip-compile --output-file requirements-docs.txt requirements-docs.in -U - pip-compile --output-file requirements-dev.txt requirements-dev.in -U - pip-compile --output-file requirements-tests.txt requirements-tests.in -U - pip-compile --output-file requirements.txt requirements.in -U + pip-compile --output-file requirements-docs.txt requirements-docs.in -U --no-index + pip-compile --output-file requirements-dev.txt requirements-dev.in -U --no-index + pip-compile --output-file requirements-tests.txt requirements-tests.in -U --no-index + pip-compile --output-file requirements.txt requirements.in -U --no-index @echo "--> Done updating Python requirements" @echo "--> Installing new dependencies" pip install -e . diff --git a/lemur/common/schema.py b/lemur/common/schema.py index 1e081f8c..940f267c 100644 --- a/lemur/common/schema.py +++ b/lemur/common/schema.py @@ -148,7 +148,7 @@ def validate_schema(input_schema, output_schema): request_data = request.get_json() else: request_data = request.args - + print(data) data, errors = input_schema.load(request_data) if errors: diff --git a/lemur/migrations/alembic.ini b/lemur/migrations/alembic.ini index f8ed4801..6c3428e7 100644 --- a/lemur/migrations/alembic.ini +++ b/lemur/migrations/alembic.ini @@ -8,7 +8,7 @@ # the 'revision' command, regardless of autogenerate # revision_environment = false - +script_location = . # Logging configuration [loggers] keys = root,sqlalchemy,alembic diff --git a/requirements-dev.txt b/requirements-dev.txt index 1b11eb2b..9c2d4400 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -2,15 +2,17 @@ # This file is autogenerated by pip-compile # To update, run: # -# pip-compile --output-file requirements-dev.txt requirements-dev.in +# pip-compile --no-index --output-file requirements-dev.txt requirements-dev.in # -aspy.yaml==1.0.0 # via pre-commit +aspy.yaml==1.1.0 # via pre-commit cached-property==1.4.2 # via pre-commit certifi==2018.1.18 # via requests cfgv==1.0.0 # via pre-commit chardet==3.0.4 # via requests +configparser==3.5.0 # via flake8 +enum34==1.1.6 # via flake8 flake8==3.5.0 -identify==1.0.9 # via pre-commit +identify==1.0.11 # via pre-commit idna==2.6 # via requests invoke==0.22.1 mccabe==0.6.1 # via flake8 @@ -23,7 +25,7 @@ pyyaml==3.12 # via aspy.yaml, pre-commit requests-toolbelt==0.8.0 # via twine requests==2.18.4 # via requests-toolbelt, twine six==1.11.0 # via cfgv, pre-commit -tqdm==4.21.0 # via twine +tqdm==4.22.0 # via twine twine==1.11.0 urllib3==1.22 # via requests virtualenv==15.2.0 # via pre-commit diff --git a/requirements-docs.txt b/requirements-docs.txt index 35fce72b..a11881c2 100644 --- a/requirements-docs.txt +++ b/requirements-docs.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile # To update, run: # -# pip-compile --output-file requirements-docs.txt requirements-docs.in +# pip-compile --no-index --output-file requirements-docs.txt requirements-docs.in # alabaster==0.7.10 # via sphinx babel==2.5.3 # via sphinx @@ -16,7 +16,7 @@ markupsafe==1.0 # via jinja2 packaging==17.1 # via sphinx pygments==2.2.0 # via sphinx pyparsing==2.2.0 # via packaging -pytz==2018.3 # via babel +pytz==2018.4 # via babel requests==2.18.4 # via sphinx six==1.11.0 # via packaging, sphinx, sphinxcontrib-httpdomain snowballstemmer==1.2.1 # via sphinx @@ -24,4 +24,5 @@ sphinx-rtd-theme==0.3.0 sphinx==1.7.2 sphinxcontrib-httpdomain==1.6.1 sphinxcontrib-websupport==1.0.1 # via sphinx +typing==3.6.4 # via sphinx urllib3==1.22 # via requests diff --git a/requirements-tests.txt b/requirements-tests.txt index 9b359d72..b7b79fd4 100644 --- a/requirements-tests.txt +++ b/requirements-tests.txt @@ -2,14 +2,17 @@ # This file is autogenerated by pip-compile # To update, run: # -# pip-compile --output-file requirements-tests.txt requirements-tests.in +# pip-compile --no-index --output-file requirements-tests.txt requirements-tests.in # asn1crypto==0.24.0 # via cryptography attrs==17.4.0 # via pytest aws-xray-sdk==0.95 # via moto -boto3==1.7.3 # via moto +backports.ssl-match-hostname==3.5.0.1 # via docker +backports.tempfile==1.0 # via moto +backports.weakref==1.0.post1 # via backports.tempfile +boto3==1.7.4 # via moto boto==2.48.0 # via moto -botocore==1.10.3 # via boto3, moto, s3transfer +botocore==1.10.4 # via boto3, moto, s3transfer certifi==2018.1.18 # via requests cffi==1.11.5 # via cryptography chardet==3.0.4 # via requests @@ -20,22 +23,26 @@ cryptography==2.2.2 # via moto docker-pycreds==0.2.2 # via docker docker==3.2.1 # via moto docutils==0.14 # via botocore +enum34==1.1.6 # via cryptography factory-boy==2.10.0 -faker==0.8.12 +faker==0.8.13 flask==0.12.2 # via pytest-flask freezegun==0.3.10 +funcsigs==1.0.2 # via mock, pytest +futures==3.2.0 # via s3transfer idna==2.6 # via cryptography, requests +ipaddress==1.0.19 # via cryptography, docker, faker itsdangerous==0.24 # via flask jinja2==2.10 # via flask, moto jmespath==0.9.3 # via boto3, botocore jsondiff==1.1.1 # via moto jsonpickle==0.9.6 # via aws-xray-sdk markupsafe==1.0 # via jinja2 -mock==2.0.0 # via moto +mock==2.0.0 # via moto, pytest-mock more-itertools==4.1.0 # via pytest moto==1.3.1 nose==1.3.7 -pbr==4.0.1 # via mock +pbr==4.0.2 # via mock pluggy==0.6.0 # via pytest py==1.5.3 # via pytest pyaml==17.12.1 # via moto diff --git a/requirements.txt b/requirements.txt index 1018354f..2f7c9458 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile # To update, run: # -# pip-compile --output-file requirements.txt requirements.in +# pip-compile --no-index --output-file requirements.txt requirements.in # acme==0.23.0 alembic-autogenerate-enums==0.0.2 @@ -10,14 +10,17 @@ alembic==0.9.9 # via flask-migrate aniso8601==3.0.0 # via flask-restful arrow==0.12.1 asn1crypto==0.24.0 # via cryptography +backports.functools-lru-cache==1.5 # via arrow bcrypt==3.1.4 # via flask-bcrypt, paramiko blinker==1.4 # via flask-mail, flask-principal, raven -boto3==1.7.3 -botocore==1.10.3 # via boto3, s3transfer +boto3==1.7.4 +botocore==1.10.4 # via boto3, s3transfer cffi==1.11.5 # via bcrypt, cryptography, pynacl click==6.7 # via flask +contextlib2==0.5.5 # via raven cryptography==2.2.2 docutils==0.14 # via botocore +enum34==1.1.6 # via cryptography flask-bcrypt==0.7.1 flask-cors==3.0.3 flask-mail==0.9.1 @@ -27,10 +30,13 @@ flask-restful==0.3.6 flask-script==2.0.6 flask-sqlalchemy==2.3.2 flask==0.12 +funcsigs==1.0.2 # via mock future==0.16.0 +futures==3.2.0 # via s3transfer gunicorn==19.7.1 idna==2.6 # via cryptography inflection==0.3.1 +ipaddress==1.0.19 # via cryptography itsdangerous==0.24 # via flask jinja2==2.10 jmespath==0.9.3 # via boto3, botocore @@ -43,7 +49,7 @@ marshmallow==2.15.0 mock==2.0.0 # via acme ndg-httpsclient==0.4.4 paramiko==2.4.1 -pbr==4.0.1 # via mock +pbr==4.0.2 # via mock pem==17.1.0 psycopg2==2.7.4 pyasn1-modules==0.2.1 # via python-ldap From acb1eab24eccc05a7b0eea0c397ebaf68f1cd581 Mon Sep 17 00:00:00 2001 From: Curtis Castrapel Date: Thu, 12 Apr 2018 08:58:04 -0700 Subject: [PATCH 2/4] fix_errors --- lemur/common/schema.py | 2 +- lemur/migrations/alembic.ini | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lemur/common/schema.py b/lemur/common/schema.py index 940f267c..51e257c7 100644 --- a/lemur/common/schema.py +++ b/lemur/common/schema.py @@ -148,7 +148,7 @@ def validate_schema(input_schema, output_schema): request_data = request.get_json() else: request_data = request.args - print(data) + data, errors = input_schema.load(request_data) if errors: diff --git a/lemur/migrations/alembic.ini b/lemur/migrations/alembic.ini index 6c3428e7..b2e42cfa 100644 --- a/lemur/migrations/alembic.ini +++ b/lemur/migrations/alembic.ini @@ -8,7 +8,6 @@ # the 'revision' command, regardless of autogenerate # revision_environment = false -script_location = . # Logging configuration [loggers] keys = root,sqlalchemy,alembic From c88c0b0127954e31bef0485598d9d1f828b6dcd6 Mon Sep 17 00:00:00 2001 From: Curtis Castrapel Date: Thu, 12 Apr 2018 08:59:06 -0700 Subject: [PATCH 3/4] fix_changes --- lemur/common/schema.py | 2 +- lemur/migrations/alembic.ini | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lemur/common/schema.py b/lemur/common/schema.py index 51e257c7..1e081f8c 100644 --- a/lemur/common/schema.py +++ b/lemur/common/schema.py @@ -148,7 +148,7 @@ def validate_schema(input_schema, output_schema): request_data = request.get_json() else: request_data = request.args - + data, errors = input_schema.load(request_data) if errors: diff --git a/lemur/migrations/alembic.ini b/lemur/migrations/alembic.ini index b2e42cfa..f8ed4801 100644 --- a/lemur/migrations/alembic.ini +++ b/lemur/migrations/alembic.ini @@ -8,6 +8,7 @@ # the 'revision' command, regardless of autogenerate # revision_environment = false + # Logging configuration [loggers] keys = root,sqlalchemy,alembic From f302408712d17d396c79935088a89ac2e410b463 Mon Sep 17 00:00:00 2001 From: Curtis Castrapel Date: Thu, 12 Apr 2018 12:34:08 -0700 Subject: [PATCH 4/4] py3 --- requirements-dev.txt | 2 -- requirements-docs.txt | 1 - requirements-tests.txt | 9 +-------- requirements.txt | 6 ------ 4 files changed, 1 insertion(+), 17 deletions(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 9c2d4400..f94fa610 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -9,8 +9,6 @@ cached-property==1.4.2 # via pre-commit certifi==2018.1.18 # via requests cfgv==1.0.0 # via pre-commit chardet==3.0.4 # via requests -configparser==3.5.0 # via flake8 -enum34==1.1.6 # via flake8 flake8==3.5.0 identify==1.0.11 # via pre-commit idna==2.6 # via requests diff --git a/requirements-docs.txt b/requirements-docs.txt index a11881c2..a8b93db2 100644 --- a/requirements-docs.txt +++ b/requirements-docs.txt @@ -24,5 +24,4 @@ sphinx-rtd-theme==0.3.0 sphinx==1.7.2 sphinxcontrib-httpdomain==1.6.1 sphinxcontrib-websupport==1.0.1 # via sphinx -typing==3.6.4 # via sphinx urllib3==1.22 # via requests diff --git a/requirements-tests.txt b/requirements-tests.txt index b7b79fd4..4113ad2a 100644 --- a/requirements-tests.txt +++ b/requirements-tests.txt @@ -7,9 +7,6 @@ asn1crypto==0.24.0 # via cryptography attrs==17.4.0 # via pytest aws-xray-sdk==0.95 # via moto -backports.ssl-match-hostname==3.5.0.1 # via docker -backports.tempfile==1.0 # via moto -backports.weakref==1.0.post1 # via backports.tempfile boto3==1.7.4 # via moto boto==2.48.0 # via moto botocore==1.10.4 # via boto3, moto, s3transfer @@ -23,22 +20,18 @@ cryptography==2.2.2 # via moto docker-pycreds==0.2.2 # via docker docker==3.2.1 # via moto docutils==0.14 # via botocore -enum34==1.1.6 # via cryptography factory-boy==2.10.0 faker==0.8.13 flask==0.12.2 # via pytest-flask freezegun==0.3.10 -funcsigs==1.0.2 # via mock, pytest -futures==3.2.0 # via s3transfer idna==2.6 # via cryptography, requests -ipaddress==1.0.19 # via cryptography, docker, faker itsdangerous==0.24 # via flask jinja2==2.10 # via flask, moto jmespath==0.9.3 # via boto3, botocore jsondiff==1.1.1 # via moto jsonpickle==0.9.6 # via aws-xray-sdk markupsafe==1.0 # via jinja2 -mock==2.0.0 # via moto, pytest-mock +mock==2.0.0 # via moto more-itertools==4.1.0 # via pytest moto==1.3.1 nose==1.3.7 diff --git a/requirements.txt b/requirements.txt index 2f7c9458..5e8ef031 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,17 +10,14 @@ alembic==0.9.9 # via flask-migrate aniso8601==3.0.0 # via flask-restful arrow==0.12.1 asn1crypto==0.24.0 # via cryptography -backports.functools-lru-cache==1.5 # via arrow bcrypt==3.1.4 # via flask-bcrypt, paramiko blinker==1.4 # via flask-mail, flask-principal, raven boto3==1.7.4 botocore==1.10.4 # via boto3, s3transfer cffi==1.11.5 # via bcrypt, cryptography, pynacl click==6.7 # via flask -contextlib2==0.5.5 # via raven cryptography==2.2.2 docutils==0.14 # via botocore -enum34==1.1.6 # via cryptography flask-bcrypt==0.7.1 flask-cors==3.0.3 flask-mail==0.9.1 @@ -30,13 +27,10 @@ flask-restful==0.3.6 flask-script==2.0.6 flask-sqlalchemy==2.3.2 flask==0.12 -funcsigs==1.0.2 # via mock future==0.16.0 -futures==3.2.0 # via s3transfer gunicorn==19.7.1 idna==2.6 # via cryptography inflection==0.3.1 -ipaddress==1.0.19 # via cryptography itsdangerous==0.24 # via flask jinja2==2.10 jmespath==0.9.3 # via boto3, botocore