-
Notifications
You must be signed in to change notification settings - Fork 61
Expand file tree
/
Copy pathpyproject.toml
More file actions
155 lines (147 loc) · 5.15 KB
/
pyproject.toml
File metadata and controls
155 lines (147 loc) · 5.15 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
145
146
147
148
149
150
151
152
153
154
155
[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.23.0",
"numpy >=1.26.4, <2",
"pymatgen>=2023.3.10",
"rdkit",
"scikit-learn",
"scipy",
"torch >= 2.2.0, < 2.6.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.flake8]
max_line_length = 120
# F401 and F403: start imports, they are bad but everywhere
per-file-ignores = [
'__init__.py:F401, F403',
]
# E741 ambiguous variable name 'l'
# F405 rely on objects from star imports, maybe worth removing in the future
# E203 no whitespace before ':', ruff prefers this for list comprehensions
extend-ignore = ['E741', 'F405', 'E203']
exclude = [
'nff/nn/models/spooky_net_source/modules/electron_configurations.py'
]
[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
"Q000", # single quotes
"D103", # missing docstring in public function
"D", # do not fight with doc for now, todo in the future
"UP035", # deprecated Dict and List, but keep to support python<3.10
"UP006", # deprecated Dict and List, but keep to support python<3.10
"ICN001", # import name convention
"UP031", # Use format specifiers instead of percent format
"PD901", # dont name dataframes df
"FA100", # from future suggestion
"RUF012", # type annotation for mutable class attributes
"RUF002", # ambiguous characters in docstrings
"RUF003", # ambiguous characters in comments
]
pydocstyle.convention = "google"