From 6e45eb3d47a2c75ef02cabe7a15af899de7f0d4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20F=C3=B6ldh=C3=A1zi?= Date: Sun, 3 Mar 2024 02:47:56 +0100 Subject: [PATCH] Update dependencies in pyproject.toml and poetry.lock --- poetry.lock | 56 +++++++++++++++++++++++++++++++++++++++++++++++++- pyproject.toml | 9 ++++---- tox.ini | 45 +++++++++++++++++++++------------------- 3 files changed, 84 insertions(+), 26 deletions(-) diff --git a/poetry.lock b/poetry.lock index 8f6a85d..83cff43 100644 --- a/poetry.lock +++ b/poetry.lock @@ -168,6 +168,9 @@ files = [ {file = "coverage-7.4.3.tar.gz", hash = "sha256:276f6077a5c61447a48d133ed13e759c09e62aff0dc84274a68dc18660104d52"}, ] +[package.dependencies] +tomli = {version = "*", optional = true, markers = "python_full_version <= \"3.11.0a6\" and extra == \"toml\""} + [package.extras] toml = ["tomli"] @@ -493,6 +496,43 @@ tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} [package.extras] testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +[[package]] +name = "pytest-cov" +version = "4.1.0" +description = "Pytest plugin for measuring coverage." +optional = false +python-versions = ">=3.7" +files = [ + {file = "pytest-cov-4.1.0.tar.gz", hash = "sha256:3904b13dfbfec47f003b8e77fd5b589cd11904a21ddf1ab38a64f204d6a10ef6"}, + {file = "pytest_cov-4.1.0-py3-none-any.whl", hash = "sha256:6ba70b9e97e69fcc3fb45bfeab2d0a138fb65c4d0d6a41ef33983ad114be8c3a"}, +] + +[package.dependencies] +coverage = {version = ">=5.2.1", extras = ["toml"]} +pytest = ">=4.6" + +[package.extras] +testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtualenv"] + +[[package]] +name = "pytest-sugar" +version = "1.0.0" +description = "pytest-sugar is a plugin for pytest that changes the default look and feel of pytest (e.g. progressbar, show tests that fail instantly)." +optional = false +python-versions = "*" +files = [ + {file = "pytest-sugar-1.0.0.tar.gz", hash = "sha256:6422e83258f5b0c04ce7c632176c7732cab5fdb909cb39cca5c9139f81276c0a"}, + {file = "pytest_sugar-1.0.0-py3-none-any.whl", hash = "sha256:70ebcd8fc5795dc457ff8b69d266a4e2e8a74ae0c3edc749381c64b5246c8dfd"}, +] + +[package.dependencies] +packaging = ">=21.3" +pytest = ">=6.2.0" +termcolor = ">=2.1.0" + +[package.extras] +dev = ["black", "flake8", "pre-commit"] + [[package]] name = "rich" version = "13.7.1" @@ -511,6 +551,20 @@ pygments = ">=2.13.0,<3.0.0" [package.extras] jupyter = ["ipywidgets (>=7.5.1,<9)"] +[[package]] +name = "termcolor" +version = "2.4.0" +description = "ANSI color formatting for output in terminal" +optional = false +python-versions = ">=3.8" +files = [ + {file = "termcolor-2.4.0-py3-none-any.whl", hash = "sha256:9297c0df9c99445c2412e832e882a7884038a25617c60cea2ad69488d4040d63"}, + {file = "termcolor-2.4.0.tar.gz", hash = "sha256:aab9e56047c8ac41ed798fa36d892a37aca6b3e9159f3e0c24bc64a9b3ac7b7a"}, +] + +[package.extras] +tests = ["pytest", "pytest-cov"] + [[package]] name = "tomli" version = "2.0.1" @@ -615,4 +669,4 @@ test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess [metadata] lock-version = "2.0" python-versions = ">=3.10" -content-hash = "e128be6e966ce3115263519b89aeca2c3ad55e4433da370d19760ff49db3d2fc" +content-hash = "9ff46e334a10ff9fc0e0d0ef116674765e490d944093ca439145123ac70421f5" diff --git a/pyproject.toml b/pyproject.toml index 214b86f..2738211 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,12 +14,12 @@ packages = [{ include = "msps", from = "src" }, { include = "tests" }] [tool.poetry.dependencies] python = ">=3.10" rich = "^13.7.0" -typer = "^0.9.0" -coverage = "^7.4.3" -tox = "^4.13.0" [tool.poetry.group.test.dependencies] pytest = "^8.0.0" +typer = "^0.9.0" +coverage = "^7.4.3" +tox = "^4.13.0" [tool.poetry.group.typing.dependencies] mypy = "^1.8.0" @@ -27,9 +27,10 @@ mypy = "^1.8.0" [tool.poetry.group.lint.dependencies] pylint = "^3.0.3" - [tool.poetry.group.dev.dependencies] black = "^24.2.0" +pytest-sugar = "^1.0.0" +pytest-cov = "^4.1.0" [tool.poetry.scripts] msps = "msps.__main__:main" diff --git a/tox.ini b/tox.ini index 60b651e..896d4d9 100644 --- a/tox.ini +++ b/tox.ini @@ -1,28 +1,31 @@ [tox] -requires = - tox>=4 -env_list = lint, type, py{310,311,312} [testenv] description = run unit tests -deps = - pytest>=7 - pytest-cov - pytest-sugar +skip_install = true +allowlist_externals = poetry +commands_pre = + poetry install commands = - coverage run --branch --omit=tests/* --module pytest {posargs:tests} - coverage xml + poetry run pytest tests/ --import-mode importlib --cov=msps --cov-report=term-missing --cov-report=xml --cov-report=html -[testenv:lint] -description = run linters -skip_install = true -deps = - black==22.12 -commands = black {posargs:.} +; [testenv] +; +; deps = +; commands = +; coverage run --branch --omit=tests/* --module pytest {posargs:tests} +; coverage xml -[testenv:type] -description = run type checks -deps = - mypy>=0.991 -commands = - mypy {posargs:src tests} +; [testenv:lint] +; description = run linters +; skip_install = true +; deps = +; black==22.12 +; commands = black {posargs:.} + +; [testenv:type] +; description = run type checks +; deps = +; mypy>=0.991 +; commands = +; mypy {posargs:src tests}