[project]
name = "pqlattice"
version = "0.1.3"
description = "Add your description here"
readme = "README.md"
license = { file = "LICENSE" }
classifiers = [
    "License :: OSI Approved :: MIT License",
    "Programming Language :: Python :: 3",
    "Operating System :: OS Independent",
    "Intended Audience :: Education",
    "Topic :: Security :: Cryptography",
]
keywords = ["cryptography", "lattice"]
authors = [
    { name = "Mikołaj Leonhardt", email = "mikolaj.leonhardt@gmail.com" }
]
requires-python = ">=3.12"
dependencies = [
    "numpy>=1.26",
]

[project.urls]
Repository = "https://github.com/MikolajLH/pqlattice.git"
Documentation = "https://mikolajlh.github.io/pqlattice/"

[project.optional-dependencies]
fast = [
    "cysignals>=1.12.6",
    "fpylll>=0.6.4",
    "python-flint>=0.8.0",
]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[dependency-groups]
dev = [
    {include-group = "tests"},
    {include-group = "docs"},
    "graphviz>=0.21",
    "notebook>=7.4.7",
    "pre-commit>=4.2.0",
    "pydeps>=3.0.1",
    "pylint>=4.0.4",
    "ruff>=0.12.7",
]

docs = [
    "mkdocs>=1.6.1",
    "mkdocs-coverage>=2.0.0",
    "mkdocs-jupyter>=0.25.1",
    "mkdocs-material>=9.7.1",
    "mkdocstrings[python]>=1.0.0",
]

tests = [
    "gmpy2>=2.2.2",
    "hypothesis[numpy]>=6.142.1",
    "pytest>=8.4.1",
    "pytest-benchmark[histogram]>=5.1.0",
    "pytest-cov>=7.0.0",
    "pytest-sugar>=1.1.1",
    "pytest-timeout>=2.4.0",
    "pytest-xdist>=3.8.0",
]

[tool.pytest.ini_options]
pythonpath = "."
testpaths = 'tests'
addopts = [
    "--import-mode=importlib",
]

[tool.ruff]
line-length = 220
src = ["src", "tests"]
fix = true

[tool.ruff.lint]
select = [
  "E",    # pycodestyle errors
  "F",    # pyflakes
  "I",    # isort
  "UP",   # pyupgrade
  "N",    # pep8-naming
  "B",    # flake8-bugbear
  "C4",   # flake8-comprehensions
  "SIM",  # flake8-simplify
  #"T20",  # flake8-print (warns on print/debug)
  "ARG",  # flake8-unused arguments
  "NPY",  # NumPy-specific rules
]
ignore = [
    "N802", # https://docs.astral.sh/ruff/rules/invalid-function-name/#invalid-function-name-n802
    # "N999", # https://docs.astral.sh/ruff/rules/invalid-module-name/#invalid-module-name-n999
    "N806", # https://docs.astral.sh/ruff/rules/non-lowercase-variable-in-function/#non-lowercase-variable-in-function-n806
    "E731", # https://docs.astral.sh/ruff/rules/lambda-assignment/#lambda-assignment-e731
    "N803", # https://docs.astral.sh/ruff/rules/invalid-argument-name/#invalid-argument-name-n803
]

[tool.ruff.format]
docstring-code-format = true
quote-style = "double"
indent-style = "space"
line-ending = "lf"
