forked from hspark1212/chemeleon2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
143 lines (133 loc) · 4.77 KB
/
pyproject.toml
File metadata and controls
143 lines (133 loc) · 4.77 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
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "chemeleon2"
version = "0.1.0"
description = "Generative AI framework for crystalline materials"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"ase>=3.26.0",
"average-minimum-distance>=1.6.0",
"fire>=0.7.1",
"h5py>=3.14.0",
"huggingface_hub>=0.20.0",
"hydra-colorlog==1.2.0",
"hydra-core==1.3.2",
"hydra-optuna-sweeper==1.2.0",
"lightning>=2.5.4",
"mp-api>=0.45.8",
"pydantic>=2.11.7",
"pymatgen>=2025.6.14",
"pyyaml>=6.0",
"timm>=1.0.19",
"torch>=2.6.0",
"torch-ema>=0.3",
"torch-geometric>=2.6.1",
"torchmetrics>=1.8.1",
"tqdm>=4.67.1",
"wandb>=0.21.3",
]
[project.optional-dependencies]
training = [
"mace-torch>=0.3.0", # Energy calculations for e_above_hull in RL rewards
"smact>=3.2.0", # Composition validity checks in RL rewards
]
dev = [
"jupyterlab>=4.4.6", # Jupyter development environment
"nglview>=3.1.4", # 3D structure visualization
"pre-commit>=4.0.0", # Pre-commit hooks framework
"pytest>=7.0", # Testing framework
"pyright==1.1.406", # Type checking
"rich>=14.1.0", # Terminal output formatting
"ruff==0.13.3", # Linting and formatting
]
[tool.setuptools.packages.find]
where = ["."]
include = ["src*", "custom_reward*"]
[tool.pytest.ini_options]
minversion = "7.0"
testpaths = ["tests"]
pythonpath = ["src"]
markers = [
"smoke: Quick smoke tests for basic functionality",
"baseline: Baseline tests to validate code before/after formatting",
"unit: Unit tests for individual components",
"integration: Integration tests for component interactions",
"slow: Tests that take significant time to run",
]
addopts = ["-ra", "-q", "--strict-markers"]
filterwarnings = [
"ignore::UserWarning:torch.nn.modules.transformer",
"ignore::UserWarning:lightning.pytorch.utilities.parsing",
]
[tool.ruff]
# Python version target
target-version = "py311"
# Black-compatible line length
line-length = 88
[tool.ruff.lint]
# Rule sets to enable:
select = [
"F", # F: Pyflakes errors (undefined names, unused imports)
"E", # E: PEP 8 style errors (indentation, whitespace)
"W", # W: PEP 8 style warnings (deprecated features)
"I", # I: isort import sorting
"N", # N: PEP 8 naming conventions
"D", # D: Docstrings (pydocstyle)
"UP", # UP: pyupgrade (modernize Python syntax)
"ANN", # ANN: Type annotations (flake8-annotations)
"S", # S: Security checks (flake8-bandit)
"B", # B: Bugbear (design issues, anti-patterns)
"C90", # C90: McCabe complexity checker
]
# Rules to ignore for existing codebase (retroactive linting)
ignore = [
"ANN001", # Missing type annotation for function argument
"ANN002", # Missing type annotation for *args
"ANN003", # Missing type annotation for **kwargs
"ANN201", # Missing return type annotation for public function
"ANN202", # Missing return type annotation for private function
"ANN204", # Missing return type annotation for __init__
"ANN205", # Missing return type annotation for static method
"B028", # No explicit `stacklevel` keyword argument found
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D105", # Missing docstring in magic method
"D107", # Missing docstring in __init__
"D200", # One-line docstring should fit on one line
"D205", # Missing blank line after summary
"D417", # Missing argument description in docstring
"E501", # Line too long (existing code has long lines)
"N802", # Function name should be lowercase
"N806", # Variable in function should be lowercase
"N812", # Lowercase imported as non-lowercase
"S101", # Use of assert detected (common in ML code for shape checks)
"S301", # Pickle usage (needed for model checkpoints)
"B007", # Unused loop control variable
"B008", # Function call in default argument
"C901", # Function is too complex
"UP008", # Use super() without arguments
]
[tool.ruff.lint.pydocstyle]
# Docstring style convention
convention = "google"
[tool.ruff.lint.mccabe]
# Maximum cyclomatic complexity threshold
max-complexity = 10
[tool.pyright]
# Type checking mode - basic provides essential type checking without being overly strict
typeCheckingMode = "basic"
# Python version target - must match project requirements
pythonVersion = "3.11"
# Virtual environment configuration
venvPath = "."
venv = ".venv"
exclude = [
"./src/utils/ema_callback.py",
"./src/vae_module/vae_module.py",
"./src/ldm_module/ldm_module.py",
"./src/rl_module/rl_module.py",
"./src/vae_module/predictor_module.py",
]