22 lib ,
33 buildPythonPackage ,
44 fetchFromGitHub ,
5+
6+ cmake ,
7+ ninja ,
58 # build-system
69 hatchling ,
710 scikit-build-core ,
811 hatch-vcs ,
912 nanobind ,
1013 # deps
1114 antlr4-python3-runtime ,
12- attrs ,
15+ atopile-easyeda2kicad ,
16+ black ,
1317 case-converter ,
14- cattrs ,
15- click ,
16- deepdiff ,
17- easyeda2ato ,
18- eseries ,
19- fake-useragent ,
20- fastapi ,
18+ cookiecutter ,
19+ dataclasses-json ,
20+ deprecated ,
21+ fastapi-github-oidc ,
22+ freetype-py ,
2123 gitpython ,
22- igraph ,
23- jinja2 ,
24+ kicad-python ,
25+ kicadcliwrapper ,
26+ matplotlib ,
27+ mcp ,
28+ more-itertools ,
2429 natsort ,
25- networkx ,
26- pandas ,
30+ numpy ,
31+ ordered-set ,
32+ pathvalidate ,
2733 pint ,
34+ posthog ,
35+ psutil ,
36+ pydantic-settings ,
2837 pygls ,
29- quart-cors ,
30- quart-schema ,
31- quart ,
38+ questionary ,
39+ requests ,
3240 rich ,
3341 ruamel-yaml ,
34- schema ,
35- scipy ,
42+ ruff ,
3643 semver ,
37- toolz ,
44+ sexpdata ,
45+ shapely ,
46+ typer ,
3847 urllib3 ,
39- uvicorn ,
40- watchfiles ,
41- pyyaml ,
48+ zstd ,
49+ pythonOlder ,
50+
4251 # tests
4352 pytestCheckHook ,
44- pytest-xdist ,
53+
54+ pytest-benchmark ,
4555 pytest-timeout ,
56+ pytest-datafiles ,
57+ pytest-xdist ,
58+ hypothesis ,
59+ writableTmpDirAsHomeHook ,
4660} :
4761
4862buildPythonPackage rec {
4963 pname = "atopile" ;
50- version = "0.2.69 " ;
64+ version = "0.11.2 " ;
5165 pyproject = true ;
5266
67+ disabled = pythonOlder "3.13" ;
68+
5369 src = fetchFromGitHub {
5470 owner = "atopile" ;
5571 repo = "atopile" ;
5672 tag = "v${ version } " ;
57- hash = "sha256-mQYnaWch0lVzz1hV6WboYxBGe3ruw+mK2AwMx13DQJM =" ;
73+ hash = "sha256-JczlQulHlViV9pg0uPXd9Boagp74VBdZ1UMDXh2c3DA =" ;
5874 } ;
5975
6076 build-system = [
@@ -64,59 +80,142 @@ buildPythonPackage rec {
6480 nanobind
6581 ] ;
6682
83+ dontUseCmakeConfigure = true ; # skip cmake configure invocation
84+
85+ nativeBuildInputs = [
86+ cmake
87+ ninja
88+ ] ;
89+
6790 dependencies = [
6891 antlr4-python3-runtime
69- attrs
92+ atopile-easyeda2kicad
93+ black # used as a dependency
7094 case-converter
71- cattrs
72- click
73- deepdiff
74- easyeda2ato
75- eseries
76- fake-useragent
77- fastapi
95+ cookiecutter
96+ dataclasses-json
97+ deprecated
98+ fastapi-github-oidc
99+ freetype-py
78100 gitpython
79- igraph
80- jinja2
101+ kicad-python
102+ kicadcliwrapper
103+ matplotlib
104+ mcp
105+ more-itertools
81106 natsort
82- networkx
83- pandas
107+ numpy
108+ ordered-set
109+ pathvalidate
84110 pint
111+ posthog
112+ psutil
113+ pydantic-settings
85114 pygls
86- quart-cors
87- quart-schema
88- quart
115+ questionary
116+ requests
89117 rich
90118 ruamel-yaml
91- schema
92- scipy
119+ ruff
93120 semver
94- toolz
121+ sexpdata
122+ shapely
123+ typer
95124 urllib3
96- uvicorn
97- watchfiles
98- pyyaml # required for ato
125+ zstd
99126 ] ;
100127
101- pythonRelaxDeps = [ "antlr4-python3-runtime" ] ;
128+ pythonRelaxDeps = [
129+ "posthog"
130+ "zstd"
131+ ] ;
102132
103133 pythonImportsCheck = [ "atopile" ] ;
104134
135+ nativeCheckInputs = [
136+ writableTmpDirAsHomeHook
137+ pytestCheckHook
138+ pytest-xdist
139+ pytest-benchmark
140+ pytest-datafiles
141+ pytest-timeout
142+ hypothesis
143+ ] ;
144+
105145 preCheck = ''
146+ # do not report worker logs to filee
147+ substituteInPlace test/conftest.py \
148+ --replace-fail "worker_id =" "worker_id = None #"
149+
150+ # unrecognized flags
106151 substituteInPlace pyproject.toml \
107152 --replace-fail "--html=artifacts/test-report.html" "" \
108- --replace-fail "--self-contained-html" ""
153+ --replace-fail "--self-contained-html" "" \
154+ --replace-fail "--numprocesses=auto" "" \
155+
156+ # Replace this function call that cause test to hang
157+ substituteInPlace \
158+ test/cli/test_packages.py \
159+ test/library/test_names.py \
160+ test/test_examples.py \
161+ test/test_parse_utils.py \
162+ --replace-fail "_repo_root()" "Path('$(pwd)')"
163+
164+ # Fix crash due to empty list in fixture tests
165+ substituteInPlace \
166+ test/test_examples.py \
167+ test/test_parse_utils.py \
168+ --replace-fail "p.stem" "p.stem if isinstance(p, Path) else p"
109169 '' ;
110170
111- nativeCheckInputs = [
112- pytestCheckHook
113- pytest-xdist
114- pytest-timeout
171+ disabledTestPaths = [
172+ # timouts
173+ "test/test_cli.py"
174+ "test/cli/test_packages.py"
175+ "test/end_to_end/test_net_naming.py"
176+ "test/end_to_end/test_pcb_export.py"
177+ "test/exporters/bom/test_bom.py"
178+ "test/front_end/test_front_end_pick.py"
179+ "test/libs/picker/test_pickers.py"
180+ ] ;
181+
182+ disabledTests = [
183+ # timeout
184+ "test_build_error_logging"
185+ "test_performance_mifs_bus_params"
186+ "test_resistor"
187+ "test_reserved_attrs"
188+ # requires internet
189+ "test_simple_pick"
190+ "test_simple_negative_pick"
191+ "test_jlcpcb_pick_resistor"
192+ "test_jlcpcb_pick_capacitor"
193+ "test_regression_rp2040_usb_diffpair_full"
194+ "test_model_translations"
195+ # type error
196+ "test_alternate_trait_constructor_with_params"
197+ "test_parameterised_trait_with_params"
198+ "test_trait_alternate_constructor_precedence"
199+ "test_trait_template_enum"
200+ "test_trait_template_enum_invalid"
201+ # failure
202+ "test_solve_voltage_divider_complex"
115203 ] ;
116204
205+ # in order to use pytest marker, we need to use ppytestFlagsArray
206+ # using pytestFlags causes `ERROR: file or directory not found: slow`
207+ pytestFlagsArray = [
208+ "-m='not slow and not not_in_ci and not regression'"
209+ "--timeout=10" # any test taking long, timouts with more than 60s
210+ "--benchmark-disable"
211+ "--tb=line"
212+ ] ;
213+
214+ doCheck = true ;
215+
117216 meta = {
118217 description = "Design circuit boards with code" ;
119- homepage = "https://aiopg.readthedocs.io/ " ;
218+ homepage = "https://atopile.io " ;
120219 downloadPage = "https://github.com/atopile/atopile" ;
121220 changelog = "https://github.com/atopile/atopile/releases/tag/${ src . rev } " ;
122221 license = with lib . licenses ; [ mit ] ;
0 commit comments