[project]
name = "mat3ra-made"
dynamic = ["version"]
description = "MAterials DEfinitions and/or MAterials DEsign library."
readme = "README.md"
requires-python = ">=3.8"
license = {file = "LICENSE.md"}
authors = [
    { name = "Exabyte Inc.", email = "info@mat3ra.com" }
]
classifiers = [
    "Programming Language :: Python",
    "Programming Language :: Python :: 3",
    "Development Status :: 3 - Alpha",
    "Topic :: Software Development",
]
dependencies = [
    # add requirements here
    # new verison of numpy==2.0.0 is not handled by pymatgen yet
    "numpy<=1.26.4",
    "mat3ra-utils",
    "mat3ra-esse",
    "mat3ra-code"
]

[project.optional-dependencies]
# tracking separately the deps required to use the tools module
tools = [
    "scipy",
    "pymatgen==2024.4.13",
    "ase",
    "pymatgen-analysis-defects==2024.4.23",
    "mat3ra-periodic-table>=2025.12.26",
]
dev = [
    "pre-commit",
    "black",
    "ruff",
    "isort",
    "mypy",
    "pip-tools",
]
tests = [
    "coverage[toml]>=5.3",
    "pytest",
    "pytest-cov",
    # B/c of https://github.com/binary-husky/gpt_academic/issues/1237
    "gradio",
    "pydantic",
    "spglib==2.6.0",
    "mat3ra-made[tools]",
    "mat3ra-standata",
]
all = [
    "mat3ra-made[tests]",
    "mat3ra-made[dev]",
]

# Entrypoint scripts can be defined here, see examples below.
[project.scripts]
# To proxy the wheel_server script from mat3ra-utils for development purposes
wheel_server = "mat3ra.utils.wheel_server:main"


[build-system]
requires = [
    "setuptools>=42",
    "setuptools-scm[toml]>=3.4"
]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
git_describe_command = "git describe --tags --long"

[tool.setuptools.packages.find]
where = ["src/py"]

[tool.setuptools.package-data]
"mat3ra.made" = ["constants.json"]


[tool.black]
line-length = 120
target-version = ['py38']
# 'extend-exclude' excludes files or directories in addition to the defaults
extend-exclude = '''
(
    tests\/fixtures*,
    examples\/.*\/.*\.py
  | other\/.*\/.*\.(py|ipynb)
)
'''

[tool.ruff]
# Exclude a variety of commonly ignored directories.
extend-exclude = [
    "src/js",
    "tests/fixtures",
    "tests/py/unit/fixtures"
]
line-length = 120
target-version = "py38"

[tool.ruff.per-file-ignores]
"__init__.py" = ["F401"]

[tool.isort]
profile = "black"
multi_line_output = 3
include_trailing_comma = true

[tool.pytest.ini_options]
pythonpath = [
    "src/py",
]
testpaths = [
    "tests/py"
]
filterwarnings = [
    "ignore:.*:DeprecationWarning:typing_extensions",
    "ignore:.*:UserWarning:pydantic",
    "ignore:.*:RuntimeWarning:mat3ra.made",
    "ignore::pydantic.warnings.PydanticDeprecatedSince20",
]
