Skip to content

Commit

Permalink
chore: simpler tox.ini
Browse files Browse the repository at this point in the history
  • Loading branch information
dimaqq committed Nov 22, 2024
1 parent bc881e4 commit 35499f4
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 31 deletions.
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",
]

[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

0 comments on commit 35499f4

Please sign in to comment.