easyeda-monkey 2026.5.26__tar.gz

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 (76) hide show
  1. easyeda_monkey-2026.5.26/.gitignore +10 -0
  2. easyeda_monkey-2026.5.26/CHANGELOG.md +20 -0
  3. easyeda_monkey-2026.5.26/CONTRIBUTING.md +79 -0
  4. easyeda_monkey-2026.5.26/LICENSE +21 -0
  5. easyeda_monkey-2026.5.26/PKG-INFO +161 -0
  6. easyeda_monkey-2026.5.26/README.md +139 -0
  7. easyeda_monkey-2026.5.26/docs/adrs/ADR-001-easyeda-native-data-model-and-api-conventions.md +99 -0
  8. easyeda_monkey-2026.5.26/docs/adrs/ADR-002-versioning-tagging-and-release-policy.md +47 -0
  9. easyeda_monkey-2026.5.26/docs/adrs/ADR-003-cli-command-and-dependency-discipline.md +56 -0
  10. easyeda_monkey-2026.5.26/docs/adrs/ADR-004-interface-design-doc-and-rack-ownership.md +44 -0
  11. easyeda_monkey-2026.5.26/docs/adrs/ADR-005-test-support-helper-location.md +41 -0
  12. easyeda_monkey-2026.5.26/docs/adrs/ADR-006-documentation-lifecycle-and-release-boundary.md +46 -0
  13. easyeda_monkey-2026.5.26/docs/adrs/README.md +12 -0
  14. easyeda_monkey-2026.5.26/docs/canonical_format/README.md +30 -0
  15. easyeda_monkey-2026.5.26/docs/design/README.md +15 -0
  16. easyeda_monkey-2026.5.26/docs/design/api/easyeda-native-data-model.html +293 -0
  17. easyeda_monkey-2026.5.26/docs/design/api/index.html +43 -0
  18. easyeda_monkey-2026.5.26/docs/design/cli/fetch-part.html +115 -0
  19. easyeda_monkey-2026.5.26/docs/design/cli/index.html +46 -0
  20. easyeda_monkey-2026.5.26/docs/design/index.html +73 -0
  21. easyeda_monkey-2026.5.26/docs/design/install-and-cli-tools.html +96 -0
  22. easyeda_monkey-2026.5.26/docs/design/quality-signoff-status.md +19 -0
  23. easyeda_monkey-2026.5.26/docs/design/styles.css +206 -0
  24. easyeda_monkey-2026.5.26/pyproject.toml +79 -0
  25. easyeda_monkey-2026.5.26/src/py/easyeda_monkey/__init__.py +3 -0
  26. easyeda_monkey-2026.5.26/src/py/easyeda_monkey/cli.py +50 -0
  27. easyeda_monkey-2026.5.26/src/py/easyeda_monkey/cli_command_types.py +14 -0
  28. easyeda_monkey-2026.5.26/src/py/easyeda_monkey/cli_commands/__init__.py +19 -0
  29. easyeda_monkey-2026.5.26/src/py/easyeda_monkey/cli_commands/fetch_part.py +171 -0
  30. easyeda_monkey-2026.5.26/src/py/easyeda_monkey/easyeda_3d_model.py +213 -0
  31. easyeda_monkey-2026.5.26/src/py/easyeda_monkey/easyeda_api.py +118 -0
  32. easyeda_monkey-2026.5.26/src/py/easyeda_monkey/easyeda_footprint.py +300 -0
  33. easyeda_monkey-2026.5.26/src/py/easyeda_monkey/easyeda_pad.py +79 -0
  34. easyeda_monkey-2026.5.26/src/py/easyeda_monkey/easyeda_pin.py +168 -0
  35. easyeda_monkey-2026.5.26/src/py/easyeda_monkey/easyeda_shapes.py +274 -0
  36. easyeda_monkey-2026.5.26/src/py/easyeda_monkey/easyeda_svg_path.py +176 -0
  37. easyeda_monkey-2026.5.26/src/py/easyeda_monkey/easyeda_symbol.py +217 -0
  38. easyeda_monkey-2026.5.26/src/py/easyeda_monkey/easyeda_types.py +71 -0
  39. easyeda_monkey-2026.5.26/tests/L0_foundation/STRATUM.toml +12 -0
  40. easyeda_monkey-2026.5.26/tests/L0_foundation/cases/api_responses/C132660__led_segment_sr410361n.json +318 -0
  41. easyeda_monkey-2026.5.26/tests/L0_foundation/cases/api_responses/C14663__capacitor_0402_100nf.json +226 -0
  42. easyeda_monkey-2026.5.26/tests/L0_foundation/cases/api_responses/C15127__regulator_ams1117_3v3.json +235 -0
  43. easyeda_monkey-2026.5.26/tests/L0_foundation/cases/api_responses/C2040__mcu_rp2040.json +447 -0
  44. easyeda_monkey-2026.5.26/tests/L0_foundation/cases/api_responses/C21190__resistor_0603_1k.json +218 -0
  45. easyeda_monkey-2026.5.26/tests/L0_foundation/cases/api_responses/C2488__mosfet_2n7002.json +253 -0
  46. easyeda_monkey-2026.5.26/tests/L0_foundation/cases/api_responses/C266603__sd_socket_sd_106m.json +261 -0
  47. easyeda_monkey-2026.5.26/tests/L0_foundation/cases/api_responses/C2890616__oled_n096_1608tbbig11_h13.json +258 -0
  48. easyeda_monkey-2026.5.26/tests/L0_foundation/cases/api_responses/C42413366__pled18s_internal_graphics.json +218 -0
  49. easyeda_monkey-2026.5.26/tests/L0_foundation/cases/api_responses/C429954__connector_usb_c.json +216 -0
  50. easyeda_monkey-2026.5.26/tests/L0_foundation/cases/api_responses/C5203974__smt_pogo_yz110615028f_01.json +198 -0
  51. easyeda_monkey-2026.5.26/tests/L0_foundation/cases/api_responses/C53078__led_matrix_fj2088bh.json +391 -0
  52. easyeda_monkey-2026.5.26/tests/L0_foundation/cases/api_responses/C57668__transistor_bc847b_215.json +224 -0
  53. easyeda_monkey-2026.5.26/tests/L0_foundation/cases/api_responses/C701343__esp32_wroom_32e_castellated.json +348 -0
  54. easyeda_monkey-2026.5.26/tests/L0_foundation/cases/api_responses/C7463411__lm317_to220_through_hole.json +207 -0
  55. easyeda_monkey-2026.5.26/tests/L0_foundation/cases/api_responses/C7471747__through_hole_pogo_yzp0436_30165_01.json +199 -0
  56. easyeda_monkey-2026.5.26/tests/L0_foundation/cases/api_responses/C7501824__rj45_hc_wk88_h16_db.json +237 -0
  57. easyeda_monkey-2026.5.26/tests/L0_foundation/cases/api_responses/C7950__opamp_lm358.json +249 -0
  58. easyeda_monkey-2026.5.26/tests/L0_foundation/cases/api_responses/C80192__power_step_powerstep01.json +592 -0
  59. easyeda_monkey-2026.5.26/tests/L0_foundation/cases/api_responses/C963370__usb_gt_usb_7010an.json +271 -0
  60. easyeda_monkey-2026.5.26/tests/L0_foundation/conftest.py +10 -0
  61. easyeda_monkey-2026.5.26/tests/L0_foundation/test_L0_001_symbol_parse.py +255 -0
  62. easyeda_monkey-2026.5.26/tests/L0_foundation/test_L0_002_symbol_roundtrip.py +66 -0
  63. easyeda_monkey-2026.5.26/tests/L0_foundation/test_L0_005_footprint_parse.py +242 -0
  64. easyeda_monkey-2026.5.26/tests/L0_foundation/test_L0_008_svg_path_parse.py +97 -0
  65. easyeda_monkey-2026.5.26/tests/L0_foundation/test_L0_009_3d_model.py +64 -0
  66. easyeda_monkey-2026.5.26/tests/L0_foundation/test_L0_010_cli_fetch_part.py +70 -0
  67. easyeda_monkey-2026.5.26/tests/L99_signoff/STRATUM.toml +82 -0
  68. easyeda_monkey-2026.5.26/tests/L99_signoff/test_L99_001_release_signoff.py +77 -0
  69. easyeda_monkey-2026.5.26/tests/L99_signoff/test_L99_002_design_docs.py +66 -0
  70. easyeda_monkey-2026.5.26/tests/L99_signoff/test_L99_003_quality_tools.py +43 -0
  71. easyeda_monkey-2026.5.26/tests/L99_signoff/test_L99_004_interface_design_docs.py +126 -0
  72. easyeda_monkey-2026.5.26/tests/README.md +25 -0
  73. easyeda_monkey-2026.5.26/tests/rack.toml +61 -0
  74. easyeda_monkey-2026.5.26/tests/support_scripts/install_test.py +111 -0
  75. easyeda_monkey-2026.5.26/tests/support_scripts/py_signoff.py +886 -0
  76. easyeda_monkey-2026.5.26/tests/support_scripts/py_signoff_baseline.json +23 -0
