diff --git a/.gitignore b/.gitignore index 20ada4f..70c993a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,9 @@ +.coverage +dist docs/.build/ +.mypy_cache +.pytest_cache +.tox +**egg-info **.pyc **__pycache__ -**.mypy_cache -**.pytest_cache -.coverage diff --git a/pyproject.toml b/pyproject.toml index 5071e86..03d4046 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] -requires = ["poetry_core"] -build-backend = "poetry.core.masonry.api" +requires = ["poetry>=0.12"] +build-backend = "poetry.masonry.api" [tool.poetry] @@ -21,9 +21,6 @@ classifiers = [ "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: System :: Systems Administration :: Authentication/Directory" ] -packages = [ - { include = "src/pyrad3"}, -] include = [ "LICENSE-APACHE", "LICENSE-MIT", @@ -34,6 +31,7 @@ include = [ [tool.poetry.urls] repository = "https://github.com/pyradius/pyrad3" + [tool.poetry.dependencies] python = "^3.7" @@ -43,6 +41,8 @@ black = "^19.3.10b0" pytest = "^5.4" pytest-black = "^0.3.10" pytest-cov = "^2.10" +pytest-flake8 = "^1.0" +pytest-isort = "^1.1.0" pytest-mypy = "^0.6" pytest-pylint = "^0.17" @@ -53,12 +53,27 @@ include = '\.py' [tool.isort] -multi_line_output = 3 -include_trailing_comma = true -use_parentheses = true -line_length = 88 combine_as_imports = true +include_trailing_comma = true +line_length = 88 +multi_line_output = 3 +use_parentheses = true [tool.pylint.messages_control] disable = "bad-continuation" + + +[tool.tox] +legacy_tox_ini = """ +[tox] +envlist = py37,py38 +isolated_build = True +[testenv] +# whitelist_externals = poetry +deps = + poetry +commands = + poetry install -v + poetry run pytest --black --isort --pylint --pylint-jobs=4 --mypy --flake8 --cov=pyrad3 +""" diff --git a/shell.nix b/shell.nix index b705fa4..3c7d0e1 100644 --- a/shell.nix +++ b/shell.nix @@ -5,6 +5,8 @@ pkgs.mkShell { buildInputs = with pkgs; [ git nixfmt + pkgs.python37 + pkgs.python38 pkgs.python3 pkgs.python3Packages.coveralls pkgs.python3Packages.black @@ -16,6 +18,7 @@ pkgs.mkShell { pkgs.python3Packages.pytest-isort pkgs.python3Packages.pytest-mypy pkgs.python3Packages.pytest-pylint + pkgs.python3Packages.tox ]; shellHook = ''