wn-dev-std 2026.6.27__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. wn_dev_std/__init__.py +47 -0
  2. wn_dev_std/__main__.py +3 -0
  3. wn_dev_std/_version.py +3 -0
  4. wn_dev_std/check_profiles.py +208 -0
  5. wn_dev_std/checks.py +759 -0
  6. wn_dev_std/cli/__init__.py +1 -0
  7. wn_dev_std/cli/commands/__init__.py +1 -0
  8. wn_dev_std/cli/commands/audit.py +75 -0
  9. wn_dev_std/cli/commands/check.py +25 -0
  10. wn_dev_std/cli/commands/log.py +30 -0
  11. wn_dev_std/cli/commands/log_create.py +50 -0
  12. wn_dev_std/cli/commands/log_list.py +88 -0
  13. wn_dev_std/cli/commands/log_show.py +78 -0
  14. wn_dev_std/cli/commands/plan.py +32 -0
  15. wn_dev_std/cli/commands/plan_common.py +101 -0
  16. wn_dev_std/cli/commands/plan_create.py +59 -0
  17. wn_dev_std/cli/commands/plan_list.py +87 -0
  18. wn_dev_std/cli/commands/plan_show.py +89 -0
  19. wn_dev_std/cli/commands/plan_status.py +42 -0
  20. wn_dev_std/cli/commands/plan_step.py +111 -0
  21. wn_dev_std/cli/commands/standard.py +68 -0
  22. wn_dev_std/cli/commands/version.py +71 -0
  23. wn_dev_std/cli/main.py +53 -0
  24. wn_dev_std/cli/types.py +20 -0
  25. wn_dev_std/compatibility_pruning.py +233 -0
  26. wn_dev_std/config.py +85 -0
  27. wn_dev_std/cpp_policy.py +42 -0
  28. wn_dev_std/design_doc_status.py +98 -0
  29. wn_dev_std/native_complexity.py +108 -0
  30. wn_dev_std/plan_hygiene.py +596 -0
  31. wn_dev_std/plan_mutation.py +406 -0
  32. wn_dev_std/plan_reader.py +25 -0
  33. wn_dev_std/pr_hygiene.py +168 -0
  34. wn_dev_std/root_discovery.py +102 -0
  35. wn_dev_std/secret_hygiene.py +34 -0
  36. wn_dev_std/standards.py +756 -0
  37. wn_dev_std-2026.6.27.dist-info/METADATA +379 -0
  38. wn_dev_std-2026.6.27.dist-info/RECORD +41 -0
  39. wn_dev_std-2026.6.27.dist-info/WHEEL +4 -0
  40. wn_dev_std-2026.6.27.dist-info/entry_points.txt +3 -0
  41. wn_dev_std-2026.6.27.dist-info/licenses/LICENSE +21 -0
