Skip to content

Commit 7f74b1a

Browse files
committed
fix: restore build config and use PyPI README
1 parent efeb53c commit 7f74b1a

1 file changed

Lines changed: 62 additions & 2 deletions

File tree

pyproject.toml

Lines changed: 62 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ build-backend = "maturin"
66
name = "qector-decoder-v3"
77
version = "0.5.0"
88
description = "Source-available Rust/Python QEC R&D platform: PyMatching-compatible validation, belief-matching, BP-OSD (LDPC/qLDPC), CPU/GPU batch decoding, and artifact-hashed benchmark evidence"
9-
readme = "README.md"
9+
readme = {file = "PYPI_README.md", content-type = "text/markdown"}
1010
requires-python = ">=3.9"
1111
license = {file = "LICENSE"}
1212
authors = [
1313
{name = "Guillaume Lessard / iD01t Productions", email = "admin@qector.store"}
1414
]
15-
keywords = ["quantum", "error correction", "decoder", "union-find", "QEC", "rust"]
15+
keywords = ["quantum", "error correction", "decoder", "union-find", "QEC", "rust", "MWPM", "Stim", "PyMatching", "LDPC", "qLDPC"]
1616
classifiers = [
1717
"Development Status :: 4 - Beta",
1818
"Intended Audience :: Science/Research",
@@ -77,4 +77,64 @@ all = [
7777
Homepage = "https://www.qector.store"
7878
Repository = "https://github.com/GuillaumeLessard/qector-decoder.git"
7979
Issues = "https://github.com/GuillaumeLessard/qector-decoder/issues"
80+
Documentation = "https://github.com/GuillaumeLessard/qector-decoder#readme"
8081
"Commercial licensing" = "https://www.qector.store"
82+
83+
[tool.maturin]
84+
python-source = "python"
85+
module-name = "qector_decoder_v3.qector_decoder_v3"
86+
manifest-path = "Cargo.toml"
87+
# Exclude all Rust source from sdist / wheel metadata -- compiled .so/.pyd only.
88+
# The src/ in this repo contains only a stub compile_error! placeholder.
89+
# The real source is injected at CI build time via encrypted Actions secrets.
90+
exclude = [
91+
"src/**",
92+
"tests/**",
93+
"actions-runner/**",
94+
"artifacts/**",
95+
"target/**",
96+
".venv/**",
97+
]
98+
# Strip debug symbols from compiled extension
99+
strip = true
100+
101+
[tool.pytest.ini_options]
102+
testpaths = ["python/tests"]
103+
python_files = ["test_*.py"]
104+
python_classes = ["Test*"]
105+
python_functions = ["test_*"]
106+
filterwarnings = [
107+
# Starlette's TestClient warns that httpx is deprecated in favor of httpx2;
108+
# this is upstream noise, not actionable from this project.
109+
"ignore::starlette.exceptions.StarletteDeprecationWarning",
110+
]
111+
112+
[tool.mypy]
113+
python_version = "3.10"
114+
warn_return_any = true
115+
warn_unused_configs = true
116+
ignore_missing_imports = true
117+
118+
[tool.ruff]
119+
line-length = 120
120+
target-version = "py39"
121+
122+
[tool.ruff.lint]
123+
# E702: semicolons used intentionally for chained one-liners in plotting helpers.
124+
# E731: lambda assignments used for compact callback tables in a few helpers.
125+
# E741: single-letter variable names (l, I, O) are domain-conventional in QEC math.
126+
# These are minor style choices that do not affect correctness.
127+
ignore = ["E702", "E731", "E741"]
128+
129+
[tool.ruff.lint.per-file-ignores]
130+
# __init__: late imports (E402) are intentional (runtime optional deps).
131+
"python/qector_decoder_v3/__init__.py" = ["E402"]
132+
# workbench.py: json imported for optional serialization path, Tuple aliased for py3.8 compat.
133+
"python/qector_decoder_v3/workbench.py" = ["F401"]
134+
# qiskit_plugin.py: Tuple re-exported for downstream type annotations.
135+
"python/qector_decoder_v3/qiskit_plugin.py" = ["F401"]
136+
# Test files: many use sys.path manipulation (E402), conditional imports (F401),
137+
# convenience imports kept for symmetry (F401), unused locals in scaffolding (F841),
138+
# f-strings used as comment-like strings for readability (F541).
139+
"python/tests/*.py" = ["E402", "F401", "F541", "F841"]
140+
"python/tests/**/*.py" = ["E402", "F401", "F541", "F841"]

0 commit comments

Comments
 (0)