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

[tool.hatch.build.targets.wheel]
force-include = { "PARAMETERS.md" = "owlplanner/PARAMETERS.md" }

[tool.hatch.version]
path = "src/owlplanner/version.py"

[project]
name = "owlplanner"
dynamic = ["version"]
authors = [
  { name="Martin-D. Lacasse", email="martin.d.lacasse@gmail.com" },
]
maintainers = [
  { name="Martin-D. Lacasse", email="martin.d.lacasse@gmail.com" },
]
description = "Owl - Optimal Wealth Lab: Retirement planner with great wisdom"
readme = "README.md"
requires-python = ">=3.10"
classifiers = [
    "Development Status :: 5 - Production/Stable",
    "Programming Language :: Python :: 3",
    "Intended Audience :: End Users/Desktop",
    "Topic :: Office/Business :: Financial :: Investment",
    "License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
    "Operating System :: OS Independent",
    "Programming Language :: Python :: 3",
]
dependencies = [
    "altair",
    "pydantic>=2.0",
    "highspy",
    "matplotlib",
    "numpy",
    "odfpy",
    "openpyxl",
    "pandas",
    "plotly>=6.3",
    "seaborn",
    "scipy",
    "streamlit",
    "toml",
    "jupyter>=1.1.1",
    "pyyaml>=6.0.3",
    "loguru>=0.7.3",
    "click>=8.3.1",
]
license = {file = "LICENSE"}

[project.optional-dependencies]
mosek = ["mosek"]

[project.urls]
HomePage = "https://github.com/mdlacasse/owl"
Repository = "https://github.com/mdlacasse/owl"
Issues = "https://github.com/mdlacasse/owl/issues"
Documentation = "https://github.com/mdlacasse/Owl/blob/main/docs/owl.pdf"
DOWNLOAD = "https://github.com/mdlacasse/Owl/archive/refs/heads/main.zip"

[project.scripts]
owlcli  = "owlplanner.cli._main:cli" 

[dependency-groups]
dev = [
    "flake8",
    "pytest>=9.0.2",
]


[tool.mypy]
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = [
    "pandas.*",
    "plotly.*",
    "scipy.*",
    "mosek.*",
    "openpyxl.*",
    "toml.*",
    "seaborn.*",
    "loguru.*",
]
ignore_missing_imports = true

[tool.ruff]
line-length = 120
indent-width = 4
exclude = [
    "build",
    "dist",
    "examples",
    "otherfiles",
    "myfiles",
    "*.ipynb",
]
extend-exclude = ["*.ipynb"]

[tool.ruff.lint]
# 1. Enable flake8-bugbear (`B`) rules, in addition to the defaults.
select = ["E4", "E7", "E9", "F", "B"]

# 2. Avoid enforcing line-length violations (`E501`)
ignore = ["E501"]

# 3. Avoid trying to fix flake8-bugbear (`B`) violations.
unfixable = ["B"]

[tool.ruff.lint.per-file-ignores]
# 4. Ignore `E402` (import violations) in all `__init__.py` files, and in selected subdirectories.
"__init__.py" = ["E402"]
"**/{tests,docs,tools}/*" = ["E402"]

[tool.ruff.format]
# 5. Use double quotes in `ruff format`.
quote-style = "double"

