content: [project]
  name = "pymatgen-db"
  version = "2023.7.18"
  authors = [{ name = "Shyue Ping Ong", email = "ongsp@ucsd.edu" }]
  maintainers = [
      { name = "Shyue Ping Ong", email = "ongsp@ucsd.edu" },
  ]
  description = "Pymatgen-db provides an addon for the creation of Materials Project-style databases for materials data."
  readme = "README.md"
  requires-python = ">=3.10"
  dependencies = [
      "monty>=2025.3.3",
      "pymatgen>=2025.3.10",
      "pymongo>=4.11.3",
  ]
  license = { text = "MIT" }
  classifiers = [
      "Development Status :: 4 - Beta",
      "Intended Audience :: Science/Research",
      "License :: OSI Approved :: MIT License",
      "Operating System :: OS Independent",
      "Programming Language :: Python :: 3",
      "Programming Language :: Python :: 3.10",
      "Programming Language :: Python :: 3.11",
      "Programming Language :: Python :: 3.12",
      "Topic :: Scientific/Engineering :: Chemistry",
      "Topic :: Scientific/Engineering :: Information Analysis",
      "Topic :: Scientific/Engineering :: Physics",
      "Topic :: Software Development :: Libraries :: Python Modules",
  ]
  [project.scripts]
  mgdb = "pymatgen.db.cli:main"
  
  [tool.setuptools.packages.find]
  where = ["src"]
  include = ["pymatgen.*"]
  
  [tool.setuptools.package-data]
  "pymatgen.db" = ["*.json"]
  
  [tool.black]
  line-length = 120
  
  [tool.ruff]
  target-version = "py310"
  line-length = 120
  lint.select = [
    "B",    # flake8-bugbear
    "C4",   # flake8-comprehensions
    "D",    # pydocstyle
    "E",    # pycodestyle error
    "EXE",  # flake8-executable
    "F",    # pyflakes
    "FA",   # flake8-future-annotations
    "FLY",  # flynt
    "I",    # isort
    "ICN",  # flake8-import-conventions
    "ISC",  # flake8-implicit-str-concat
    "PD",   # pandas-vet
    "PERF", # perflint
    "PIE",  # flake8-pie
    "PL",   # pylint
    "PT",   # flake8-pytest-style
    "PYI",  # flakes8-pyi
    "Q",    # flake8-quotes
    "RET",  # flake8-return
    "RSE",  # flake8-raise
    "RUF",  # Ruff-specific rules
    "SIM",  # flake8-simplify
    "SLOT", # flake8-slots
    "TCH",  # flake8-type-checking
    "TID",  # tidy imports
    "TID",  # flake8-tidy-imports
    "UP",   # pyupgrade
    "W",    # pycodestyle warning
    "YTT",  # flake8-2020
  ]
  lint.ignore = [
    "B023",    # Function definition does not bind loop variable
    "B028",    # No explicit stacklevel keyword argument found
    "B904",    # Within an except clause, raise exceptions with ...
    "C408",    # unnecessary-collection-call
    "D105",    # Missing docstring in magic method
    "D205",    # 1 blank line required between summary line and description
    "D212",    # Multi-line docstring summary should start at the first line
    "PD901",   # pandas-df-variable-name
    "PERF203", # try-except-in-loop
    "PERF401", # manual-list-comprehension (TODO fix these or wait for autofix)
    "PLR",     # pylint refactor
    "PLW2901", # Outer for loop variable overwritten by inner assignment target
    "PT013",   # pytest-incorrect-pytest-import
    "RUF012",  # Disable checks for mutable class args. This is a non-problem.
    "SIM105",  # Use contextlib.suppress(OSError) instead of try-except-pass
  ]
  lint.pydocstyle.convention = "google"
  lint.isort.required-imports = ["from __future__ import annotations"]
  lint.isort.split-on-trailing-comma = false
  extend-exclude = ["tests", "conf.py", "flask_theme_support.py", "tasks.py"]
  
  [tool.ruff.lint.per-file-ignores]
  "__init__.py" = ["F401"]
  "*/tests/*" = ["D"]
  "tasks.py" = ["D"]
  "dev_scripts/*" = ["D"]
  
  [tool.pytest.ini_options]
  addopts = "--durations=30 --quiet -r xXs --color=yes -p no:warnings --import-mode=importlib"
  
  [tool.coverage.run]
  relative_files = true
  
  [tool.coverage.report]
  exclude_lines = [
    "@deprecated",
    "def __repr__",
    "if 0:",
    "if __name__ == .__main__.:",
    "if self.debug:",
    "if settings.DEBUG",
    "pragma: no cover",
    "raise AssertionError",
    "raise NotImplementedError",
    "show_plot",
  ]
  
  [tool.mypy]
  ignore_missing_imports = true
  namespace_packages = true
  explicit_package_bases = true
  no_implicit_optional = false
  
  [[tool.mypy.overrides]]
  module = ["requests.*", "tabulate.*"]
  ignore_missing_imports = true
  
  [tool.codespell]
  ignore-words-list = """
  titel,alls,ans,nd,mater,nwo,te,hart,ontop,ist,ot,fo,nax,coo,coul,ser,leary,thre,
  fase,rute,reson,titels,ges,scalr,strat,struc,hda,nin,ons,pres,kno,loos,lamda,lew
  """
  check-filenames = true
  
  [tool.pyright]
  typeCheckingMode = "off"
  reportPossiblyUnboundVariable = true
  reportUnboundVariable = true
  reportMissingImports = false
  reportMissingModuleSource = false
  reportInvalidTypeForm = false
  exclude = ["**/tests"]
  
  [dependency-groups]
  dev = [
      "mongomock>=4.3.0",
      "pre-commit>=4.2.0",
      "pytest>=8.3.5",
      "pytest-cov>=6.0.0",
  ]
  lint = [
      "mypy>=1.15.0",
      "pyright>=1.1.398",
      "ruff>=0.11.2",
  ]
  