[build-system]
requires = ["setuptools==68.2.2",
    "setuptools-scm>=8.0",
    "wheel==0.41.2",
    "build==1.1.1"]
build-backend = "setuptools.build_meta"

# Packages
[tool.setuptools.packages.find]
where = ["."]
include = ["pyCFS", "data", "topt"]

# Dynamic
[tool.setuptools.dynamic]
version = { attr = "pyCFS.__version__" }
readme = { file = ["README.md"], content-type = "text/markdown" }
dependencies = { file = ["requirements/common.txt"] }
#optional-dependencies.dev = { file = ["requirements/dev.txt"] }

[project]
name = "pyCFS"
#version = "0.0.1"
#readme = "README.md"
description = "Python library for automating and data handling tasks for openCFS."
license = { file = "LICENSE" }
authors = [
    { name = "IGTE", email = "igte.gitlab@gmail.com" },
    { name = "Eniz Mušeljić", email = "eniz.m@outlook.com" },
    { name = "Andreas Wurzinger", email = "andreas.wurzinger@tugraz.at" },
    { name = "Patrick Heidegger", email = "patrick.heidegger@tugraz.at" },
]
dynamic = ["version", "readme", "dependencies"]

requires-python = ">=3.10"

keywords = [
    "automation",
    "simulation",
    "optimization",
    "opencfs",
    "data processing"]

classifiers = [
    "Development Status :: 4 - Beta",
    "Intended Audience :: Science/Research",
    "Topic :: Scientific/Engineering",
    "License :: OSI Approved :: MIT License",
    "Programming Language :: Python :: 3.12",
    "Natural Language :: English",
]

# Optional dependencies
[project.optional-dependencies]
data = [
    "ansys-dpf-core>=0.10.0",
    "pyvista>=0.43.1"]
dev = [
    # Extra dependencies from data submodule :
    # "ansys-dpf-core>=0.10.0",
    # "pyvista>=0.43.1",
    # Documentation deps :
    "sphinx==7.2.6",
    "myst-parser==2.0.0",
    "sphinx-book-theme==1.1.2",
    # Testing deps :
    "pytest==8.0.2",
    "pytest-cov==4.1.0",
    # formatting deps :
    "black==24.2.0",
    # Pipeline deps :
    "mypy==1.8.0",
    "flake8==7.0.0",
    "twine==5.0.0",
    "build==1.1.1",
    # Debugging deps :
    "pandas>=2.0.3"
]

[project.urls]
Homepage = "https://opencfs.org/"
Documentation = "https://opencfs.gitlab.io/pycfs/"
Repository = "https://gitlab.com/openCFS/pycfs"
Issues = "https://gitlab.com/openCFS/pycfs/-/issues"
Changelog = "https://gitlab.com/openCFS/pycfs/-/blob/main/Changelog.md"

[project.scripts]
pycfs = "pyCFS.util.setup_generator:main"

[tool.pytest.ini_options]
addopts = "-v --cov=pyCFS --cov-report term --cov-report xml:coverage.xml"
testpaths = [
    "tests",
]

filterwarnings = [
    'ignore:.*ast.* is deprecated:DeprecationWarning'
]

[tool.black]
line-length = 120

[tool.mypy]
mypy_path = "pyCFS"

# plugins : 
plugins = "numpy.typing.mypy_plugin"

# rules : 
check_untyped_defs = true
disallow_any_generics = false
ignore_missing_imports = true
no_implicit_optional = true
show_error_codes = true
strict_equality = true
warn_redundant_casts = true
warn_return_any = false
warn_unused_configs = true
no_implicit_reexport = false
disallow_untyped_calls = true

# exclude templates dir : 
exclude = ["templates/*"]