Skip to content

change: pin test dependencies #2929

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

Merged
merged 12 commits into from
Feb 16, 2022
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ SageMaker Python SDK is tested on:
- Python 3.6
- Python 3.7
- Python 3.8
- Python 3.9

AWS Permissions
~~~~~~~~~~~~~~~
Expand Down
44 changes: 23 additions & 21 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def read_version():

# Declare minimal set for installation
required_packages = [
"attrs",
"attrs==20.3.0",
"boto3>=1.20.21",
"google-pasta",
"numpy>=1.9.0",
Expand All @@ -49,36 +49,38 @@ def read_version():
# Specific use case dependencies
extras = {
"local": [
"urllib3>=1.21.1,!=1.25,!=1.25.1",
"docker-compose>=1.25.2",
"docker==5.0.0",
"PyYAML>=5.3, <6", # PyYAML version has to match docker-compose requirements
"urllib3==1.26.8",
"docker-compose==1.29.2",
"docker~=5.0.0",
"PyYAML==5.4.1", # PyYAML version has to match docker-compose requirements
],
"scipy": ["scipy>=0.19.0"],
"scipy": ["scipy==1.5.4"],
}
# Meta dependency groups
extras["all"] = [item for group in extras.values() for item in group]
# Tests specific dependencies (do not need to be included in 'all')
extras["test"] = (
[
extras["all"],
"tox",
"flake8",
"pytest<6.1.0",
"pytest-cov",
"pytest-rerunfailures",
"pytest-timeout",
"tox==3.24.5",
"flake8==4.0.1",
"pytest==6.0.2",
"pytest-cov==3.0.0",
"pytest-rerunfailures==10.2",
"pytest-timeout==2.1.0",
"pytest-xdist==2.4.0",
"coverage<6.2",
"mock",
"contextlib2",
"awslogs",
"black",
"coverage>=5.2, <6.2",
"mock==4.0.3",
"contextlib2==21.6.0",
"awslogs==0.14.0",
"black==22.1.0",
"stopit==1.1.2",
"apache-airflow==1.10.11",
"fabric>=2.0",
"requests>=2.20.0, <3",
"sagemaker-experiments",
"apache-airflow==2.2.3",
"apache-airflow-providers-amazon==3.0.0",
"attrs==20.3.0",
"fabric==2.6.0",
"requests==2.27.1",
"sagemaker-experiments==0.1.35",
],
)

Expand Down
22 changes: 11 additions & 11 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ markers =
timeout: mark a test as a timeout.

[testenv]
pip_version = pip==20.2
pip_version = pip==21.3
passenv =
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
Expand All @@ -80,8 +80,8 @@ depends =
skipdist = true
skip_install = true
deps =
flake8
flake8-future-import
flake8==4.0.1
flake8-future-import==0.4.6
commands = flake8

[testenv:pylint]
Expand All @@ -106,7 +106,7 @@ commands =
# twine check was added starting in 1.12.0
# https://github.com/pypa/twine/blob/master/docs/changelog.rst
deps =
twine>=1.12.0
twine==3.8.0
# https://packaging.python.org/guides/making-a-pypi-friendly-readme/#validating-restructuredtext-markup
commands =
python setup.py sdist
Expand All @@ -118,23 +118,23 @@ changedir = doc
# having the requirements.txt installed in deps above results in Double Requirement exception
# https://github.com/pypa/pip/issues/988
deps =
pip==20.2
pip==21.3
commands =
pip install --exists-action=w -r requirements.txt
sphinx-build -T -W -b html -d _build/doctrees-readthedocs -D language=en . _build/html

[testenv:doc8]
deps =
doc8
Pygments
doc8==0.10.1
Pygments==2.11.2
commands = doc8

[testenv:black-format]
# Used during development (before committing) to format .py files.
setenv =
LC_ALL=C.UTF-8
LANG=C.UTF-8
deps = black
deps = black==22.1.0
commands =
black -l 100 ./

Expand All @@ -143,12 +143,12 @@ commands =
setenv =
LC_ALL=C.UTF-8
LANG=C.UTF-8
deps = black
deps = black==22.1.0
commands =
black -l 100 --check ./

[testenv:clean]
deps = coverage
deps = coverage==6.2
skip_install = true
commands = coverage erase

Expand All @@ -158,7 +158,7 @@ commands =
mypy src/sagemaker

[testenv:docstyle]
deps = pydocstyle
deps = pydocstyle==6.1.1
commands =
pydocstyle src/sagemaker

Expand Down