-
-
Notifications
You must be signed in to change notification settings - Fork 323
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add requirements.txt files #244 * Add testcases to validate requirements.txt * update reqs and contrib guide * fix formatting for edit files
- Loading branch information
Showing
6 changed files
with
148 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
-i https://pypi.org/simple | ||
appdirs==1.4.3 | ||
astroid==2.3.3 | ||
async-asgi-testclient==1.4.4 | ||
async-generator==1.10 | ||
asyncmock==0.4.2 | ||
attrs==19.3.0 | ||
bandit==1.6.2 | ||
black==19.10b0 | ||
certifi==2019.11.28 | ||
chardet==3.0.4 | ||
click==7.1.1 | ||
coverage==5.0.4 | ||
coveralls==1.11.1 | ||
docopt==0.6.2 | ||
gitdb==4.0.2 | ||
gitpython==3.1.0 | ||
idna==2.9 | ||
importlib-metadata==1.6.0 ; python_version < '3.8' | ||
invoke==1.4.1 | ||
isort==4.3.21 | ||
lazy-object-proxy==1.4.3 | ||
mccabe==0.6.1 | ||
mock==4.0.2 | ||
more-itertools==8.2.0 | ||
multidict==4.7.5 | ||
packaging==20.3 | ||
pathspec==0.7.0 | ||
pbr==5.4.4 | ||
pluggy==0.13.1 | ||
py==1.8.1 | ||
pylint==2.4.4 | ||
pyparsing==2.4.6 | ||
pytest-asyncio==0.10.0 | ||
pytest-cov==2.8.1 | ||
pytest==5.4.1 | ||
pyyaml==5.3.1 | ||
regex==2020.2.20 | ||
requests==2.23.0 | ||
six==1.14.0 | ||
smmap==3.0.1 | ||
stevedore==1.32.0 | ||
toml==0.10.0 | ||
typed-ast==1.4.1 | ||
urllib3==1.25.8 | ||
wcwidth==0.1.9 | ||
wrapt==1.11.2 | ||
zipp==3.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
-i https://pypi.org/simple | ||
aiohttp==3.6.2 | ||
async-timeout==3.0.1 | ||
asyncache==0.1.1 | ||
attrs==19.3.0 | ||
cachetools==4.0.0 | ||
certifi==2019.11.28 | ||
chardet==3.0.4 | ||
click==7.1.1 | ||
dataclasses==0.6 ; python_version < '3.7' | ||
fastapi==0.53.2 | ||
gunicorn==20.0.4 | ||
h11==0.9.0 | ||
httptools==0.1.1 ; sys_platform != 'win32' and sys_platform != 'cygwin' and platform_python_implementation != 'PyPy' | ||
idna-ssl==1.1.0 ; python_version < '3.7' | ||
idna==2.9 | ||
multidict==4.7.5 | ||
pydantic==1.4 | ||
python-dateutil==2.8.1 | ||
python-dotenv==0.12.0 | ||
requests==2.23.0 | ||
six==1.14.0 | ||
starlette==0.13.2 | ||
urllib3==1.25.8 | ||
uvicorn==0.11.3 | ||
uvloop==0.14.0 ; sys_platform != 'win32' and sys_platform != 'cygwin' and platform_python_implementation != 'PyPy' | ||
websockets==8.1 | ||
yarl==1.4.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import subprocess | ||
|
||
|
||
def test_invoke_list(): | ||
"""Test invoke --list""" | ||
return_code = subprocess.call("invoke --list", shell=True) | ||
|
||
assert return_code == 0 | ||
|
||
|
||
def test_requirements_txt(): | ||
"""Validate that requirements.txt and requirements-dev.txt | ||
are up2date with Pipefile""" | ||
temp_output_dir = "tests/temp_output" | ||
req_test_file_path = "{}/test-requirements.txt".format(temp_output_dir) | ||
req_dev_test_file_path = "{}/test-requirements-dev.txt".format(temp_output_dir) | ||
|
||
return_code_0 = subprocess.call("mkdir -p {}".format(temp_output_dir), shell=True) | ||
return_code_1 = subprocess.call( | ||
"pipenv lock -r \ | ||
> {}".format( | ||
req_test_file_path | ||
), | ||
shell=True, | ||
) | ||
|
||
return_code_2 = subprocess.call( | ||
"pipenv lock -r --dev \ | ||
> {}".format( | ||
req_dev_test_file_path | ||
), | ||
shell=True, | ||
) | ||
|
||
with open("requirements.txt") as file: | ||
req_file = file.read() | ||
|
||
with open("requirements-dev.txt") as file: | ||
req_dev_file = file.read() | ||
|
||
with open(req_test_file_path) as file: | ||
req_test_file = file.read() | ||
|
||
with open(req_dev_test_file_path) as file: | ||
req_dev_test_file = file.read() | ||
|
||
return_code_z = subprocess.call("rm -rf {}".format(temp_output_dir), shell=True) | ||
|
||
assert req_file == req_test_file | ||
|
||
assert req_dev_file == req_dev_test_file |