-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
125 lines (102 loc) · 6.23 KB
/
pyproject.toml
File metadata and controls
125 lines (102 loc) · 6.23 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
[project]
name = "rf_chain_modeling" # Modification du tiret (-) en underscore (_) FR-STD-06
version = "0.1.2.dev1"
description = "RF Signal Simulation and Analysis Framework"
readme = "README.md"
license = { file = "LICENSE" }
authors = [
{ name = "Pessel Arnaud", email = "99908667+dunaar@users.noreply.github.com" }
]
keywords = ["radio-frequency", "simulation", "signal-processing", "python"]
requires-python = ">=3.12"
dependencies = [
"matplotlib>=3.10.0,<4.0",
"numpy>=2.0.0,<3.0",
"scipy>=1.13.0,<2.0",
"tqdm>=4.67.0",
]
[project.optional-dependencies]
dev = [
"pytest>=9.0.0",
"ruff>=0.4.0",
]
[project.urls]
Homepage = "https://github.com/dunaar/RF_chain_modeling"
Repository = "https://github.com/dunaar/RF_chain_modeling"
DOI = "https://doi.org/10.5281/zenodo.18145792"
[build-system]
requires = ["setuptools>=72", "wheel"]
build-backend = "setuptools.build_meta"
# ==============================================================================
# FUNCTIONAL REQUIREMENTS & SPECIFICATIONS
# This section defines binding rules for all contributors, automated tools,
# and AI language models (LLMs) assisting with this project.
# Any generated or reviewed code MUST comply with all requirements below.
# ==============================================================================
[tool.project-requirements]
# ── Chapter 1 — Project Overview & Standards ──────────────────────────────────
[tool.project-requirements.standards]
description = "Coding and documentation standards that apply to the entire codebase."
[[tool.project-requirements.standards.items]]
id = "FR-STD-01"
shall = "The project source code (strictly including all comments, variable names, docstrings, and log messages) shall be written entirely in English."
rationale = "Ensures readability and maintainability for international contributors and tooling."
verification = "Code inspection, CI lint rules (ruff), pre-commit hooks."
scope = "src/, tests/"
[[tool.project-requirements.standards.items]]
id = "FR-STD-02"
shall = "The project documentation (technical guides, user manuals, and API references) shall follow the Google docstring style."
rationale = "Consistency across the codebase; compatible with Sphinx napoleon extension."
verification = "Documentary inspection, release checklist, ruff D-rules with convention = 'google'."
scope = "src/"
[[tool.project-requirements.standards.items]]
id = "FR-STD-03"
shall = "Each source file shall include a standardized header containing project name, module description, author, date, version, and license, with the exception of empty __init__.py package marker files."
rationale = "Traceability and legal compliance. Empty __init__.py files are exempt as they serve only as namespace markers."
verification = "Pre-commit script verifying header presence (ignoring 0-byte __init__.py files); code review."
scope = "src"
[[tool.project-requirements.standards.items]]
id = "FR-STD-04"
shall = "All public classes and methods shall include a Google-style docstring covering: one-line summary, Args, and Returns sections."
rationale = "API discoverability and auto-generated documentation quality."
verification = "ruff D-rules, inspection, docstring coverage tool."
scope = "src/"
[[tool.project-requirements.standards.items]]
id = "FR-STD-05"
shall = "The project shall use Python logging for all runtime messages and shall not use print() in production code."
rationale = "Allows runtime log-level control without code changes; avoids stdout pollution."
verification = "CI static check (ruff T201 rule rejects print()); code review verifies logger usage."
scope = "src/"
[[tool.project-requirements.standards.items]]
id = "FR-STD-06"
shall = "All contributors, automated tools, and LLMs assisting with this project shall strictly preserve and respect underscore-based naming in all Python identifiers. Existing identifiers shall not be renamed by removing, adding, or moving underscores unless such a change is explicitly requested and justified. New function names, variable names, attributes, parameters, and module-level helper names shall follow snake_case with underscores used exactly as intended by Python naming conventions."
rationale = "Prevents accidental renaming by LLMs or contributors, preserves API consistency, and enforces Python naming readability and maintainability."
verification = "Code review, diff inspection, Ruff N-style checks when enabled, and manual verification of generated patches."
scope = "src, tests"
[[tool.project-requirements.standards.items]]
id = "FR-STD-07"
shall = "All contributors, automated tools, and LLMs shall preserve and maintain existing vertical alignments for assignment operators (=), colons (:) and hash (#) in dictionary definitions or parameter lists. Tools like auto-formatters must be configured to respect these visual tabular alignments."
rationale = "Maintains code readability for RF constants, parameters mapping, and tabular data structures."
verification = "Code review; visual inspection of diffs. Auto-formatters (e.g., Ruff format) must have alignment-breaking rules disabled where applicable."
scope = "src, tests"
# ── Setuptools configuration ──────────────────────────────────────────────────
[tool.setuptools.packages.find]
where = ["src"]
namespaces = false
[tool.setuptools.package-data]
"rf_chain_modeling.rf_components.data" = ["*.tsv"]
# ── Tool configurations ───────────────────────────────────────────────────────
[tool.ruff]
line-length = 150
target-version = "py312"
[tool.ruff.lint]
select = ["E", "F", "W", "I", "D", "T20"]
# D → docstring rules (FR-STD-02, FR-STD-04)
# T20 → T201 rejects print() (FR-STD-05)
[tool.ruff.lint.pydocstyle]
convention = "google" # FR-STD-02
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["D"] # test files exempt from docstring rules
[tool.pytest.ini_options]
testpaths = ["tests"]
#addopts = "-v -l"