|
| 1 | +# Build System |
| 2 | +[build-system] |
| 3 | +requires = ["hatchling"] |
| 4 | +build-backend = "hatchling.build" |
| 5 | + |
| 6 | +# Project Metadata |
| 7 | +[project] |
| 8 | +name = "pythonvilag_website" |
| 9 | +version = "0.0.1" |
| 10 | +description = "Pythonvilag website." |
| 11 | +readme = "README.md" |
| 12 | +requires-python = ">=3.11" |
| 13 | +license = { file = "LICENSE" } |
| 14 | +authors = [{ name = "Daniel Mizsak", email = "info@pythonvilag.hu" }] |
| 15 | +keywords = ["website", "tutorial", "flask", "pythonvilag"] |
| 16 | +classifiers = [ |
| 17 | + "License :: OSI Approved :: MIT License", |
| 18 | + "Programming Language :: Python :: 3.11", |
| 19 | + "Programming Language :: Python :: 3.12", |
| 20 | +] |
| 21 | +dependencies = [ |
| 22 | + "Flask-SQLAlchemy==3.1.1", |
| 23 | + "Flask-WTF==1.2.1", |
| 24 | + "Flask==3.0.2", |
| 25 | + "gunicorn==21.2.0", |
| 26 | + "itsdangerous==2.1.2", |
| 27 | + "python-dotenv==1.0.1", |
| 28 | + "SQLAlchemy==2.0.27", |
| 29 | + "Werkzeug==3.0.1", |
| 30 | + # Self maintained |
| 31 | + # "private-lecture-automation==0.2.0", |
| 32 | + # "checkmark==0.1.0", |
| 33 | +] |
| 34 | + |
| 35 | +[project.optional-dependencies] |
| 36 | +dev = ["mypy", "pre-commit", "pytest-cov", "pytest", "ruff", "tox"] |
| 37 | + |
| 38 | +[project.urls] |
| 39 | +Repository = "https://github.com/PythonVilag/pythonvilag-website/" |
| 40 | +Homepage = "https://pythonvilag.hu/" |
| 41 | + |
| 42 | +# Tools |
| 43 | +# MyPy |
| 44 | +[tool.mypy] |
| 45 | +exclude = ["^tests/"] |
| 46 | +ignore_missing_imports = true |
| 47 | +pretty = true |
| 48 | +show_column_numbers = true |
| 49 | +show_error_context = true |
| 50 | +strict = true |
| 51 | +warn_unreachable = true |
| 52 | +warn_unused_ignores = true |
| 53 | + |
| 54 | +# Pytest |
| 55 | +[tool.pytest.ini_options] |
| 56 | +addopts = "--cov=pythonvilag_website" |
| 57 | +testpaths = ["tests"] |
| 58 | + |
| 59 | +# Ruff |
| 60 | +[tool.ruff] |
| 61 | +select = ["ALL"] |
| 62 | +line-length = 120 |
| 63 | +src = ["src", "tests"] |
| 64 | +ignore = [ |
| 65 | + "D203", # one-blank-line-before-class |
| 66 | + "D212", # multi-line-summary-first-line |
| 67 | + "FIX", # flake8-fixme |
| 68 | + "INP", # flake8-no-pep420 |
| 69 | + "S104", # hardcoded-bind-all-interfaces |
| 70 | + "TD002", # missing-todo-author |
| 71 | + "TD003", # missing-todo-link |
| 72 | +] |
| 73 | +[tool.ruff.per-file-ignores] |
| 74 | +"**/__init__.py" = [ |
| 75 | + "D104", # undocumented-public-package |
| 76 | +] |
| 77 | +"tests/**/*.py" = [ |
| 78 | + "ANN001", # missing-type-function-argument |
| 79 | + "ANN201", # missing-return-type-undocumented-public-function |
| 80 | + "D", # pydocstyle |
| 81 | + "E501", # line-too-long |
| 82 | + "PLR2004", # magic-value-comparison |
| 83 | + "S101", # assert |
| 84 | +] |
| 85 | +[tool.ruff.pydocstyle] |
| 86 | +convention = "google" |
| 87 | + |
| 88 | +# Tox |
| 89 | +[tool.tox] |
| 90 | +legacy_tox_ini = """ |
| 91 | + [tox] |
| 92 | + envlist = py311,mypy,ruff |
| 93 | + skip-missing-interpreters = true |
| 94 | +
|
| 95 | + [gh] |
| 96 | + python = |
| 97 | + 3.11 = py311, mypy, ruff |
| 98 | +
|
| 99 | + [testenv] |
| 100 | + setenv = |
| 101 | + PV_SECRET_KEY = {env:PV_SECRET_KEY:SECRET} |
| 102 | + FLASK_DEBUG = {env:FLASK_DEBUG:False} |
| 103 | + PRIVATE_LECTURE_AUTOMATION = {env:PRIVATE_LECTURE_AUTOMATION:False} |
| 104 | + CHECKMARK = {env:CHECKMARK:False} |
| 105 | + deps = |
| 106 | + pytest |
| 107 | + pytest-cov |
| 108 | + commands = pytest {posargs:tests} |
| 109 | +
|
| 110 | + [testenv:mypy] |
| 111 | + basepython = python3.11 |
| 112 | + deps = mypy |
| 113 | + commands = mypy . |
| 114 | +
|
| 115 | + [testenv:ruff] |
| 116 | + basepython = python3.11 |
| 117 | + deps = ruff |
| 118 | + commands = ruff check . |
| 119 | +""" |
0 commit comments