From 39cf23be719de2dabd0a012a91e37d9b753e0abc Mon Sep 17 00:00:00 2001 From: 24_OskinEA <24_OskinEA@iux.local> Date: Mon, 7 Sep 2026 09:18:26 +0300 Subject: [PATCH] Configure project package --- .gitignore | 13 +++++++++++++ pyproject.toml | 40 ++++++++++++++++++++++++++++++++++++++++ requirements.txt | 4 ++++ 3 files changed, 57 insertions(+) create mode 100644 .gitignore create mode 100644 pyproject.toml create mode 100644 requirements.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b82f7d3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,13 @@ +.venv/ +.venv-test/ +__pycache__/ +*.py[cod] +.pytest_cache/ +.mypy_cache/ +.ruff_cache/ +.coverage +htmlcov/ +*.egg-info/ +dist/ +build/ +sample.txt diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..9f575a0 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,40 @@ +[build-system] +requires = ["setuptools>=68"] +build-backend = "setuptools.build_meta" + +[project] +name = "text-analyzer" +version = "1.0.0" +description = "A typed CLI tool for text file analysis" +requires-python = ">=3.12" +dependencies = [] + +[project.scripts] +text-analyzer = "text_analyzer.cli:main" + +[tool.setuptools] +package-dir = {"" = "src"} + +[tool.setuptools.packages.find] +where = ["src"] + +[tool.ruff] +line-length = 88 +target-version = "py312" +src = ["src", "tests"] + +[tool.ruff.lint] +select = ["E", "F", "I", "UP", "B"] + +[tool.ruff.format] +quote-style = "double" +indent-style = "space" + +[tool.mypy] +python_version = "3.12" +strict = true +mypy_path = "src" + +[tool.pytest.ini_options] +testpaths = ["tests"] +addopts = "--cov=text_analyzer.core --cov-report=term-missing --cov-fail-under=80" diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..ff87be9 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +mypy>=1.11 +ruff>=0.6 +pytest>=8.0 +pytest-cov>=5.0