[project]
name = "lms"
authors = [
    { name = "Frappe Technologies Pvt Ltd", email = "developers@frappe.io"}
]
description = "Easy to use, open source, Learning Management System"
requires-python = ">=3.10"
readme = "README.md"
dynamic = ["version"]
dependencies = [
    # core dependencies
    "websocket_client~=1.6.4",
    "markdown~=3.5.1",
    "beautifulsoup4>=4.12,<4.14",
    "lxml~=6.0.2",
    "cairocffi==1.5.1",
    "razorpay~=1.4.1",
    "fuzzywuzzy~=0.18.0",
]

[build-system]
requires = ["flit_core >=3.4,<4"]
build-backend = "flit_core.buildapi"

[tool.isort]
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
ensure_newline_before_comments = true
indent = "\t"

[deploy.dependencies.apt]
packages = [
    "libxml2-dev",
    "libxslt1-dev",
]

[tool.ruff]
line-length = 110
target-version = "py310"

[tool.ruff.lint]
select = [
    "F",
    "E",
    "W",
    "I",
    "UP",
    "B",
]
ignore = [
    "B017", # assertRaises(Exception) - should be more specific
    "B018", # useless expression, not assigned to anything
    "B023", # function doesn't bind loop variable - will have last iteration's value
    "B904", # raise inside except without from
    "E101", # indentation contains mixed spaces and tabs
    "E402", # module level import not at top of file
    "E501", # line too long
    "E741", # ambiguous variable name
    "F401", # "unused" imports
    "F403", # can't detect undefined names from * import
    "F405", # can't detect undefined names from * import
    "F722", # syntax error in forward type annotation
    "F821", # undefined name
    "W191", # indentation contains tabs
]

[tool.ruff.format]
quote-style = "double"
indent-style = "tab"
docstring-code-format = true

[tool.bench.frappe-dependencies]
frappe = ">=14.0.0,<=17.0.0-dev"
payments = ">=0.0.1,<1.0.0"

[tool.bench.assets]
build_dir = "./frontend"
out_dir = "../lms/public/frontend"
index_html_path = "../lms/www/_lms.html"


[project.urls]
Homepage = "https://frappe.io/learning"
Repository = "https://github.com/frappe/lms.git"
"Bug Reports" = "https://github.com/frappe/lms/issues"

