[project]
    name = "periodictable"
    dynamic = ["version"]
    description = "Extensible periodic table of the elements"
    readme = "README.rst"
    authors = [
        { name = "Paul Kienzle", email = "paul.kienzle@nist.gov" },
    ]
    license = { file = "LICENSE.txt" }
    dependencies = [
        "pyparsing>=3.0.0", "numpy",
    ]

    classifiers = [
        "Development Status :: 5 - Production/Stable",
        "Environment :: Console",
        "Intended Audience :: Science/Research",
        "License :: Public Domain",
        "Operating System :: OS Independent",
        "Programming Language :: Python",
        "Programming Language :: Python :: 3",
        "Topic :: Scientific/Engineering :: Chemistry",
        "Topic :: Scientific/Engineering :: Physics",
    ]
    requires-python = ">=3.10"

[dependency-groups]
    build  = ["build"]
    # Matplotlib and uncertainties are optional packages, used for making
    # plots in the docs and generating neutron data tables for the web.
    # mypy checks all code so they are needed for testing as well.
    optional = ["uncertainties", "matplotlib"]
    docs = ["sphinx", {include-group = "optional"}]
    test = ["pytest", "pytest-cov", "pytest-mypy", {include-group = "optional"}]
    dev = [
        {include-group = "build"},
        {include-group = "docs"},
        {include-group = "test"},
    ]

[project.urls]
    documentation = "https://periodictable.readthedocs.io"
    repository = "https://github.com/python-periodictable/periodictable"

[build-system]
    requires = ["setuptools", "wheel"]
    build-backend = "setuptools.build_meta"

[tool.setuptools.dynamic]
    version = { attr = "periodictable.__version__" }

[tool.setuptools]
    packages = ["periodictable"]

[tool.pytest.ini_options]
    # mypy doesn't work on the wheel tests, so these options are repeated in
    # .github/workflows/test.yml. We could use pytest-enabler with "pytest -p no:mypy"
    # but that introduces yet another dependency.
    addopts = ["--doctest-modules", "--doctest-glob=*.rst", "--cov=periodictable", "--mypy"]
    doctest_optionflags = "ELLIPSIS"
    pythonpath = ["doc/sphinx"]
    testpaths = ["periodictable", "test", "doc/sphinx/guide"]
    python_files = "*.py"
    python_classes = "NoClassTestsWillMatch"
    python_functions = ["test", "*_test", "test_*"]

[tool.mypy]
#files = ["test/test_element_types.py"]
follow_imports = "silent"  # Check imports but don't report errors in them