@@ -0,0 +1,10 @@
1
+ .venv/
2
+ dist/
3
+ build/
4
+ *.egg-info/
5
+ .pytest_cache/
6
+ .ruff_cache/
7
+ .pyright/
8
+ __pycache__/
9
+ *.py[cod]
10
+ tests/rack_results/
@@ -0,0 +1,20 @@
1
+ # Changelog
2
+
3
+ ## 2026.5.26
4
+
5
+ - Bootstrap `easyeda-monkey` as a standalone public package from the existing
6
+ EasyEDA parser package.
7
+ - Include EasyEDA/LCSC symbol, footprint, SVG path, pad, and 3D model reference
8
+ parser coverage using package-local saved API fixtures.
9
+ - Add public CI, release workflow, Rack tests, Python signoff, package build
10
+ checks, and clean install-test coverage.
11
+ - Add the `easyeda-monkey fetch-part` CLI and design-document signoff policy
12
+ for registered commands.
13
+ - Use an MIT license for the public package.
14
+ - Document `uv tool install` as the preferred CLI install path and `uv` as the
15
+ development/test workflow.
16
+ - Add ADR-003 for CLI command-module discipline and dependency minimization.
17
+ - Add API/interface design documentation with Rack test ownership checks.
18
+ - Move signoff and install-test helpers under `tests/support_scripts/`.
19
+ - Exclude developer-only planning and research docs from release artifacts
20
+ while promoting stable EasyEDA format references into `docs/canonical_format/`.
@@ -0,0 +1,79 @@
1
+ # Contributing
2
+
3
+ `easyeda-monkey` accepts direct public pull requests once CI is enabled.
4
+
5
+ Use `uv` for local development and test commands. Public CLI install
6
+ documentation should prefer `uv tool install easyeda-monkey`; use
7
+ `pip install easyeda-monkey` when documenting library use inside an existing
8
+ Python environment.
9
+
10
+ Before opening a PR:
11
+
12
+ 1. Keep changes focused on one parser, model, fixture, contract, or
13
+ infrastructure slice.
14
+ 2. Add or update tests for every public parser/API behavior change.
15
+ 3. Update docs for public interfaces, JSON behavior, or fixture contracts.
16
+ 4. Add or update `docs/design/` HTML for every public CLI command.
17
+ 5. Justify every new public feature, command, and dependency in the commit,
18
+ PR, or linked plan.
19
+ 6. Run package tests and signoff locally.
20
+
21
+ Minimize external dependencies. A new dependency must explain why the standard
22
+ library and existing project dependencies are not enough, whether it is
23
+ runtime/optional/test-only, its license compatibility, and the expected
24
+ packaging impact.
25
+
26
+ Expected local checks:
27
+
28
+ ```powershell
29
+ uv run --extra test rack run --all
30
+ ```
31
+
32
+ Release decisions, compatibility policy, and public contract changes should be
33
+ recorded in `docs/adrs/`.
34
+
35
+ ## Design Documentation Rules
36
+
37
+ `docs/` owns architecture, test, and contract documentation. `docs/design/`
38
+ contains human-readable and machine-inspectable HTML design docs.
39
+
40
+ Every public CLI command requires:
41
+
42
+ - a command registry entry in code;
43
+ - a matching `docs/design/cli/<command>.html` file;
44
+ - a link from `docs/design/cli/index.html`;
45
+ - usage, invocation, argument, output, and test sections.
46
+
47
+ Signoff fails when those links are missing. Commands with config files also
48
+ need a machine-readable contract and validation tests.
49
+
50
+ ## API Design Documentation Rules
51
+
52
+ Every public dataclass and major interface requires design documentation under
53
+ `docs/design/api/`.
54
+
55
+ Each interface design section must include:
56
+
57
+ - rationale for why the interface exists;
58
+ - purpose and ownership boundary;
59
+ - test requirements;
60
+ - a working definition;
61
+ - the Rack stratum and test target that exercise it.
62
+
63
+ L99 signoff fails when a dataclass or listed major interface lacks design
64
+ documentation or when the referenced Rack test ownership is missing.
65
+
66
+ ## CLI Structure Rules
67
+
68
+ The top-level CLI module is an orchestrator. It creates the root parser,
69
+ registers commands, handles global options, and dispatches command handlers.
70
+
71
+ Every public subcommand must live in its own module under
72
+ `easyeda_monkey.cli_commands`, even if the first implementation is small. The
73
+ command module owns command-specific arguments, behavior, output formatting,
74
+ and command-specific imports.
75
+
76
+ This convention is documented in
77
+ `docs/adrs/ADR-003-cli-command-and-dependency-discipline.md`. L99 signoff
78
+ checks the parts that are mechanically enforceable; reviewers can still reject
79
+ a PR when command or dependency justification is missing.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Wavenumber LLC
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,161 @@
1
+ Metadata-Version: 2.4
2
+ Name: easyeda-monkey
3
+ Version: 2026.5.26
4
+ Summary: Core EasyEDA / LCSC symbol, footprint, and 3D reference parsing tooling
5
+ Project-URL: Homepage, https://github.com/wavenumber-eng/easyeda_monkey
6
+ Project-URL: Repository, https://github.com/wavenumber-eng/easyeda_monkey
7
+ Project-URL: Issues, https://github.com/wavenumber-eng/easyeda_monkey/issues
8
+ Author: Wavenumber LLC
9
+ License: MIT
10
+ License-File: LICENSE
11
+ Requires-Python: <3.13,>=3.11
12
+ Requires-Dist: requests>=2.32.0
13
+ Provides-Extra: test
14
+ Requires-Dist: build>=1.2.0; extra == 'test'
15
+ Requires-Dist: pyright>=1.1.390; extra == 'test'
16
+ Requires-Dist: pytest-json-report; extra == 'test'
17
+ Requires-Dist: pytest>=8.0.0; extra == 'test'
18
+ Requires-Dist: ruff>=0.8.0; extra == 'test'
19
+ Requires-Dist: twine>=5.0.0; extra == 'test'
20
+ Requires-Dist: wn-rack>=1.1.0; extra == 'test'
21
+ Description-Content-Type: text/markdown
22
+
23
+ # EasyEDA Monkey
24
+
25
+ `easyeda_monkey` is a small Python package for reading EasyEDA / LCSC component
26
+ data into typed Python objects. It also exposes a small diagnostic CLI for
27
+ package-local fetch and inspection workflows.
28
+
29
+ Current scope:
30
+
31
+ - EasyEDA / LCSC component API responses
32
+ - schematic symbols
33
+ - PCB footprints
34
+ - 3D model references and URL extraction
35
+ - SVG path parsing helpers
36
+
37
+ The package is intentionally focused on parsing and close-to-format data
38
+ models. Larger workflow commands and conversion applications should live in
39
+ downstream tools.
40
+
41
+ ## Install
42
+
43
+ Install `uv` first if it is not already available:
44
+
45
+ ```powershell
46
+ powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
47
+ ```
48
+
49
+ On macOS or Linux:
50
+
51
+ ```bash
52
+ curl -LsSf https://astral.sh/uv/install.sh | sh
53
+ ```
54
+
55
+ For the command-line tool, use `uv tool install` so the executable is installed
56
+ in an isolated tool environment and exposed on PATH:
57
+
58
+ ```powershell
59
+ uv tool install easyeda-monkey
60
+ uv tool update-shell
61
+ easyeda-monkey --version
62
+ ```
63
+
64
+ For library use inside an existing Python environment:
65
+
66
+ ```powershell
67
+ pip install easyeda-monkey
68
+ ```
69
+
70
+ For development:
71
+
72
+ ```powershell
73
+ git clone https://github.com/wavenumber-eng/easyeda_monkey.git
74
+ cd easyeda_monkey
75
+ uv sync --extra test
76
+ ```
77
+
78
+ ## Testing
79
+
80
+ The active suite uses redistributable saved EasyEDA / LCSC API response
81
+ fixtures and does not require a private corpus.
82
+
83
+ ```powershell
84
+ uv run --extra test rack run --all
85
+ ```
86
+
87
+ Rack is the primary local gate. L99 signoff runs release metadata checks,
88
+ Python signoff, CLI design-doc checks, API design-doc checks, ruff, and pyright.
89
+
90
+ ## CLI
91
+
92
+ The package installs the `easyeda-monkey` console script.
93
+
94
+ ```powershell
95
+ easyeda-monkey --version
96
+ easyeda-monkey fetch-part C21190
97
+ easyeda-monkey fetch-part C21190 --cache-dir .cache/easyeda --output C21190.summary.json
98
+ ```
99
+
100
+ The top-level CLI module is only an orchestrator. Each public subcommand lives
101
+ in its own `easyeda_monkey.cli_commands` module, even when the command is
102
+ small.
103
+
104
+ ## Design And Test Docs
105
+
106
+ `docs/` is the source of truth for architecture, tests, and contracts. The
107
+ master design entry point is [docs/design/index.html](docs/design/index.html).
108
+
109
+ Every public CLI command must have a matching HTML design document under
110
+ `docs/design/cli/`. The filename must match the command name, and signoff fails
111
+ when a registered command is missing its design document.
112
+
113
+ Commands that accept config files must also define a machine-readable contract
114
+ and validation tests before release.
115
+
116
+ New public features, commands, and external dependencies need explicit
117
+ justification in the commit, PR, or linked plan. Prefer the standard library
118
+ and existing dependencies unless a new dependency has a clear install,
119
+ licensing, and maintenance case.
120
+
121
+ Every public dataclass and major interface needs design documentation under
122
+ `docs/design/api/`. L99 signoff fails when interface docs or Rack test
123
+ ownership are missing.
124
+
125
+ ## Fixture Model
126
+
127
+ Active fixtures live under:
128
+
129
+ - `tests/L0_foundation/cases/api_responses`
130
+
131
+ Broader fixture families should use this shape when needed:
132
+
133
+ - `input/`
134
+ - `reference_output/`
135
+ - `output/`
136
+
137
+ `output/` is transient and should stay local or temporary.
138
+
139
+ ## Scope Boundaries
140
+
141
+ Core package responsibilities:
142
+
143
+ - parse EasyEDA-native JSON structures into typed Python objects
144
+ - preserve EasyEDA-native semantics
145
+ - expose a clean parser/API surface for downstream converters
146
+
147
+ Deferred or downstream responsibilities:
148
+
149
+ - command-line workflow applications
150
+ - Altium, KiCad, or other EDA conversion policy
151
+ - private project corpus handling
152
+
153
+ ## Documentation
154
+
155
+ - [Architecture Decision Records](docs/adrs)
156
+ - [Design Notes](docs/design)
157
+ - [Plans](docs/plans)
158
+
159
+ ## License
160
+
161
+ MIT.
@@ -0,0 +1,139 @@
1
+ # EasyEDA Monkey
2
+
3
+ `easyeda_monkey` is a small Python package for reading EasyEDA / LCSC component
4
+ data into typed Python objects. It also exposes a small diagnostic CLI for
5
+ package-local fetch and inspection workflows.
6
+
7
+ Current scope:
8
+
9
+ - EasyEDA / LCSC component API responses
10
+ - schematic symbols
11
+ - PCB footprints
12
+ - 3D model references and URL extraction
13
+ - SVG path parsing helpers
14
+
15
+ The package is intentionally focused on parsing and close-to-format data
16
+ models. Larger workflow commands and conversion applications should live in
17
+ downstream tools.
18
+
19
+ ## Install
20
+
21
+ Install `uv` first if it is not already available:
22
+
23
+ ```powershell
24
+ powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
25
+ ```
26
+
27
+ On macOS or Linux:
28
+
29
+ ```bash
30
+ curl -LsSf https://astral.sh/uv/install.sh | sh
31
+ ```
32
+
33
+ For the command-line tool, use `uv tool install` so the executable is installed
34
+ in an isolated tool environment and exposed on PATH:
35
+
36
+ ```powershell
37
+ uv tool install easyeda-monkey
38
+ uv tool update-shell
39
+ easyeda-monkey --version
40
+ ```
41
+
42
+ For library use inside an existing Python environment:
43
+
44
+ ```powershell
45
+ pip install easyeda-monkey
46
+ ```
47
+
48
+ For development:
49
+
50
+ ```powershell
51
+ git clone https://github.com/wavenumber-eng/easyeda_monkey.git
52
+ cd easyeda_monkey
53
+ uv sync --extra test
54
+ ```
55
+
56
+ ## Testing
57
+
58
+ The active suite uses redistributable saved EasyEDA / LCSC API response
59
+ fixtures and does not require a private corpus.
60
+
61
+ ```powershell
62
+ uv run --extra test rack run --all
63
+ ```
64
+
65
+ Rack is the primary local gate. L99 signoff runs release metadata checks,
66
+ Python signoff, CLI design-doc checks, API design-doc checks, ruff, and pyright.
67
+
68
+ ## CLI
69
+
70
+ The package installs the `easyeda-monkey` console script.
71
+
72
+ ```powershell
73
+ easyeda-monkey --version
74
+ easyeda-monkey fetch-part C21190
75
+ easyeda-monkey fetch-part C21190 --cache-dir .cache/easyeda --output C21190.summary.json
76
+ ```
77
+
78
+ The top-level CLI module is only an orchestrator. Each public subcommand lives
79
+ in its own `easyeda_monkey.cli_commands` module, even when the command is
80
+ small.
81
+
82
+ ## Design And Test Docs
83
+
84
+ `docs/` is the source of truth for architecture, tests, and contracts. The
85
+ master design entry point is [docs/design/index.html](docs/design/index.html).
86
+
87
+ Every public CLI command must have a matching HTML design document under
88
+ `docs/design/cli/`. The filename must match the command name, and signoff fails
89
+ when a registered command is missing its design document.
90
+
91
+ Commands that accept config files must also define a machine-readable contract
92
+ and validation tests before release.
93
+
94
+ New public features, commands, and external dependencies need explicit
95
+ justification in the commit, PR, or linked plan. Prefer the standard library
96
+ and existing dependencies unless a new dependency has a clear install,
97
+ licensing, and maintenance case.
98
+
99
+ Every public dataclass and major interface needs design documentation under
100
+ `docs/design/api/`. L99 signoff fails when interface docs or Rack test
101
+ ownership are missing.
102
+
103
+ ## Fixture Model
104
+
105
+ Active fixtures live under:
106
+
107
+ - `tests/L0_foundation/cases/api_responses`
108
+
109
+ Broader fixture families should use this shape when needed:
110
+
111
+ - `input/`
112
+ - `reference_output/`
113
+ - `output/`
114
+
115
+ `output/` is transient and should stay local or temporary.
116
+
117
+ ## Scope Boundaries
118
+
119
+ Core package responsibilities:
120
+
121
+ - parse EasyEDA-native JSON structures into typed Python objects
122
+ - preserve EasyEDA-native semantics
123
+ - expose a clean parser/API surface for downstream converters
124
+
125
+ Deferred or downstream responsibilities:
126
+
127
+ - command-line workflow applications
128
+ - Altium, KiCad, or other EDA conversion policy
129
+ - private project corpus handling
130
+
131
+ ## Documentation
132
+
133
+ - [Architecture Decision Records](docs/adrs)
134
+ - [Design Notes](docs/design)
135
+ - [Plans](docs/plans)
136
+
137
+ ## License
138
+
139
+ MIT.
@@ -0,0 +1,99 @@
1
+ # ADR-001: EasyEDA Native Data Model and API Conventions
2
+
3
+ ## Status
4
+
5
+ Accepted.
6
+
7
+ ## Date
8
+
9
+ 2026-03-18.
10
+
11
+ ## Context
12
+
13
+ `easyeda-monkey` parses EasyEDA schematic symbols and PCB footprints from the
14
+ LCSC / JLCPCB component API. Downstream tools can then convert that typed native
15
+ model into other EDA formats.
16
+
17
+ The EasyEDA format is JSON-based with tilde-delimited shape strings. It is
18
+ smaller than Altium binary formats, but still needs a dedicated native model to
19
+ preserve source-format details before conversion.
20
+
21
+ ## Decision
22
+
23
+ ### 1. EasyEDA-Native Data Model First
24
+
25
+ The package exposes typed Python classes that represent EasyEDA JSON semantics:
26
+
27
+ - tilde-delimited string parsing
28
+ - EasyEDA coordinate systems
29
+ - EasyEDA-specific shape prefixes
30
+ - symbol pin `^^` segment parsing
31
+ - footprint pad, track, hole, via, and 3D model references
32
+
33
+ Downstream conversion policy is intentionally outside this package.
34
+
35
+ ### 2. Public Construction And Serialization
36
+
37
+ Primary public entry points:
38
+
39
+ - `EasyEdaSymbol.from_json(data_or_path)`
40
+ - `EasyEdaFootprint.from_json(data_or_path)`
41
+ - `EasyEdaApiClient.fetch_symbol(lcsc_id)`
42
+ - `EasyEdaApiClient.fetch_footprint(lcsc_id)`
43
+ - `EasyEdaApiClient.fetch_both(lcsc_id)`
44
+
45
+ Serialization methods:
46
+
47
+ - `.to_json()` returns a round-trippable dict.
48
+ - `.save(path)` writes JSON to disk.
49
+
50
+ The direct dataclass constructor remains available for advanced/internal use,
51
+ but parsing should go through `from_json` or the API client.
52
+
53
+ ### 3. API Client Is Separate From The Data Model
54
+
55
+ `easyeda_api.py` handles HTTP fetches from the LCSC API. Data model classes
56
+ accept parsed dictionaries or saved JSON fixture paths and do not perform HTTP
57
+ requests themselves.
58
+
59
+ ### 4. Minimal Core Dependencies
60
+
61
+ Core parsing uses the Python standard library. The API client uses `requests`.
62
+ The package avoids heavy model frameworks so downstream tools can embed it
63
+ without pulling in large application stacks.
64
+
65
+ ### 5. Scope
66
+
67
+ In scope:
68
+
69
+ - schematic symbols
70
+ - PCB footprints
71
+ - SVG path parsing helpers
72
+ - 3D model references and download URLs
73
+
74
+ Out of scope for the initial public package:
75
+
76
+ - full EasyEDA schematic document support
77
+ - EasyEDA Pro
78
+ - direct Altium/KiCad conversion commands
79
+ - authoring/building EasyEDA components
80
+
81
+ ## Consequences
82
+
83
+ Positive:
84
+
85
+ - Native model preserves source-format details for round-trip tests.
86
+ - Saved API fixture tests do not require network access.
87
+ - Downstream converters get a small parser dependency.
88
+
89
+ Tradeoffs:
90
+
91
+ - Format conversion remains the responsibility of downstream tools.
92
+ - Some inherited parser functions are complex and tracked in the signoff
93
+ baseline until they can be split safely.
94
+
95
+ ## Source Anchors
96
+
97
+ - EasyEDA format docs: https://docs.easyeda.com/en/DocumentFormat/EasyEDA-Document-Format/index.html
98
+ - Reference implementation studied for format behavior: https://github.com/uPesy/easyeda2kicad.py
99
+ - LCSC API shape: `https://easyeda.com/api/products/{LCSC_ID}/components?version=6.4.19.5`
@@ -0,0 +1,47 @@
1
+ # ADR-002: Versioning, Tagging, and Release Policy
2
+
3
+ ## Status
4
+
5
+ Accepted.
6
+
7
+ ## Context
8
+
9
+ `easyeda-monkey` is a public package and will be consumed by downstream tools.
10
+ Releases need to be reproducible from Git tags and automatable through GitHub
11
+ Actions.
12
+
13
+ ## Decision
14
+
15
+ The package uses date-based versions in `YYYY.M.DD` form. For example, the
16
+ May 26, 2026 release is `2026.5.26`.
17
+
18
+ Release tags use the package name and version:
19
+
20
+ ```text
21
+ easyeda-monkey/v2026.5.26
22
+ ```
23
+
24
+ Every release must include:
25
+
26
+ - a matching `pyproject.toml` version
27
+ - a matching `easyeda_monkey.__version__`
28
+ - a matching `CHANGELOG.md` entry
29
+ - a passing pytest suite
30
+ - a passing Rack suite
31
+ - a passing Python signoff baseline check
32
+ - successful source distribution and wheel builds
33
+ - successful `twine check`
34
+ - an installed-wheel install test
35
+
36
+ Release artifacts may include public reference docs such as ADRs, design docs,
37
+ canonical format docs, contracts, and tests. Developer planning and research
38
+ notes under `docs/plans/` and `docs/research/` are not part of the public
39
+ release artifacts and must be excluded from source distributions.
40
+
41
+ GitHub Actions is the preferred release path once PyPI Trusted Publishing is
42
+ configured for this repository.
43
+
44
+ ## Consequences
45
+
46
+ Downstream repos can pin exact package dates and exact Git tags. Old names or
47
+ pre-public internal package flows are not part of the public contract.
@@ -0,0 +1,56 @@
1
+ # ADR-003: CLI Command And Dependency Discipline
2
+
3
+ ## Status
4
+
5
+ Accepted.
6
+
7
+ ## Context
8
+
9
+ Python tools in this package family should stay small, easy to install, and
10
+ easy to review. `easyeda-monkey` is the first small public repo where this
11
+ convention is being codified, but the rule is intended for future tool repos as
12
+ well.
13
+
14
+ CLI commands can grow quickly if each command places parser setup, command
15
+ behavior, output formatting, and dependency imports into the top-level entry
16
+ point.
17
+
18
+ External dependencies also create long-term install, packaging, CI, and user
19
+ support costs. Even small dependencies need a reason to exist.
20
+
21
+ ## Decision
22
+
23
+ The top-level CLI module is an orchestrator only. It may create the root
24
+ argument parser, register subcommands, handle global options, dispatch handlers,
25
+ and expose command metadata for docs/signoff.
26
+
27
+ Each public subcommand must live in its own module under
28
+ `easyeda_monkey.cli_commands`. The command module owns command-specific parser
29
+ arguments, handler implementation, output behavior, and command-specific
30
+ imports.
31
+
32
+ Every new public CLI command requires:
33
+
34
+ - a command module;
35
+ - a command registry entry;
36
+ - a matching `docs/design/cli/<command>.html` design document;
37
+ - tests for behavior and help/registration;
38
+ - a short justification in the commit, PR, or plan.
39
+
40
+ Every tool in this package family should minimize external dependencies. New
41
+ dependencies are accepted only when the commit or PR explains:
42
+
43
+ - why the dependency is needed;
44
+ - why the standard library or existing project dependencies are not sufficient;
45
+ - expected install/package impact;
46
+ - license compatibility;
47
+ - whether the dependency is required, optional, or test-only.
48
+
49
+ ## Consequences
50
+
51
+ Reviewers can reject a command or dependency addition that lacks justification,
52
+ even when tests pass.
53
+
54
+ L99 signoff should enforce the parts that are mechanically checkable, including
55
+ the per-command module convention and matching design docs. Human review still
56
+ owns dependency justification quality.
@@ -0,0 +1,44 @@
1
+ # ADR-004: Interface Design Documentation And Rack Ownership
2
+
3
+ ## Status
4
+
5
+ Accepted.
6
+
7
+ ## Context
8
+
9
+ Dataclasses and major interfaces become long-lived contracts quickly. A class
10
+ can pass unit tests while still leaving future maintainers unclear about why it
11
+ exists, where its boundary is, or what behavior counts as working.
12
+
13
+ The test system already uses Rack strata as the release gate, so interface
14
+ documentation should point back to Rack-owned tests instead of separate ad hoc
15
+ checklists.
16
+
17
+ ## Decision
18
+
19
+ Every public dataclass and major interface requires design documentation under
20
+ `docs/design/api/`.
21
+
22
+ Each interface design section must include:
23
+
24
+ - rationale for why the interface exists;
25
+ - purpose and ownership boundary;
26
+ - test requirements;
27
+ - a working definition;
28
+ - Rack stratum and test target metadata.
29
+
30
+ L99 signoff scans source dataclasses and the major-interface list, then fails
31
+ if any required interface lacks design documentation.
32
+
33
+ L99 signoff also fails if an interface design section does not point to an
34
+ existing Rack stratum, existing test file, and test target. For nested data
35
+ classes, the exercising test may be an aggregate parser test when that is the
36
+ natural coverage boundary.
37
+
38
+ ## Consequences
39
+
40
+ New dataclasses and major interfaces require docs and tests in the same change.
41
+
42
+ The first enforcement pass checks source, design docs, Rack strata, test files,
43
+ and declared test targets. A later refinement can inspect Rack result reports
44
+ directly if the report format provides a stable machine-readable target map.