-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
178 lines (161 loc) · 5.19 KB
/
Copy pathpyproject.toml
File metadata and controls
178 lines (161 loc) · 5.19 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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
[build-system]
requires = ["setuptools>=45", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "cobra"
version = "1.5.0"
description = "COBRA - A Circuit-Level Open-Source Based RFIC AI-Assisted Optimizer"
readme = "README.md"
license = {text = "Apache-2.0"}
authors = [
{name = "David Lurz", email = "david.lurz@fau.de"},
{name = "Gianluca Simone", email = "gianluca.simone@fau.de"},
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)",
]
requires-python = ">=3.11"
dependencies = [
"scikit-rf",
"numpy",
"pandas",
"PySide6",
"onnxruntime",
"tqdm",
"optuna",
"optunahub",
"matplotlib",
"pyqtgraph",
"huggingface-hub",
"gmsh",
]
# ORCA supplies the geometry presets/classes used by EM fine-tuning. COBRA guards
# every ORCA import and degrades gracefully when it is absent, so it stays optional:
# uv sync --extra orca (or) pip install -e ".[orca]"
#
# The marker is required: ORCA pins itself to 3.12 (via ihp-gdsfactory), while COBRA
# itself supports 3.11-3.14. Without it the universal resolve fails on every other
# interpreter. Drop the marker once ORCA supports the same range as COBRA.
[project.optional-dependencies]
orca = [
"orca @ git+https://github.com/DI-PASSIONATE/ORCA.git ; python_version >= '3.12' and python_version < '3.13'",
]
[project.scripts]
cobra = "cobra.__main__:main"
# Linters and the test runner are development tools, not runtime requirements.
# `uv sync` installs this group by default; `uv sync --no-dev` skips it for a
# runtime-only install.
[dependency-groups]
dev = [
"ruff",
"ty",
"pytest",
"pytest-cov",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-ra --strict-markers --strict-config"
xfail_strict = true
[tool.coverage.run]
source = ["src/cobra"]
branch = true
[tool.coverage.report]
show_missing = true
exclude_also = [
"if TYPE_CHECKING:",
"raise NotImplementedError",
"@(abc\\.)?abstractmethod",
]
[tool.setuptools]
include-package-data = true
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools.package-dir]
cobra = "src/cobra"
[tool.ruff]
line-length = 100
target-version = "py311"
# Resolve first-party imports out of the src layout.
src = ["src"]
# Scratch/vendored trees that are not part of the package.
extend-exclude = ["Ignore"]
[tool.ruff.lint]
select = [
"ALL", # include all the rules, including new ones
]
ignore = [
#### modules
"ANN", # flake8-annotations: full annotation coverage is not a project goal
"COM", # flake8-commas: trailing commas are the formatter's job
"C90", # mccabe complexity: PLR0912/PLR0915 cover this better
"CPY", # flake8-copyright: no per-file copyright headers in this project
"DJ", # django
"EM", # exception messages inline, consistent with TRY003 below
"EXE", # flake8-executable
"FBT", # boolean traps: unavoidable in Qt slots and config flags
"PD", # pandas-vet: false positives on numpy/scikit-rf `.values`
"T10", # debugger
"TID", # flake8-tidy-imports
#### specific rules
"D100", # ignore missing docs
"D101",
"D102",
"D103",
"D104",
"D105",
"D106",
"D107",
"D200",
"D203", # incompatible with D211; D211 is the convention here
"D205",
"D212", # summary placement is not enforced; both styles exist in the tree
"D400",
"D401",
"D415",
"E402", # false positives for local imports
"E501", # line too long
"N802", # RF symbols keep their conventional casing (S, Z, Y, N, K, ...)
"N803",
"N806",
"PLC0415", # imports are deliberately local to keep Palace/ORCA/GUI optional
"PLR0911", # simulation and GUI setup code is legitimately branch-heavy
"PLR0912",
"PLR0913",
"PLR0915",
"PLR0917",
"PLR2004", # magic-value comparison is noise in numeric/engineering code
"PTH", # os.path is used throughout; migrating is a separate refactor
"RUF001", # ambiguous unicode: units and symbols (µ, Ω, °) are intentional
"RUF002",
"RUF003",
"S603", # the Xyce subprocess call is the point of the simulator
"TRY003", # external messages in exceptions are too verbose
"TD002",
"TD003",
"FIX002", # too verbose descriptions of todos
]
[tool.ruff.lint.per-file-ignores]
# Examples are standalone scripts, not an importable package.
"examples/*" = ["INP001", "T201"]
# Tests assert, reach into private helpers deliberately, and use fixtures that
# look like shadowed or unused arguments to the linter.
"tests/*" = [
"S101", # assert is how pytest works
"ARG001",
"ARG002",
"PLR6301",
"SLF001", # pinning private behaviour (_tell, _parse_target) is the point
"TC003",
"T201", # printing is how a test script reports
]
[tool.ruff.lint.pydocstyle]
convention = "google"