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

[tool.pyrefly]
project-includes = ["**/*"]
project-excludes = [
    "**/node_modules",
    "**/__pycache__",
    "**/*venv/**/*",
]


[project]
name = "finalcif"
dynamic = ["version"]
authors = [
    { name = "Daniel Kratzert", email = "dkratzert@gmx.de" },
]
description = "CIF file editor"
readme = "README.md"
requires-python = ">=3.10"
classifiers = [
    "Programming Language :: Python :: 3",
    "License :: OSI Approved :: MIT License",
    "Operating System :: OS Independent",
    "Topic :: Scientific/Engineering :: Chemistry",
    "Development Status :: 5 - Production/Stable",
    "Programming Language :: Python :: 3",
]

dependencies = [
    "wheel",
    "certifi",
    "chardet",
    "gemmi",
    "html2text",
    "lxml",
    "pefile",
    "pybind11",
    "python-docx",
    "packaging",
    "QtAwesome",
    "QtPy",
    "requests",
    "urllib3",
    "docxtpl",
    "shelxfile",
    "crossrefapi",
    "numpy",
    "pyenchant",
    "hatchling",
    "charset-normalizer",
    "pyside6",
    "pyside6-addons",
]

[dependency-groups]
dev = [
    "pytest",
    "ruff",
    "pyrefly",
    "pyside6-stubs",
]

doc = [
    "sphinx",
    "sphinx-rtd-theme",
]

[project.urls]
"Homepage" = "https://dkratzert.de/finalcif.html"
"Bug Tracker" = "https://github.com/dkratzert/FinalCif/issues"

[tool.hatch.version]
path = "finalcif/__init__.py"
pattern = "VERSION\\s*=\\s*(?P<version>\\d+\\.{0,1}\\d{0,1})"

[tool.hatch.build.targets.sdist]
exclude = [
    "/.github",
    "/test-data",
    "/scripts",
    "/setup",
    "/tests",
    "/docs",
    "/make_release.sh",
    "/venv*",
]

[project.scripts]
finalcif = "finalcif.finalcif_start:main"
