-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathpyproject.toml
More file actions
122 lines (111 loc) · 4.11 KB
/
Copy pathpyproject.toml
File metadata and controls
122 lines (111 loc) · 4.11 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
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[project]
name = "skala"
version = "2026.8"
description = "Skala Exchange Correlation Functional"
authors = []
license-files = ["LICENSE.txt"]
readme = "README.md"
keywords = []
classifiers = [
"Programming Language :: Python :: 3",
"Development Status :: 5 - Production/Stable",
]
requires-python = ">=3.10"
dependencies = [
"ase",
"azure-core",
"azure-identity",
"dftd3",
"e3nn",
"huggingface_hub",
"numpy",
"opt_einsum_fx",
"pyscf>=2.8,<2.14",
"qcelemental",
"torch"
]
optional-dependencies.dev = [
"pre-commit",
"mypy",
"pytest",
"pytest-cov",
"pytest-randomly",
]
optional-dependencies.doc = [
"ipywidgets",
"myst-nb",
"sphinx",
"sphinx-book-theme",
"sphinx-design",
"sphinxcontrib-bibtex",
"sphinxcontrib-moderncmakedomain",
"sphinx-fortran",
]
urls.repository = "https://github.com/microsoft/skala"
urls.documentation = "https://microsoft.github.io/skala"
urls.homepage = "https://aka.ms/dft"
[tool.mypy]
strict = true
ignore_missing_imports = true
no_namespace_packages = true
python_version = "3.12"
exclude = ["third_party/"]
disable_error_code = ["no-any-return"]
# torch.autograd.Function uses dynamic attributes on FunctionCtx (ctx.save_for_backward pattern)
# and Function.apply() is untyped. These are fundamental to PyTorch's autograd API.
[[tool.mypy.overrides]]
module = "skala.pyscf.features"
disable_error_code = ["no-any-return", "attr-defined", "no-untyped-call"]
[tool.ruff]
target-version = "py311"
src = ["src"]
exclude = ["third_party"]
[tool.ruff.lint]
extend-select = [
"B", # flake8-bugbear
"D417", # undocumented-param in docstring
"I", # isort
"UP", # pyupgrade
]
extend-ignore = [
"UP015", # redundant-open-modes
"E741", # variable name l
]
[tool.ruff.lint.per-file-ignores]
# E402: imports must come after CUDA checks and CuPy allocator configuration
"src/skala/gpu4pyscf/__init__.py" = ["E402"]
"src/skala/gpu4pyscf/dft.py" = ["E402"]
[tool.ruff.lint.isort]
detect-same-package = true
[tool.black]
line-length = 100
[tool.pytest.ini_options]
filterwarnings = [
"error",
# PyTorch 2.11 deprecated `torch.jit.load`; Skala's pretrained checkpoints
# are TorchScript archives, so `skala.functional.load` still uses it.
'ignore:`torch\.jit\.load` is deprecated\. Please switch to `torch\.export`\.:DeprecationWarning',
'ignore:`torch\.jit\.script` is deprecated\. Please switch to `torch\.compile` or `torch\.export`\.:DeprecationWarning',
'ignore:`torch\.jit\.save` is deprecated\. Please switch to `torch\.export`\.:DeprecationWarning',
'ignore:`torch\.jit\.save` is not supported in Python 3\.14+ and may break\. Please switch to `torch\.export`\.:DeprecationWarning',
# PySCF's `SCF.__init__` (pyscf/scf/hf.py, currently line 1733) creates
# `self._chkfile = tempfile.NamedTemporaryFile(...)` as its checkpoint file
# and relies on finalization to close it, which emits ResourceWarning during
# GC. The warning is emitted by CPython's I/O layer (not from the pyscf
# module), so we match on the message. Traced via PYTHONTRACEMALLOC.
"ignore:unclosed file <_io\\.FileIO name='/tmp/tmp.*' mode='rb\\+' closefd=True>:ResourceWarning",
# On recent pytest versions the same leaked tempfile surfaces during GC at
# session teardown via the unraisable-exception hook, which re-emits it as
# `pytest.PytestUnraisableExceptionWarning`. Filter that wrapper too.
"ignore:Exception ignored in. <_io\\.FileIO name='/tmp/tmp.*' mode='rb\\+' closefd=True>:pytest.PytestUnraisableExceptionWarning",
# From gpu4pyscf if cutensor is not available
'ignore:using cupy as the tensor contraction engine\.:UserWarning',
# Deprecation warning in huggingface_hub package
'ignore:hf_xet\.download_files\(\) is deprecated\. Use XetSession\(\)\.new_file_download_group\(\)\.start_download_file\(\) instead\.:DeprecationWarning',
# Upstream deprecations in PySCF / GPU4PySCF are outside this project's control.
'ignore::DeprecationWarning:pyscf\..*',
'ignore::DeprecationWarning:gpu4pyscf\..*',
]