-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
120 lines (104 loc) · 2.83 KB
/
pyproject.toml
File metadata and controls
120 lines (104 loc) · 2.83 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
[build-system]
requires = ["setuptools>=42", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "graphRC"
version = "1.3.6"
description = "Internal Coordinate Analysis of Vibrational Modes."
authors = [{name = "Dr Alister Goodfellow"}]
readme = "README.md"
requires-python = ">=3.8"
dependencies = [
"numpy",
"cclib",
"networkx",
"xyzgraph>=1.6.2"
]
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
[project.optional-dependencies]
examples = ["matplotlib", "seaborn"]
[project.urls]
homepage = "https://github.com/aligfellow/graphRC"
[project.scripts]
graphrc = "graphrc.cli:main"
[tool.setuptools.packages.find]
where = ["src"]
[dependency-groups]
dev = [
"pre-commit>=3.5.0",
"pytest>=8.3.5",
"pytest-cov>=5.0.0",
"ruff>=0.14.14",
"ty>=0.0.14",
"matplotlib", # required for threshold optimisation plot
"seaborn", # required for threshold optimisation plot
]
# ===== Ruff =====
[tool.ruff]
line-length = 120
target-version = "py310"
src = ["src", "tests"]
exclude = ["examples"]
[tool.ruff.lint]
select = [
"B", # bugbear
"D", # pydocstyle
"E", # pycodestyle errors
"F", # pyflakes
"I", # isort
"N", # pep8-naming conventions
"W", # pycodestyle warnings
"C4", # comprehensions
"PL", # pylint
"PT", # flake8-pytest-style
"PIE", # misc lints
"PYI", # flake8-pyi
"TID", # tidy imports
"TCH", # type-checking imports
"RUF", # Ruff-specific rules
"RSE", # flake8-raise
"ICN001", # unconventional-import-alias
]
ignore = [
"B905", # zip() without strict= (ty doesn't support strict parameter)
"N803", # Argument name should be lowercase (G for graph is standard)
"N806", # Non-lowercase variable in function
"PLR0911", # Too many returns
"PLR0912", # Too many branches
"PLR0913", # Too many arguments to function call
"PLR0914", # Too many locals
"PLR0915", # Too many statements
"PLR1702", # Too many nested-blocks
"PLC0415", # Local imports which may be performance related
"PLR2004", # Magic numbers
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401", "F403"]
"tests/**" = ["D", "PLR2004"] # No docstrings or magic number checks in tests
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.format]
docstring-code-format = true
# ===== ty =====
[tool.ty.src]
# ty auto-detects src/ directory
exclude = ["examples/"]
# ===== Pytest =====
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "--doctest-modules"
doctest_optionflags = "NORMALIZE_WHITESPACE"
# ===== Coverage =====
[tool.coverage.run]
source = ["src/graphrc"]
branch = true
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"raise NotImplementedError",
]