wn_dev_std/__init__.py ADDED
@@ -0,0 +1,47 @@
1
+ """Wavenumber development standards reference package."""
2
+
3
+ from wn_dev_std._version import __version__
4
+ from wn_dev_std.standards import (
5
+ ProfileName,
6
+ PythonStandard,
7
+ StrictRule,
8
+ default_cpp_standard,
9
+ default_csharp_standard,
10
+ default_javascript_web_standard,
11
+ default_mixed_mode_standard,
12
+ default_python_js_standard,
13
+ default_python_standard,
14
+ default_standard,
15
+ default_zephyr_standard,
16
+ render_cpp_standard,
17
+ render_csharp_standard,
18
+ render_javascript_web_standard,
19
+ render_mixed_mode_standard,
20
+ render_python_js_standard,
21
+ render_python_standard,
22
+ render_standard,
23
+ render_zephyr_standard,
24
+ )
25
+
26
+ __all__ = [
27
+ "__version__",
28
+ "ProfileName",
29
+ "PythonStandard",
30
+ "StrictRule",
31
+ "default_csharp_standard",
32
+ "default_cpp_standard",
33
+ "default_javascript_web_standard",
34
+ "default_mixed_mode_standard",
35
+ "default_python_js_standard",
36
+ "default_python_standard",
37
+ "default_standard",
38
+ "default_zephyr_standard",
39
+ "render_csharp_standard",
40
+ "render_cpp_standard",
41
+ "render_javascript_web_standard",
42
+ "render_mixed_mode_standard",
43
+ "render_python_js_standard",
44
+ "render_python_standard",
45
+ "render_standard",
46
+ "render_zephyr_standard",
47
+ ]
wn_dev_std/__main__.py ADDED
@@ -0,0 +1,3 @@
1
+ from wn_dev_std.cli.main import main
2
+
3
+ raise SystemExit(main())
wn_dev_std/_version.py ADDED
@@ -0,0 +1,3 @@
1
+ """Package version metadata."""
2
+
3
+ __version__ = "2026.6.27"
@@ -0,0 +1,208 @@
1
+ """Profile-specific conformance constants for repository checks."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from collections.abc import Mapping
6
+ from typing import Literal
7
+
8
+ ProfileName = Literal[
9
+ "python-package",
10
+ "python-native-wasm",
11
+ "cpp-library",
12
+ "csharp-app",
13
+ "javascript-web-app",
14
+ "python-js-app",
15
+ "zephyr-firmware",
16
+ ]
17
+ SUPPORTED_PROFILES = (
18
+ "python-package",
19
+ "python-native-wasm",
20
+ "cpp-library",
21
+ "csharp-app",
22
+ "javascript-web-app",
23
+ "python-js-app",
24
+ "zephyr-firmware",
25
+ )
26
+
27
+ REQUIRED_ROOT_FILES = (
28
+ ".gitattributes",
29
+ ".gitignore",
30
+ "AGENTS.md",
31
+ "CHANGELOG.md",
32
+ "CONTRIBUTING.md",
33
+ "LICENSE",
34
+ "README.md",
35
+ "pyproject.toml",
36
+ )
37
+
38
+ REQUIRED_DOC_PATHS = (
39
+ "docs/setup.html",
40
+ "docs/architecture.html",
41
+ "docs/design",
42
+ "docs/contracts",
43
+ "docs/releases",
44
+ )
45
+
46
+ MIXED_MODE_REQUIRED_PATHS = (
47
+ ".clang-format",
48
+ ".clang-tidy",
49
+ "CMakeLists.txt",
50
+ "CMakePresets.json",
51
+ "dist/README.md",
52
+ "scripts/validate_native.py",
53
+ "scripts/validate_python_package.py",
54
+ )
55
+
56
+ CPP_REQUIRED_PATHS = (
57
+ ".clang-format",
58
+ ".clang-tidy",
59
+ "CMakeLists.txt",
60
+ "CMakePresets.json",
61
+ "signoff.toml",
62
+ )
63
+
64
+ ZEPHYR_REQUIRED_PATHS = (
65
+ ".clang-format",
66
+ ".clang-tidy",
67
+ "signoff.toml",
68
+ "src",
69
+ "tests/rack.toml",
70
+ "wn-dev-std.toml",
71
+ )
72
+
73
+ CSHARP_REQUIRED_PATHS = (
74
+ ".editorconfig",
75
+ ".gitattributes",
76
+ ".gitignore",
77
+ "AGENTS.md",
78
+ "Directory.Build.props",
79
+ "README.md",
80
+ "build.ps1",
81
+ "src",
82
+ "tests",
83
+ "wn-dev-std.toml",
84
+ )
85
+
86
+ CSHARP_REQUIRED_DOC_PATHS = (
87
+ "docs/setup.html",
88
+ "docs/architecture.html",
89
+ "docs/design",
90
+ "docs/contracts",
91
+ "docs/releases",
92
+ )
93
+
94
+ CSHARP_ANALYZER_PROPS = (
95
+ ("EnforceCodeStyleInBuild", "true"),
96
+ ("EnableNETAnalyzers", "true"),
97
+ )
98
+
99
+ CSHARP_EDITORCONFIG_RULES = (
100
+ "dotnet_diagnostic.CA1502.severity = error",
101
+ "dotnet_diagnostic.CA1505.severity = error",
102
+ "dotnet_diagnostic.CA1506.severity = error",
103
+ )
104
+
105
+ JAVASCRIPT_WEB_REQUIRED_PATHS = (
106
+ "src",
107
+ "tests/rack.toml",
108
+ )
109
+
110
+ JAVASCRIPT_WEB_REQUIRED_ROOT_FILES = (
111
+ ".gitattributes",
112
+ ".gitignore",
113
+ "AGENTS.md",
114
+ "README.md",
115
+ "src",
116
+ "tests",
117
+ "wn-dev-std.toml",
118
+ )
119
+
120
+ PYTHON_JS_REQUIRED_ROOT_FILES = (
121
+ ".gitattributes",
122
+ ".gitignore",
123
+ "AGENTS.md",
124
+ "README.md",
125
+ "pyproject.toml",
126
+ "src",
127
+ "tests",
128
+ "wn-dev-std.toml",
129
+ )
130
+
131
+ PYTHON_JS_REQUIRED_DOC_PATHS = (
132
+ "docs/setup.html",
133
+ "docs/architecture.html",
134
+ "docs/design",
135
+ "docs/design/javascript-standard.html",
136
+ "docs/contracts",
137
+ "docs/releases",
138
+ )
139
+
140
+ CLANG_FORMAT_REQUIRED_SETTINGS = {
141
+ "BasedOnStyle": "LLVM",
142
+ "BreakBeforeBraces": "Allman",
143
+ "IndentWidth": "4",
144
+ "ColumnLimit": "100",
145
+ "PointerAlignment": "Left",
146
+ "SortIncludes": "true",
147
+ "IncludeBlocks": "Preserve",
148
+ }
149
+ ZEPHYR_CLANG_FORMAT_REQUIRED_SETTINGS = {
150
+ "BasedOnStyle": "LLVM",
151
+ "BreakBeforeBraces": "Attach",
152
+ "IndentWidth": "4",
153
+ "ColumnLimit": "100",
154
+ "PointerAlignment": "Right",
155
+ "SortIncludes": "Never",
156
+ }
157
+
158
+
159
+ def project_profile(config: Mapping[str, object] | None) -> ProfileName:
160
+ """Return the configured profile, defaulting to the Python package profile."""
161
+ if config is None:
162
+ return "python-package"
163
+ profile = config.get("profile")
164
+ if isinstance(profile, str) and profile in SUPPORTED_PROFILES:
165
+ return profile
166
+ return "python-package"
167
+
168
+
169
+ def required_root_files(profile: ProfileName) -> tuple[str, ...]:
170
+ """Return root paths required for a profile."""
171
+ if profile == "cpp-library":
172
+ return tuple(path for path in REQUIRED_ROOT_FILES if path != "pyproject.toml")
173
+ if profile == "zephyr-firmware":
174
+ return (
175
+ ".clang-format",
176
+ ".clang-tidy",
177
+ ".gitattributes",
178
+ ".gitignore",
179
+ "AGENTS.md",
180
+ "README.md",
181
+ "signoff.toml",
182
+ "wn-dev-std.toml",
183
+ )
184
+ if profile == "csharp-app":
185
+ return CSHARP_REQUIRED_PATHS
186
+ if profile == "javascript-web-app":
187
+ return JAVASCRIPT_WEB_REQUIRED_ROOT_FILES
188
+ if profile == "python-js-app":
189
+ return PYTHON_JS_REQUIRED_ROOT_FILES
190
+ return REQUIRED_ROOT_FILES
191
+
192
+
193
+ def required_doc_paths(profile: ProfileName) -> tuple[str, ...]:
194
+ """Return documentation paths required for a profile."""
195
+ if profile == "csharp-app":
196
+ return CSHARP_REQUIRED_DOC_PATHS
197
+ if profile in {"javascript-web-app", "python-js-app"}:
198
+ return PYTHON_JS_REQUIRED_DOC_PATHS
199
+ if profile == "zephyr-firmware":
200
+ return (
201
+ "docs/setup.html",
202
+ "docs/architecture.html",
203
+ "docs/design",
204
+ "docs/design/zephyr-standard.html",
205
+ "docs/contracts",
206
+ "docs/releases",
207
+ )
208
+ return REQUIRED_DOC_PATHS