[build-system]
requires = [
    "scikit-build-core",
    "cffi",
]
build-backend = "scikit_build_core.build"

[project]
name = "magnetron"
version = "0.1.2"
description = "High-performance, lightweight deep-learning library with a PyTorch like API and GPU support."
requires-python = ">=3.10"
readme = "README.md"
license = { file = "LICENSE" }
authors = [{ name = "Mario Sieg", email = "mario.sieg.64@gmail.com" }]
dependencies = ["cffi"]
keywords = [
    "machine-learning",
    "deep-learning",
    "neural-networks",
    "gpu",
    "simd",
]
[urls]
Homepage = "https://github.com/MarioSieg/magnetron"
Source = "https://github.com/MarioSieg/magnetron"
Issues = "https://github.com/MarioSieg/magnetron/issues"

[project.optional-dependencies]
dev = [
    "ruff",
    "torch",
    "numpy",
    "transformers",
    "tiktoken",
    "matplotlib",
    "pytest",
    "pytest-xdist",
    "pyinstrument",
    "rich"
]

[tool.scikit-build.cmake.define]
MAGNETRON_ENABLE_CUDA = false
MAGNETRON_BUILD_TESTS = false
MAGNETRON_BUILD_BENCHMARKS = false

[tool.scikit-build]
wheel.packages = ["python/magnetron"]
editable.mode = "redirect"

[tool.ruff]
line-length = 150
exclude = [
    ".venv",
    "docs",
    "extern",
    "test",
    "tools",
    "fuzzer",
    "cmake",
    "bin",
]

[tool.ruff.lint]
ignore = ["F403"]
select = ["ANN"]

[tool.ruff.format]
quote-style = "single"

[tool.ruff.lint.per-file-ignores]
"setup.py" = ["ANN"]
