-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
137 lines (126 loc) · 4.18 KB
/
pyproject.toml
File metadata and controls
137 lines (126 loc) · 4.18 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
# pyproject.toml
[build-system]
requires = ["setuptools>=64", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "forge"
version = "0.1.0"
description = "FORGE (Flexible Optimizer for Rapid Generation and Exploration) - A package for adversarial attacks, HPC workflows, and materials analysis"
readme = "README.md"
license = {file = "LICENSE"}
authors = [
{ name = "Myles Stapelberg", email = "myless@mit.edu" }
]
# homepage = "https://github.com/mstapelberg/forge"
keywords = ["materials", "adversarial", "hpc", "database", "analysis"]
# Python requirement (adjust as needed)
requires-python = ">=3.11"
# Core runtime dependencies
dependencies = [
"numpy>=1.21",
"matplotlib",
"ase>=3.22",
"scipy",
"scikit-learn",
"pyyaml",
"psycopg2-binary",
"pymatgen",
"monty",
"plotly",
"tqdm"
]
[project.scripts]
forge-aa = "forge.cli:main"
[tool.setuptools]
packages = ["forge"]
# Optional dependencies (e.g. for testing) can be specified in optional-dependencies
[project.optional-dependencies]
test = [
"pytest",
"pytest-cov",
"umap-learn",
"wandb"
]
analysis = [
"scikit-learn>=1.0", # For KMeans, StandardScaler
"umap-learn>=0.5", # For UMAP
"matplotlib>=3.5", # For plotting
]
dev = [
"forge[analysis]", # Also add analysis tools to dev dependencies
"forge[test]",
]
[project.urls]
"Source Code" = "https://github.com/mstapelberg/forge"
"Documentation" = "https://github.com/mstapelberg/forge/docs"
"Tracker" = "https://github.com/mstapelberg/forge/issues"
[tool.ruff]
include = ["**/pyproject.toml", "*.ipynb", "*.py", "*.pyi"]
exclude = ["__init__.py", "migrations/*.py", "allxyz_lastgrad.py", "mopac_ints_rhf.py", "dbsettings.py"]
line-length = 100
src = [".", "djangochem"]
[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 = [
"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
"PT009", # pytest-unittest-assertion
"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"