-
Notifications
You must be signed in to change notification settings - Fork 53
/
pyproject.toml
128 lines (121 loc) · 4.02 KB
/
pyproject.toml
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
[build-system]
requires = ["setuptools >= 50.0"]
build-backend = "setuptools.build_meta"
[project]
name = "nff"
version = "0.2.0"
description = "Neural Force Field"
authors = [{ name = "Rafael Gomez-Bombarelli", email = "rafagb@mit.edu" }]
requires-python = ">=3.6"
readme = "README.md"
license = { text = "MIT" }
dependencies = [
"ase==3.22.1",
"pymatgen>=2023.3.10",
"rdkit",
"scikit-learn",
"scipy",
"torch>=2.2.0",
"tqdm",
"mace-torch>=0.3.4",
"chgnet>=0.3.5",
"e3fp",
"nglview",
"ipykernel",
"ipywidgets",
]
classifiers = [
"Intended Audience :: Science/Research",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering :: Machine Learning",
"Topic :: Scientific/Engineering :: Chemistry",
"Topic :: Scientific/Engineering :: Materials Science",
"Topic :: Scientific/Engineering :: Physics",
]
[project.optional-dependencies]
dev = [
"pre-commit",
"pytest",
"pytest-cov"
]
[project.urls]
Homepage = "https://github.mit.edu/MLMat/NeuralForceField/"
[tool.setuptools]
packages.find = { where = ["."], include = ["nff*"] }
[tool.ruff]
include = ["**/pyproject.toml", "*.ipynb", "*.py", "*.pyi"]
exclude = ["__init__.py"]
line-length = 120
src = [".", "nff"]
[tool.ruff.format]
docstring-code-format = true
# borrowed lint rules from chgnet
[tool.ruff.lint]
# consider selecting "ISC", for implicit string concat
# consider selecting "T201", for print in production code
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
"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", # flakes8-slot
"TCH", # flake8-type-checking
"TID", # tidy imports
"TID", # flake8-tidy-imports
"UP", # pyupgrade
"W", # pycodestyle warning
"YTT", # flake8-2020
]
# also consider ignoring "C901", for high mccabe function complexity
# also consider ignoring "ERA001", for found commented out code
ignore = [
"RET504", # return statement in finally block
"B006", # Do not use mutable data structures for argument defaults
"ANN003", # missing type annotations for kwargs
"B019", # Use of functools.lru_cache on methods can lead to memory leaks
"C408", # unnecessary-collection-call
"COM812", # trailing comma missing
"D205", # 1 blank line required between summary line and description
"D415", # first line of docstring must end with punctuation
"DTZ005", # use of datetime.now() without timezone
"E731", # do not assign a lambda expression, use a def
"EM", # flake8-errmsg
"FBT001", # Boolean positional argument in function
"FBT002", # Boolean keyword argument in function
"NPY002", # TODO replace legacy np.random.seed
"PLR", # pylint refactor
"PLW2901", # Outer for loop variable overwritten by inner assignment target
"PT006", # pytest-parametrize-names-wrong-type
"PT011", # pytest-raises-too-broad
"PT013", # pytest-incorrect-pytest-import
"PT019", # pytest-fixture-param-without-value
"PTH", # prefer Path to os.path
"S301", # pickle can be unsafe
"S310", # url open functions can be unsafe
"TRY003", # long exception messages not defined in the exception class itself
"UP015", # unnecessary "r" in open call
]
pydocstyle.convention = "google"