-
Notifications
You must be signed in to change notification settings - Fork 55
Expand file tree
/
Copy pathpyproject.toml
More file actions
144 lines (133 loc) · 3.57 KB
/
pyproject.toml
File metadata and controls
144 lines (133 loc) · 3.57 KB
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
[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.11"
license = "BSD-3-Clause-LBNL"
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 = [
"pymatgen>2024.2.20",
"typing-extensions>=3.7.4.1",
"requests>=2.23.0",
"monty>=2024.12.10",
"emmet-core>=0.86.4rc1,<0.86.5",
"boto3",
"orjson >= 3.10,<4",
"pyarrow >= 20.0.0",
"deltalake >= 1.4.0",
]
dynamic = ["version"]
[project.optional-dependencies]
mcp = ["fastmcp"]
server = ["flask"]
contribs = [
"boltons",
"bravado",
"filetype",
"ipython",
"json2html",
"pint>=0.25.0",
"pyIsEmail",
"requests-futures",
"swagger-spec-validator",
"cachetools",
]
all = [
"custodian",
"emmet-core[all]>=0.86.4rc1,<0.86.5",
"fastmcp",
"flask",
]
test = [
"pre-commit",
"pytest",
"pytest-asyncio",
"pytest-cov",
"pytest-mock",
"pytest-xdist",
"flake8",
"pycodestyle",
"mypy",
"mypy-extensions",
"typing-extensions",
"types-setuptools",
"types-requests",
"types-tqdm"
]
docs = ["sphinx"]
[project.scripts]
mpmcp = "mp_api.mcp.server:_run_mp_mcp_server"
[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 = "py312"
[tool.ruff.lint]
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.lint.per-file-ignores]
"*/__init__.py" = ["F401"] # F401: imported but unused
[tool.mypy]
namespace_packages = true
ignore_missing_imports = true
follow_untyped_imports = true
[tool.coverage.report]
exclude_also = [
# A pragma comment that excludes an entire file:
'\A(?s:.*# pragma: exclude file.*)\Z',
]