From 3b152150c808b806bd269dd67c4fe76dc43e93be Mon Sep 17 00:00:00 2001 From: Rafael Dias Date: Wed, 26 Apr 2023 10:57:56 +0100 Subject: [PATCH] Adds taskipy and complete readme --- README.md | 18 +++++++ poetry.lock | 44 +++++++++++++++++- .../string_ends_with.cpython-311.pyc | Bin 715 -> 1079 bytes pyproject.toml | 16 ++++++- 4 files changed, 75 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e69de29..2b173fc 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,18 @@ +# My codewars katas +[![Codewars](https://www.codewars.com/users/gracia-dias/badges/large)](https://www.codewars.com/users/gracia-dias) + +## Install poetry virtual environment +```bash +$ poetry install +``` + +### Run tests with pytest and coverage +```bash +$ poetry run task simple_test +``` + +### Run tests with pytest, coverage, linting, type checking, formatting, and complexity analysis +```bash +$ poetry run task test +``` + diff --git a/poetry.lock b/poetry.lock index e39a13e..73315c7 100644 --- a/poetry.lock +++ b/poetry.lock @@ -927,6 +927,18 @@ files = [ {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"}, ] +[[package]] +name = "mslex" +version = "0.3.0" +description = "shlex for windows" +category = "dev" +optional = false +python-versions = ">=3.5" +files = [ + {file = "mslex-0.3.0-py2.py3-none-any.whl", hash = "sha256:380cb14abf8fabf40e56df5c8b21a6d533dc5cbdcfe42406bbf08dda8f42e42a"}, + {file = "mslex-0.3.0.tar.gz", hash = "sha256:4a1ac3f25025cad78ad2fe499dd16d42759f7a3801645399cce5c404415daa97"}, +] + [[package]] name = "munch" version = "2.5.0" @@ -1808,6 +1820,36 @@ pure-eval = "*" [package.extras] tests = ["cython", "littleutils", "pygments", "pytest", "typeguard"] +[[package]] +name = "taskipy" +version = "1.10.4" +description = "tasks runner for python projects" +category = "dev" +optional = false +python-versions = ">=3.6,<4.0" +files = [ + {file = "taskipy-1.10.4-py3-none-any.whl", hash = "sha256:b96245d7f2956d36821435acaa822143ef6d2ff6cfecc48cf0a48c4b95456c14"}, + {file = "taskipy-1.10.4.tar.gz", hash = "sha256:0006429f708f530fc7add28ca51fd41f6c6e1fbe86763ff05125e1af3e8bdc7e"}, +] + +[package.dependencies] +colorama = ">=0.4.4,<0.5.0" +mslex = {version = ">=0.3.0,<0.4.0", markers = "sys_platform == \"win32\""} +psutil = ">=5.7.2,<6.0.0" +tomli = {version = ">=2.0.1,<3.0.0", markers = "python_version >= \"3.7\" and python_version < \"4.0\""} + +[[package]] +name = "tomli" +version = "2.0.1" +description = "A lil' TOML parser" +category = "dev" +optional = false +python-versions = ">=3.7" +files = [ + {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, + {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, +] + [[package]] name = "tornado" version = "6.3.1" @@ -1911,4 +1953,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "^3.11" -content-hash = "3246dc80d8138cc0022fb6ea1562bb54c2eae3a37dd9988c0953197f375b4146" +content-hash = "ca7d14738ce6748851cf43a16cec73ad2b0431c892d79a30c63cceaa958db004" diff --git a/py_codewars/__pycache__/string_ends_with.cpython-311.pyc b/py_codewars/__pycache__/string_ends_with.cpython-311.pyc index b5f1e38b5975f0d5cae2bd1366f2d6bb1f5dc6cf..d385e6b654dd591b540a1165c19b208255d67e69 100644 GIT binary patch delta 612 zcma)3J4*vW5T3m|&od^PDrFeUfCj-XBta}B2#RQIY>qR#F-IN;dmFTig_Vtpg_d?| zY2}ZwQAl;If8a#0uyXd|0}IiC{boLP9^dTVkKH*dSD8!-$g0mZJ~RNHH2F09BY4SE za1I={fiuClLB|wE)8^KpwQcgTO(@v6(rEG70;WQ!j6d%KY>h3d=R*(s|Hycq_t zk#MZbzCgc;IvFW9#64fNbVOCNC_16QWsk6!N+H?0C%vvvLWT*Q`?7>4T}l`#nNVF& zZwbw*8>#>sEzuaXi^=V12L6@a*7AIXeu$nzMeV2%gOTJ9RikBoNJ>WR1VN|tEoHRp z;(wOa(hDqd^pofpDHxLe1f)rD_R3ZV4h2~{VUFMc;yk3Y$CabXMecDDhm-hV;S1fs zTEU9OU6%(9*NseiiOABbq^`dKIYCa26TCU)ZovB;QI%6f>4zX(B8W}KSZt)36@!NS XG@ChDi06U)r5S5?O;_Z8g=EM(DQcf} delta 245 zcmdnaahla;IWI340}$+f?~yW%k%8echyw#aJ{Wu!08-N#QW&BbQW#qpq8L+{f*CZK zH+qFKPTtDsA?v5fc#9)7FQvFVvm`^4=@v^#YDLK{HlRpmUixHfX5V^tpaCF5iba4# z1H%n&{(jpo+ZkdPxfQN(D_mev_zVAQ$AeVhteiftit!@dFbNBg+Q{5Fy9NsQ7^amEZ*N!A1c9-q$wJ diff --git a/pyproject.toml b/pyproject.toml index 33be29b..42ba156 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,6 +13,11 @@ python = "^3.11" [tool.poetry.group.dev.dependencies] pytest = "^7.3.1" pytest-cov = "^4.0.0" +taskipy = "^1.10.4" +isort = "^5.12.0" +mypy = "^1.2.0" +black = "^23.3.0" +flake8 = "^6.0.0" [tool.poetry.group.loc.dependencies] @@ -28,5 +33,12 @@ prospect = "^0.1.0" requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" -[tool.flake8] -max-line-length = 120 +[tool.taskipy.tasks] +conde_style = "black . && isort . 120" +flake8 = "flake8 ." +mypy = "mypy . --ignore-missing-imports" +pre_test = "task conde_style && task flake8 && task mypy && prospect ." +test = "pytest -s -x --cov=py_codewars -vv" +post_test = "coverage html" +show_coverage = "firefox htmlcov/index.html" +simple_test = "pytest -s -x --cov=py_codewars -vv"