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

chore: simpler tox.ini, declare dev deps in pyproject.toml #1205

Closed
wants to merge 16 commits into from
Closed
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
11 changes: 10 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,17 @@ dependencies = [
"hvac",
"packaging",
"typing-extensions>=4.5.0",
"backports.strenum>=1.3.1",
'backports.strenum>=1.3.1; python_version < "3.11"',
]
[project.optional-dependencies]
dev = [
"typing-inspect",
"pytest",
"pytest-asyncio",
"Twine",
"setuptools", # ?
"pylxd",
]
dimaqq marked this conversation as resolved.
Show resolved Hide resolved

[project.urls]
"Homepage" = "https://juju.is/docs/sdk"
Expand Down
12 changes: 11 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,18 @@
"hvac",
"packaging",
"typing-extensions>=4.5.0",
"backports.strenum",
'backports.strenum>=1.3.1; python_version < "3.11"',
],
extras_require={
"dev": [
"typing-inspect",
"pytest",
"pytest-asyncio",
"Twine",
"setuptools", # ?
"pylxd",
]
},
include_package_data=True,
maintainer="Juju Ecosystem Engineering",
maintainer_email="[email protected]",
Expand Down
34 changes: 5 additions & 29 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,15 @@ envlist = py3,py38,py39,py310,py311,docs
skipsdist=True

[testenv]
usedevelop=True
commands =
pip install urllib3<2
pip install pylxd
pytest --tb native -s -k 'not integration' -m 'not serial' {posargs}
use_develop = True
# This should work, but doesn't. Hence the deps= below
# extras = dev
deps =
.[dev]
passenv =
HOME
TEST_AGENTS
LXD_DIR
# FIXME would it be easier to `pip install -e .`?
deps =
macaroonbakery
toposort
typing-inspect
paramiko
ipdb
pytest
pytest-asyncio
Twine
websockets<14.0
kubernetes<31.0.0
hvac
packaging
setuptools
backports.strenum

[testenv:docs]
deps =
Expand All @@ -47,8 +31,6 @@ commands =
[testenv:integration]
envdir = {toxworkdir}/py3
commands =
pip install urllib3<2
pip install pylxd
pytest \
--tb native \
-k 'integration' \
Expand All @@ -60,8 +42,6 @@ commands =
[testenv:integration-quarantine]
envdir = {toxworkdir}/py3
commands =
pip install urllib3<2
pip install pylxd
pytest \
--tb native \
-m 'not serial' \
Expand All @@ -72,8 +52,6 @@ commands =
[testenv:unit]
envdir = {toxworkdir}/py3
commands =
pip install urllib3<2
pip install pylxd
pytest {toxinidir}/tests/unit {posargs}

[testenv:serial]
Expand All @@ -82,8 +60,6 @@ commands =
# it doesn't get run in CI
envdir = {toxworkdir}/py3
commands =
pip install urllib3<2
pip install pylxd
pytest --tb native -s {posargs:-m 'serial'}

[testenv:validate]
Expand Down
Loading