1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106
|
[build-system]
requires = ["setuptools", "setuptools-scm"]
build-backend = "setuptools.build_meta"
[project]
name = "mp-api"
authors = [
{ name = "The Materials Project", email = "feedback@materialsproject.org" },
]
description = "API Client for the Materials Project"
readme = "README.md"
requires-python = ">=3.9"
license = { text = "modified BSD" }
classifiers = [
"Programming Language :: Python :: 3",
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"Intended Audience :: Information Technology",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering",
]
dependencies = [
"setuptools",
"msgpack",
"maggma>=0.57.1",
"pymatgen>=2022.3.7,!=2024.2.20",
"typing-extensions>=3.7.4.1",
"requests>=2.23.0",
"monty>=2024.12.10",
"emmet-core>=0.84.3rc6",
"smart_open",
]
dynamic = ["version"]
[project.optional-dependencies]
all = ["emmet-core[all]>=0.69.1", "custodian", "mpcontribs-client", "boto3"]
test = [
"pre-commit",
"pytest",
"pytest-asyncio",
"pytest-cov",
"pytest-mock",
"flake8",
"pycodestyle",
"mypy",
"mypy-extensions",
"typing-extensions",
"types-setuptools",
"types-requests",
]
[tool.setuptools.packages.find]
include = ["mp_api*"]
namespaces = true
[tool.setuptools_scm]
[tool.pytest.ini_options]
minversion = "6.0"
addopts = ["-ra", "--showlocals", "--strict-markers", "--strict-config"]
xfail_strict = true
filterwarnings = ["default"]
log_cli_level = "info"
testpaths = ["tests"]
[tool.ruff]
target-version = "py38"
select = [
"B", # flake8-bugbear
"D", # pydocstyle
"E", # pycodestyle
"F", # pyflakes
"I", # isort
"PLE", # pylint error
"PLW", # pylint warning
"PYI", # flakes8-pyi
"Q", # flake8-quotes
"SIM", # flake8-simplify
"TID", # tidy imports
"UP", # pyupgrade
"W", # pycodestyle
"YTT", # flake8-2020
]
ignore = [
"B019", # Use of functools.lru_cache or functools.cache on methods can lead to memory leaks
"B028", # No explicit stacklevel keyword argument found
"B904", # Within an except clause, raise exceptions with raise ... from err
"D100", # Missing docstring in public module
"D104", # Missing docstring in public package
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D105", # Missing docstring in magic method
"D106", # Missing docstring in public nested class
"D205", # 1 blank line required between summary line and description
"PLW2901", # Outer for loop variable overwritten by inner assignment target
"SIM105", # Use contextlib.suppress(FileNotFoundError) instead of try-except-pass
"SIM115", # Use context handler for opening files,
"E501",
]
exclude = ["docs", ".ruff_cache", "requirements", "test*", "settings.py"]
pydocstyle.convention = "google"
flake8-unused-arguments.ignore-variadic-names = true
isort.required-imports = ["from __future__ import annotations"]
[tool.ruff.per-file-ignores]
"*/__init__.py" = ["F401"] # F401: imported but unused
|