# configuration file for the iode python package

[build-system]
requires = [ "scikit-build-core>=0.10", "numpy", "pandas", "cython>=3.0", "mypy>=1.10" ]
build-backend = "scikit_build_core.build"

[project]
name = "iode"
version = "7.0.3"
description = "IODE is a package dedicated to econometric models and to the management of statistical series"
readme = "README.md"
requires-python = ">=3.10"
authors = [
    { name = "Alix Damman", email = "ald@plan.be" },
    { name = "Yannick Van den Abbeel", email = "yvda@plan.be" },
    { name = "Jean-Marc Paul", email = "jmarc.paul@gmail.com" },
    { name = "Geert Bryon", email = "gb@plan.be" },
]
classifiers = [
    'Development Status :: 4 - Beta',
    'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
    'Operating System :: Microsoft :: Windows',
    'Intended Audience :: Science/Research',
    'Intended Audience :: Developers',
    'Programming Language :: Python',
    'Programming Language :: Python :: 3',
    'Programming Language :: Python :: 3.10',
    'Programming Language :: Python :: 3.11',
    'Programming Language :: Python :: 3.12',
    'Topic :: Scientific/Engineering',
    'Topic :: Software Development :: Libraries',
]


# runtime dependency specification
dependencies = [ "numpy", "pandas", "matplotlib" ]

[project.scripts]
iodecmd = "iode.cli:main"

[project.urls]
Homepage = "https://iode.readthedocs.io/en/stable/"

# see https://scikit-build-core.readthedocs.io/en/latest/getting_started.html
# and https://github.com/scikit-build/scikit-build-core#configuration 
[tool.scikit-build]

# Protect the configuration against future changes in scikit-build-core
minimum-version = "0.7"

# Verbose printout when building.
cmake.verbose = true

# The logging level to display, "DEBUG", "INFO", "WARNING", and "ERROR" are possible options.
logging.level = "DEBUG"

cmake.build-type = "Release"
cmake.define.CMAKE_BUILD_TYPE = "Release"

cmake.source-dir = "C:/usr/Projects/iode-1"

# A list of args to pass to CMake when configuring the project. Setting this in
# config or envvar will override toml.
cmake.args = ["-G", "Ninja"]

# The build targets to use when building the project. Empty builds the default target.
cmake.targets = [ "iode_cython" ]

# The wheel will automatically look for Python packages at src/<package_name>, 
# python/<package_name>, and <package_name>, in that order. 
# If you want to list packages explicitly, you can. 
# The final path element is the package.
wheel.packages = [ "./iode" ]

wheel.license-files = ["LICENSE.md"]

# Scikit-build-core defaults to using your .gitignore to select what to exclude from 
# the source distribution. However, sdist.include and sdist.exclude can be used to 
# override this behavior
sdist.include = [ "**/__init__.py", "**/*.pyi", "./iode/tests/data", "./iode/doc" ]
sdist.exclude = [ "**/*.in", "iode_cython.pyd", "dist", "dist_build" ]

# The build directory. Defaults to a temporary directory, but can be set.
build-dir = "../out/build/python/{wheel_tag}"

# Build stable ABI wheels for CPython 3.12+
wheel.py-api = "cp312"

[tool.cibuildwheel]
# Necessary to see build output from the actual compilation
build-verbosity = 1

[tool.pytest.ini_options]
minversion = "6.0"
addopts = ["--doctest-modules",
           "--doctest-continue-on-failure", 
           "--durations=0", 
           "--verbose"]
testpaths = ["./iode"]
log_cli = "True"
log_cli_level = "INFO"

# Run pytest to ensure that the package was correctly built
test-command = "pytest"
test-requires = "pytest"
