Skip to content

Fix tox installs #4603

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 3 commits into from
Apr 22, 2024
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
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[tool.black]
line-length = 100
1 change: 1 addition & 0 deletions requirements/tox/black_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
black==24.3.0
2 changes: 1 addition & 1 deletion requirements/tox/twine_requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
twine==3.8.0
twine==5.0.0
37 changes: 28 additions & 9 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -100,28 +100,33 @@ commands =
[testenv:flake8]
skipdist = true
skip_install = true
deps =
-r requirements/tox/flake8_requirements.txt
commands =
pip install --exists-action=w -r requirements/tox/flake8_requirements.txt
flake8

[testenv:pylint]
skipdist = true
skip_install = true
deps =
-r requirements/tox/pylint_requirements.txt
commands =
pip install --exists-action=w -r requirements/tox/pylint_requirements.txt
python -m pylint --rcfile=.pylintrc -j 0 src/sagemaker

[testenv:spelling]
skipdist = true
skip_install = true
deps =
-r requirements/tox/spelling_requirements.txt
commands =
pip install --exists-action=w -r requirements/tox/spelling_requirements.txt
python -m pylint --rcfile=.pylintrc --disable all --enable spelling --spelling-dict en_US src/sagemaker/{posargs}

[testenv:twine]
# https://packaging.python.org/guides/making-a-pypi-friendly-readme/#validating-restructuredtext-markup
skip_install = true
deps =
-r requirements/tox/twine_requirements.txt
commands =
pip install --exists-action=w -r requirements/tox/twine_requirements.txt
python setup.py sdist
twine check dist/*.tar.gz

Expand All @@ -136,39 +141,53 @@ commands =
sphinx-build -T -W -b html -d _build/doctrees-readthedocs -D language=en . _build/html

[testenv:doc8]
deps =
-r requirements/tox/doc8_requirements.txt
commands =
pip install --exists-action=w -r requirements/tox/doc8_requirements.txt
doc8 --ignore-path tests/data/serve_resources/mlflow/pytorch/data/pickle_module_info.txt

[testenv:black-format]
# Used during development (before committing) to format .py files.
skip_install = true
setenv =
LC_ALL=C.UTF-8
LANG=C.UTF-8
deps =
-r requirements/tox/black_requirements.txt
commands =
black -l 100 ./
black ./

[testenv:black-check]
# Used by automated build steps to check that all files are properly formatted.
skip_install = true
setenv =
LC_ALL=C.UTF-8
LANG=C.UTF-8
deps =
-r requirements/tox/black_requirements.txt
commands =
black -l 100 --diff --color --check ./
black --diff --color --check ./

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

[testenv:typing]
# Do not skip installation here, the extras are needed for mypy to get type info
skip_install = false
extras =
all
deps =
-r requirements/tox/mypy_requirements.txt
commands =
pip install --exists-action=w -r requirements/tox/mypy_requirements.txt
mypy src/sagemaker

[testenv:docstyle]
skip_install = true
deps =
-r requirements/tox/pydocstyle_requirements.txt
commands =
pip install --exists-action=w -r requirements/tox/pydocstyle_requirements.txt
pydocstyle src/sagemaker

[testenv:collect-tests]
Expand Down