From 1d7c5611c502e8181aee2c69e8be16885d42b64d Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Fri, 30 May 2025 23:37:23 +0200 Subject: [PATCH 01/22] python313Packages.kicadcliwrapper: init at 1.0.4 --- .../kicadcliwrapper/default.nix | 46 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 48 insertions(+) create mode 100644 pkgs/development/python-modules/kicadcliwrapper/default.nix diff --git a/pkgs/development/python-modules/kicadcliwrapper/default.nix b/pkgs/development/python-modules/kicadcliwrapper/default.nix new file mode 100644 index 000000000000..9135e8ee1851 --- /dev/null +++ b/pkgs/development/python-modules/kicadcliwrapper/default.nix @@ -0,0 +1,46 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + poetry-core, + typing-extensions, +}: + +buildPythonPackage rec { + pname = "kicadcliwrapper"; + version = "1.0.4"; + pyproject = true; + + src = fetchFromGitHub { + owner = "atopile"; + repo = "kicadcliwrapper"; + tag = "v${version}"; + hash = "sha256-S1Sd3TgLUIT1TcG8WbEgHgUqIcXvzVdvfwrPnpaK7/g="; + }; + + # this script is used the generated the bindings + # and is intended for development. + preCheck = '' + rm src/kicadcliwrapper/main.py + ''; + + build-system = [ poetry-core ]; + + dependencies = [ typing-extensions ]; + + pythonRemoveDeps = [ "black" ]; + + pythonImportsCheck = [ + "kicadcliwrapper" + "kicadcliwrapper.lib" + ]; + + doCheck = false; # no tests + + meta = { + description = "Strongly typed, auto-generated bindings for KiCAD's CLI"; + homepage = "https://github.com/atopile/kicadcliwrapper"; + license = with lib.licenses; [ mit ]; + maintainers = with lib.maintainers; [ sigmanificient ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4fbd9256b879..5fbe22e1cbeb 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7735,6 +7735,8 @@ self: super: with self; { kicad = toPythonModule (pkgs.kicad.override { python3 = python; }).src; + kicadcliwrapper = callPackage ../development/python-modules/kicadcliwrapper { }; + kinparse = callPackage ../development/python-modules/kinparse { }; kiss-headers = callPackage ../development/python-modules/kiss-headers { }; From 836c4459434a30ffb08c69ffb03fcfc3be3bfad9 Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Fri, 30 May 2025 23:38:52 +0200 Subject: [PATCH 02/22] python313Packages.atopile-easy2kicad: init at 0.9.4 --- .../atopile-easyeda2kicad/default.nix | 45 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 47 insertions(+) create mode 100644 pkgs/development/python-modules/atopile-easyeda2kicad/default.nix diff --git a/pkgs/development/python-modules/atopile-easyeda2kicad/default.nix b/pkgs/development/python-modules/atopile-easyeda2kicad/default.nix new file mode 100644 index 000000000000..be856d53ed31 --- /dev/null +++ b/pkgs/development/python-modules/atopile-easyeda2kicad/default.nix @@ -0,0 +1,45 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + hatchling, + hatch-vcs, + pydantic, + requests, +}: + +buildPythonPackage rec { + pname = "atopile-easyeda2kicad"; + version = "0.9.4"; + pyproject = true; + + src = fetchFromGitHub { + owner = "atopile"; + repo = "easyeda2kicad.py"; + tag = "v${version}"; + hash = "sha256-pdP91tWeyQWh9ow02EXA2XIUsaexitX1R/OeyFQJ9vI="; + }; + + build-system = [ + hatchling + hatch-vcs + ]; + + dependencies = [ + pydantic + requests + ]; + + pythonImportsCheck = [ "easyeda2kicad" ]; + + doCheck = false; # no tests + + meta = { + description = "Convert any LCSC components (including EasyEDA) to KiCad library"; + homepage = "https://github.com/atopile/easyeda2kicad.py"; + changelog = "https://github.com/atopile/easyeda2kicad.py/releases/tag/v${version}"; + license = lib.licenses.agpl3Only; + maintainers = with lib.maintainers; [ sigmanificient ]; + mainProgram = "easyeda2kicad"; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 5fbe22e1cbeb..127657c027ec 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1095,6 +1095,8 @@ self: super: with self; { atopile = callPackage ../development/python-modules/atopile { }; + atopile-easyeda2kicad = callPackage ../development/python-modules/atopile-easyeda2kicad { }; + atproto = callPackage ../development/python-modules/atproto { }; atpublic = callPackage ../development/python-modules/atpublic { }; From b2774cc1cd3e16b7e00cbbd6c1eda9effc32958e Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Mon, 24 Mar 2025 03:50:45 +0100 Subject: [PATCH 03/22] python313Packaes.atopile: 0.2.69 -> 0.3.20 changelog: https://github.com/atopile/atopile/releases/tag/v0.3.20 --- .../python-modules/atopile/default.nix | 115 +++++++++++------- 1 file changed, 73 insertions(+), 42 deletions(-) diff --git a/pkgs/development/python-modules/atopile/default.nix b/pkgs/development/python-modules/atopile/default.nix index 8f43b9091078..817b39ec8097 100644 --- a/pkgs/development/python-modules/atopile/default.nix +++ b/pkgs/development/python-modules/atopile/default.nix @@ -2,6 +2,9 @@ lib, buildPythonPackage, fetchFromGitHub, + + cmake, + ninja, # build-system hatchling, scikit-build-core, @@ -10,51 +13,56 @@ # deps antlr4-python3-runtime, attrs, + atopile-easyeda2kicad, + black, case-converter, - cattrs, - click, - deepdiff, - easyeda2ato, - eseries, - fake-useragent, - fastapi, + cookiecutter, + dataclasses-json, + deprecated, + freetype-py, gitpython, - igraph, - jinja2, + kicadcliwrapper, + matplotlib, + more-itertools, natsort, - networkx, + numpy, pandas, + pathvalidate, pint, + posthog, + psutil, + pydantic-settings, pygls, - quart-cors, - quart-schema, - quart, + questionary, rich, ruamel-yaml, - schema, - scipy, + ruff, semver, - toolz, + sexpdata, + shapely, + typer, urllib3, - uvicorn, - watchfiles, - pyyaml, + pythonOlder, + # tests pytestCheckHook, pytest-xdist, pytest-timeout, + hypothesis, }: buildPythonPackage rec { pname = "atopile"; - version = "0.2.69"; + version = "0.3.24"; pyproject = true; + disabled = pythonOlder "3.12"; + src = fetchFromGitHub { owner = "atopile"; repo = "atopile"; tag = "v${version}"; - hash = "sha256-mQYnaWch0lVzz1hV6WboYxBGe3ruw+mK2AwMx13DQJM="; + hash = "sha256-erHgjzg+nODEU4WzD3aP3UAv+K59SVEjpDs8VX/RFE0="; }; build-system = [ @@ -64,45 +72,65 @@ buildPythonPackage rec { nanobind ]; + dontUseCmakeConfigure = true; # skip cmake configure invocation + + nativeBuildInputs = [ + cmake + ninja + ]; + dependencies = [ antlr4-python3-runtime attrs + atopile-easyeda2kicad + black # used as a dependency case-converter - cattrs - click - deepdiff - easyeda2ato - eseries - fake-useragent - fastapi + cookiecutter + dataclasses-json + deprecated + freetype-py gitpython - igraph - jinja2 + kicadcliwrapper + matplotlib + more-itertools natsort - networkx + numpy pandas + pathvalidate pint + posthog + psutil + pydantic-settings pygls - quart-cors - quart-schema - quart + questionary rich ruamel-yaml - schema - scipy + ruff semver - toolz + sexpdata + shapely + typer urllib3 - uvicorn - watchfiles - pyyaml # required for ato ]; - pythonRelaxDeps = [ "antlr4-python3-runtime" ]; + preBuild = '' + substituteInPlace pyproject.toml \ + --replace-fail "scikit-build-core==0.9.2" "scikit-build-core>=0.9.2" + ''; + + pythonRelaxDeps = [ + "black" + "psutil" + "posthog" + ]; pythonImportsCheck = [ "atopile" ]; preCheck = '' + # do not report worker logs to filee + substituteInPlace test/conftest.py \ + --replace-fail "worker_id =" "worker_id = None #" + substituteInPlace pyproject.toml \ --replace-fail "--html=artifacts/test-report.html" "" \ --replace-fail "--self-contained-html" "" @@ -112,11 +140,14 @@ buildPythonPackage rec { pytestCheckHook pytest-xdist pytest-timeout + hypothesis ]; + doCheck = false; # test are hanging + meta = { description = "Design circuit boards with code"; - homepage = "https://aiopg.readthedocs.io/"; + homepage = "https://atopile.io"; downloadPage = "https://github.com/atopile/atopile"; changelog = "https://github.com/atopile/atopile/releases/tag/${src.rev}"; license = with lib.licenses; [ mit ]; From c63ad81e7583c9b39d94eb5e0accc10f41d5e228 Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Mon, 5 May 2025 03:56:20 +0200 Subject: [PATCH 04/22] python313Packages.atopile-easyda2ato: 0.9.4 -> 0.9.5 changelog: https://github.com/atopile/easyeda2kicad.py/releases/tag/v0.9.5 --- .../python-modules/atopile-easyeda2kicad/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/atopile-easyeda2kicad/default.nix b/pkgs/development/python-modules/atopile-easyeda2kicad/default.nix index be856d53ed31..1b91aa1437fe 100644 --- a/pkgs/development/python-modules/atopile-easyeda2kicad/default.nix +++ b/pkgs/development/python-modules/atopile-easyeda2kicad/default.nix @@ -10,14 +10,14 @@ buildPythonPackage rec { pname = "atopile-easyeda2kicad"; - version = "0.9.4"; + version = "0.9.5"; pyproject = true; src = fetchFromGitHub { owner = "atopile"; repo = "easyeda2kicad.py"; tag = "v${version}"; - hash = "sha256-pdP91tWeyQWh9ow02EXA2XIUsaexitX1R/OeyFQJ9vI="; + hash = "sha256-TLGLNe/Lk2WpYMzmX2iK3S27/QRqTOdHqO8XIMZSda4="; }; build-system = [ From 3d4984b32b4843f66653665e4827edd870fb6d81 Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Mon, 5 May 2025 04:09:16 +0200 Subject: [PATCH 05/22] python313Packages.fastapi-github-oidc: init at 0.3.0 changelog: https://github.com/atopile/fastapi-github-oidc/releases/tag/0.3.0 --- .../fastapi-github-oidc/default.nix | 55 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 57 insertions(+) create mode 100644 pkgs/development/python-modules/fastapi-github-oidc/default.nix diff --git a/pkgs/development/python-modules/fastapi-github-oidc/default.nix b/pkgs/development/python-modules/fastapi-github-oidc/default.nix new file mode 100644 index 000000000000..75614652e872 --- /dev/null +++ b/pkgs/development/python-modules/fastapi-github-oidc/default.nix @@ -0,0 +1,55 @@ +{ + buildPythonPackage, + fetchFromGitHub, + hatchling, + hatch-vcs, + fastapi, + pyjwt, + httpx, + requests, + pytestCheckHook, + lib, +}: +buildPythonPackage rec { + pname = "fastapi-github-oidc"; + version = "0.3.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "atopile"; + repo = "fastapi-github-oidc"; + tag = version; + hash = "sha256-FS50++Hy9h0RFrSnc4PbXFPh/1OO0JOaFdIZwoXa86A="; + }; + + build-system = [ + hatchling + hatch-vcs + ]; + + dependencies = [ + fastapi + pyjwt + httpx + requests + ]; + + pythonImportsCheck = [ + "github_oidc.client" + "github_oidc.server" + ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + disabledTests = [ + "test_with_auth" # calls github api + ]; + + meta = { + description = "FastAPI compatible middleware to authenticate Github OIDC Tokens"; + homepage = "https://github.com/atopile/fastapi-github-oidc"; + changelog = "https://github.com/atopile/fastapi-github-oidc/releases/tag/${src.tag}"; + license = with lib.licenses; [ mit ]; + maintainers = with lib.maintainers; [ sigmanificient ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 127657c027ec..1fcb02b828be 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4963,6 +4963,8 @@ self: super: with self; { fastapi-cli = callPackage ../development/python-modules/fastapi-cli { }; + fastapi-github-oidc = callPackage ../development/python-modules/fastapi-github-oidc { }; + fastapi-mail = callPackage ../development/python-modules/fastapi-mail { }; fastapi-mcp = callPackage ../development/python-modules/fastapi-mcp { }; From 5000a3bee7d69cc8aaa22cd25a51ba13beef9fc0 Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Mon, 5 May 2025 04:22:37 +0200 Subject: [PATCH 06/22] python313Packages.atopile: 0.3.24 -> 0.4.1 changelog: https://github.com/atopile/atopile/releases/tag/v0.4.1 --- .../python-modules/atopile/default.nix | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/atopile/default.nix b/pkgs/development/python-modules/atopile/default.nix index 817b39ec8097..a2cff63f3037 100644 --- a/pkgs/development/python-modules/atopile/default.nix +++ b/pkgs/development/python-modules/atopile/default.nix @@ -19,6 +19,7 @@ cookiecutter, dataclasses-json, deprecated, + fastapi-github-oidc, freetype-py, gitpython, kicadcliwrapper, @@ -26,7 +27,6 @@ more-itertools, natsort, numpy, - pandas, pathvalidate, pint, posthog, @@ -34,6 +34,7 @@ pydantic-settings, pygls, questionary, + requests, rich, ruamel-yaml, ruff, @@ -53,7 +54,7 @@ buildPythonPackage rec { pname = "atopile"; - version = "0.3.24"; + version = "0.4.1"; pyproject = true; disabled = pythonOlder "3.12"; @@ -62,7 +63,7 @@ buildPythonPackage rec { owner = "atopile"; repo = "atopile"; tag = "v${version}"; - hash = "sha256-erHgjzg+nODEU4WzD3aP3UAv+K59SVEjpDs8VX/RFE0="; + hash = "sha256-N8tFD1tl1Vnn0nrQEWdE/vuJHbuSguRYg+oH7QH1m48="; }; build-system = [ @@ -88,6 +89,7 @@ buildPythonPackage rec { cookiecutter dataclasses-json deprecated + fastapi-github-oidc freetype-py gitpython kicadcliwrapper @@ -95,7 +97,6 @@ buildPythonPackage rec { more-itertools natsort numpy - pandas pathvalidate pint posthog @@ -103,6 +104,7 @@ buildPythonPackage rec { pydantic-settings pygls questionary + requests rich ruamel-yaml ruff @@ -113,15 +115,9 @@ buildPythonPackage rec { urllib3 ]; - preBuild = '' - substituteInPlace pyproject.toml \ - --replace-fail "scikit-build-core==0.9.2" "scikit-build-core>=0.9.2" - ''; - pythonRelaxDeps = [ "black" "psutil" - "posthog" ]; pythonImportsCheck = [ "atopile" ]; From 1c8f95a6459e36ce0bb214f4ef95f7fac670dd16 Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Sat, 9 Aug 2025 10:27:53 +0200 Subject: [PATCH 07/22] python313Packages.atopile: fix posthog telemery initialization --- pkgs/development/python-modules/atopile/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/python-modules/atopile/default.nix b/pkgs/development/python-modules/atopile/default.nix index a2cff63f3037..c7aba8d9a238 100644 --- a/pkgs/development/python-modules/atopile/default.nix +++ b/pkgs/development/python-modules/atopile/default.nix @@ -120,6 +120,11 @@ buildPythonPackage rec { "psutil" ]; + postPatch = '' + substituteInPlace src/atopile/telemetry.py \ + --replace-fail "api_key=" "project_api_key=" + ''; + pythonImportsCheck = [ "atopile" ]; preCheck = '' From 7eea5b3b944bec62158a9b07d05276ab3ce0f424 Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Mon, 5 May 2025 04:29:30 +0200 Subject: [PATCH 08/22] python313Packages.kicadcliwrapper: 1.0.4 -> 1.10 changelog:https://github.com/atopile/kicadcliwrapper/releases/tag/v1.1.0 --- .../kicadcliwrapper/default.nix | 31 ++++++++++++------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/kicadcliwrapper/default.nix b/pkgs/development/python-modules/kicadcliwrapper/default.nix index 9135e8ee1851..b58282ed5ec1 100644 --- a/pkgs/development/python-modules/kicadcliwrapper/default.nix +++ b/pkgs/development/python-modules/kicadcliwrapper/default.nix @@ -2,29 +2,29 @@ lib, buildPythonPackage, fetchFromGitHub, - poetry-core, + hatchling, + hatch-vcs, typing-extensions, + pytestCheckHook, + kicad, }: buildPythonPackage rec { pname = "kicadcliwrapper"; - version = "1.0.4"; + version = "1.1.0"; pyproject = true; src = fetchFromGitHub { owner = "atopile"; repo = "kicadcliwrapper"; tag = "v${version}"; - hash = "sha256-S1Sd3TgLUIT1TcG8WbEgHgUqIcXvzVdvfwrPnpaK7/g="; + hash = "sha256-D9uvNwNLi9zz/TW+uAOXve/JFjeol1IbZSeunFWCEZA="; }; - # this script is used the generated the bindings - # and is intended for development. - preCheck = '' - rm src/kicadcliwrapper/main.py - ''; - - build-system = [ poetry-core ]; + build-system = [ + hatchling + hatch-vcs + ]; dependencies = [ typing-extensions ]; @@ -35,7 +35,16 @@ buildPythonPackage rec { "kicadcliwrapper.lib" ]; - doCheck = false; # no tests + # this script is used to generate the bindings + # and is intended for development. + preCheck = '' + rm src/kicadcliwrapper/main.py + ''; + + nativeCheckInputs = [ + pytestCheckHook + kicad + ]; meta = { description = "Strongly typed, auto-generated bindings for KiCAD's CLI"; From 152e01c131bfd8ac13c2c7aed9499893d89bcc2e Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Mon, 5 May 2025 04:32:35 +0200 Subject: [PATCH 09/22] python313Packages.atopile: 0.4.1 -> 0.6.0 changelog: - https://github.com/atopile/atopile/releases/tag/v0.5.0 - https://github.com/atopile/atopile/releases/tag/v0.5.1 - https://github.com/atopile/atopile/releases/tag/v0.6.0 --- pkgs/development/python-modules/atopile/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/atopile/default.nix b/pkgs/development/python-modules/atopile/default.nix index c7aba8d9a238..d1229978ae0d 100644 --- a/pkgs/development/python-modules/atopile/default.nix +++ b/pkgs/development/python-modules/atopile/default.nix @@ -54,7 +54,7 @@ buildPythonPackage rec { pname = "atopile"; - version = "0.4.1"; + version = "0.6.0"; pyproject = true; disabled = pythonOlder "3.12"; @@ -63,7 +63,7 @@ buildPythonPackage rec { owner = "atopile"; repo = "atopile"; tag = "v${version}"; - hash = "sha256-N8tFD1tl1Vnn0nrQEWdE/vuJHbuSguRYg+oH7QH1m48="; + hash = "sha256-DdHS4VynQzabKGcQZdgpTqiiT8HREwq5cEVoiQS4GzM="; }; build-system = [ @@ -117,6 +117,7 @@ buildPythonPackage rec { pythonRelaxDeps = [ "black" + "rich" "psutil" ]; From 384dc15bac4634037d201c8fbd15407ca57c1fa6 Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Fri, 30 May 2025 23:46:18 +0200 Subject: [PATCH 10/22] python313Packages.atopile: 0.6.0 -> 0.7.0 https://github.com/atopile/atopile/releases/tag/v0.7.0 --- pkgs/development/python-modules/atopile/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/atopile/default.nix b/pkgs/development/python-modules/atopile/default.nix index d1229978ae0d..ebed4e7021d1 100644 --- a/pkgs/development/python-modules/atopile/default.nix +++ b/pkgs/development/python-modules/atopile/default.nix @@ -54,7 +54,7 @@ buildPythonPackage rec { pname = "atopile"; - version = "0.6.0"; + version = "0.7.0"; pyproject = true; disabled = pythonOlder "3.12"; @@ -63,7 +63,7 @@ buildPythonPackage rec { owner = "atopile"; repo = "atopile"; tag = "v${version}"; - hash = "sha256-DdHS4VynQzabKGcQZdgpTqiiT8HREwq5cEVoiQS4GzM="; + hash = "sha256-aQtO9jJbdVSyEfIbyAABemLU//HeF+jZMDCLuSCPNGw="; }; build-system = [ From b5b2ed13914c0cc7d945017925187410be853b51 Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Fri, 30 May 2025 23:47:34 +0200 Subject: [PATCH 11/22] python313Packages.atopile: 0.7.0 -> 0.8.2 https://github.com/atopile/atopile/releases/tag/v0.8.0 https://github.com/atopile/atopile/releases/tag/v0.8.1 https://github.com/atopile/atopile/releases/tag/v0.8.2 --- pkgs/development/python-modules/atopile/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/atopile/default.nix b/pkgs/development/python-modules/atopile/default.nix index ebed4e7021d1..cffb66ce64c8 100644 --- a/pkgs/development/python-modules/atopile/default.nix +++ b/pkgs/development/python-modules/atopile/default.nix @@ -54,7 +54,7 @@ buildPythonPackage rec { pname = "atopile"; - version = "0.7.0"; + version = "0.8.2"; pyproject = true; disabled = pythonOlder "3.12"; @@ -63,7 +63,7 @@ buildPythonPackage rec { owner = "atopile"; repo = "atopile"; tag = "v${version}"; - hash = "sha256-aQtO9jJbdVSyEfIbyAABemLU//HeF+jZMDCLuSCPNGw="; + hash = "sha256-NnaPXNJAwLF9Q/5qqbZoz4nxfOIjnO5nefC7NnHZeWw="; }; build-system = [ From 8a90e3c12533de49b712d12f201a71e6ee65b56f Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Sun, 8 Jun 2025 07:07:45 +0200 Subject: [PATCH 12/22] python313Packages.atopile: 0.8.2 -> 0.9.0 --- pkgs/development/python-modules/atopile/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/atopile/default.nix b/pkgs/development/python-modules/atopile/default.nix index cffb66ce64c8..8c7131e1e6ac 100644 --- a/pkgs/development/python-modules/atopile/default.nix +++ b/pkgs/development/python-modules/atopile/default.nix @@ -43,6 +43,7 @@ shapely, typer, urllib3, + zstd, pythonOlder, # tests @@ -54,7 +55,7 @@ buildPythonPackage rec { pname = "atopile"; - version = "0.8.2"; + version = "0.9.0"; pyproject = true; disabled = pythonOlder "3.12"; @@ -63,7 +64,7 @@ buildPythonPackage rec { owner = "atopile"; repo = "atopile"; tag = "v${version}"; - hash = "sha256-NnaPXNJAwLF9Q/5qqbZoz4nxfOIjnO5nefC7NnHZeWw="; + hash = "sha256-kmoOP9Dp3wBiabq022uKnN/UtpBfH6oSUOd0HC2f0I0="; }; build-system = [ @@ -113,12 +114,14 @@ buildPythonPackage rec { shapely typer urllib3 + zstd ]; pythonRelaxDeps = [ "black" "rich" "psutil" + "zstd" ]; postPatch = '' From fd281e2c91590a62795a928525a1622af9851c4d Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Sun, 8 Jun 2025 21:03:15 +0200 Subject: [PATCH 13/22] python313Packages.easyda2ato: remove --- .../python-modules/easyeda2ato/default.nix | 41 ------------------- pkgs/top-level/python-aliases.nix | 1 + pkgs/top-level/python-packages.nix | 2 - 3 files changed, 1 insertion(+), 43 deletions(-) delete mode 100644 pkgs/development/python-modules/easyeda2ato/default.nix diff --git a/pkgs/development/python-modules/easyeda2ato/default.nix b/pkgs/development/python-modules/easyeda2ato/default.nix deleted file mode 100644 index 362b07e2ce67..000000000000 --- a/pkgs/development/python-modules/easyeda2ato/default.nix +++ /dev/null @@ -1,41 +0,0 @@ -{ - lib, - buildPythonPackage, - fetchPypi, - setuptools, - pydantic, - requests, -}: - -buildPythonPackage rec { - pname = "easyeda2ato"; - version = "0.2.7"; - pyproject = true; - - # repo version does not match - src = fetchPypi { - inherit pname version; - - hash = "sha256-bHhBN+h9Vx9Q4wZVKxMzkEEXzV7hKoQz8i+JpkSFsYA="; - }; - - build-system = [ setuptools ]; - - dependencies = [ - pydantic - requests - ]; - - pythonImportsCheck = [ "easyeda2kicad" ]; - - doCheck = false; # no tests - - meta = { - description = "Convert any LCSC components (including EasyEDA) to KiCad library"; - homepage = "https://github.com/uPesy/easyeda2kicad.py"; - changelog = "https://github.com/uPesy/easyeda2kicad.py/releases/tag/v${version}"; - license = lib.licenses.agpl3Only; - maintainers = with lib.maintainers; [ sigmanificient ]; - mainProgram = "easyeda2kicad"; - }; -} diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index c545be2e4b11..54a8601511b1 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -231,6 +231,7 @@ mapAliases ({ dogpile-core = throw "dogpile-core is no longer maintained, use dogpile-cache instead"; # added 2021-11-20 dugong = throw "dugong is unmaintained since 2022 and has therefore been removed"; # added 2024-12-12 editdistance-s = throw "editdistance-s has been removed since it was added solely for the identity package, which has moved on to ukkonen"; # added 2025-08-04 + easyeda2ato = throw "easyeda2ato as been removed in favor of atopile-easyda2kicad"; # added 2025-06-08 eebrightbox = throw "eebrightbox is unmaintained upstream and has therefore been removed"; # added 2022-02-03 EasyProcess = easyprocess; # added 2023-02-19 email_validator = email-validator; # added 2022-06-22 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 1fcb02b828be..355a7214a19d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4484,8 +4484,6 @@ self: super: with self; { easydict = callPackage ../development/python-modules/easydict { }; - easyeda2ato = callPackage ../development/python-modules/easyeda2ato { }; - easyenergy = callPackage ../development/python-modules/easyenergy { }; easygui = callPackage ../development/python-modules/easygui { }; From d690766be7e2791aee2fc677f803d06958616fa0 Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Fri, 13 Jun 2025 01:47:05 +0200 Subject: [PATCH 14/22] python313Packages.atopile: disable python 3.12 --- pkgs/development/python-modules/atopile/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/atopile/default.nix b/pkgs/development/python-modules/atopile/default.nix index 8c7131e1e6ac..59e149098751 100644 --- a/pkgs/development/python-modules/atopile/default.nix +++ b/pkgs/development/python-modules/atopile/default.nix @@ -58,7 +58,7 @@ buildPythonPackage rec { version = "0.9.0"; pyproject = true; - disabled = pythonOlder "3.12"; + disabled = pythonOlder "3.13"; src = fetchFromGitHub { owner = "atopile"; From ed2a0f86a05366880d7603243e497b2362a6db70 Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Sat, 9 Aug 2025 08:36:02 +0200 Subject: [PATCH 15/22] python313Packages.atopile: 0.9.0 -> 0.9.6 https://github.com/atopile/atopile/releases/tag/v0.9.1 https://github.com/atopile/atopile/releases/tag/v0.9.2 https://github.com/atopile/atopile/releases/tag/v0.9.3 https://github.com/atopile/atopile/releases/tag/v0.9.4 https://github.com/atopile/atopile/releases/tag/v0.9.5 https://github.com/atopile/atopile/releases/tag/v0.9.6 --- pkgs/development/python-modules/atopile/default.nix | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/atopile/default.nix b/pkgs/development/python-modules/atopile/default.nix index 59e149098751..d1d1c4e12429 100644 --- a/pkgs/development/python-modules/atopile/default.nix +++ b/pkgs/development/python-modules/atopile/default.nix @@ -55,7 +55,7 @@ buildPythonPackage rec { pname = "atopile"; - version = "0.9.0"; + version = "0.9.6"; pyproject = true; disabled = pythonOlder "3.13"; @@ -64,7 +64,7 @@ buildPythonPackage rec { owner = "atopile"; repo = "atopile"; tag = "v${version}"; - hash = "sha256-kmoOP9Dp3wBiabq022uKnN/UtpBfH6oSUOd0HC2f0I0="; + hash = "sha256-U+Hw+Dl+47RVl9U6dVZIBo0F7Y7b64P/iyNCDhQoJXU="; }; build-system = [ @@ -117,12 +117,7 @@ buildPythonPackage rec { zstd ]; - pythonRelaxDeps = [ - "black" - "rich" - "psutil" - "zstd" - ]; + pythonRelaxDeps = [ "zstd" ]; postPatch = '' substituteInPlace src/atopile/telemetry.py \ From 2bc70e5684652055c0812106cc492940aee39908 Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Sat, 9 Aug 2025 10:57:01 +0200 Subject: [PATCH 16/22] python313Packages.kicadcliwrapper: 1.1.0 -> 1.1.1 --- pkgs/development/python-modules/kicadcliwrapper/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/kicadcliwrapper/default.nix b/pkgs/development/python-modules/kicadcliwrapper/default.nix index b58282ed5ec1..c7f6d5b341e8 100644 --- a/pkgs/development/python-modules/kicadcliwrapper/default.nix +++ b/pkgs/development/python-modules/kicadcliwrapper/default.nix @@ -11,14 +11,14 @@ buildPythonPackage rec { pname = "kicadcliwrapper"; - version = "1.1.0"; + version = "1.1.1"; pyproject = true; src = fetchFromGitHub { owner = "atopile"; repo = "kicadcliwrapper"; tag = "v${version}"; - hash = "sha256-D9uvNwNLi9zz/TW+uAOXve/JFjeol1IbZSeunFWCEZA="; + hash = "sha256-s1j0k6SvZiIHu8PKGTR+GaYUZIlFq5TKYuxoCsvsvUY="; }; build-system = [ From 00b5480179494a138f3e3f2521954a4c76cd69eb Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Sat, 9 Aug 2025 10:50:24 +0200 Subject: [PATCH 17/22] python313Packages.atopile: 0.9.6 -> 0.10.15 https://github.com/atopile/atopile/compare/v0.9.6...v0.10.15 --- .../python-modules/atopile/default.nix | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/atopile/default.nix b/pkgs/development/python-modules/atopile/default.nix index d1d1c4e12429..80df90597e75 100644 --- a/pkgs/development/python-modules/atopile/default.nix +++ b/pkgs/development/python-modules/atopile/default.nix @@ -12,7 +12,6 @@ nanobind, # deps antlr4-python3-runtime, - attrs, atopile-easyeda2kicad, black, case-converter, @@ -24,9 +23,11 @@ gitpython, kicadcliwrapper, matplotlib, + mcp, more-itertools, natsort, numpy, + ordered-set, pathvalidate, pint, posthog, @@ -55,7 +56,7 @@ buildPythonPackage rec { pname = "atopile"; - version = "0.9.6"; + version = "0.10.15"; pyproject = true; disabled = pythonOlder "3.13"; @@ -64,7 +65,7 @@ buildPythonPackage rec { owner = "atopile"; repo = "atopile"; tag = "v${version}"; - hash = "sha256-U+Hw+Dl+47RVl9U6dVZIBo0F7Y7b64P/iyNCDhQoJXU="; + hash = "sha256-18+hPvVSKgYnjpreJLs4ZeeA1T8gCDtoXWznOFjMEwA="; }; build-system = [ @@ -83,7 +84,6 @@ buildPythonPackage rec { dependencies = [ antlr4-python3-runtime - attrs atopile-easyeda2kicad black # used as a dependency case-converter @@ -95,9 +95,11 @@ buildPythonPackage rec { gitpython kicadcliwrapper matplotlib + mcp more-itertools natsort numpy + ordered-set pathvalidate pint posthog @@ -117,7 +119,10 @@ buildPythonPackage rec { zstd ]; - pythonRelaxDeps = [ "zstd" ]; + pythonRelaxDeps = [ + "posthog" + "zstd" + ]; postPatch = '' substituteInPlace src/atopile/telemetry.py \ From 2032eb4942807048cb41377af3f72a188bff51e6 Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Sat, 9 Aug 2025 11:47:24 +0200 Subject: [PATCH 18/22] python313Packages.protoletariat: init at 3.3.10 protoletariat --- .../python-modules/protoletariat/default.nix | 59 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 61 insertions(+) create mode 100644 pkgs/development/python-modules/protoletariat/default.nix diff --git a/pkgs/development/python-modules/protoletariat/default.nix b/pkgs/development/python-modules/protoletariat/default.nix new file mode 100644 index 000000000000..721f90d3c927 --- /dev/null +++ b/pkgs/development/python-modules/protoletariat/default.nix @@ -0,0 +1,59 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + poetry-core, + astunparse, + grpcio-tools, + click, + pkgs, + protobuf, + mypy-protobuf, + pytestCheckHook, + writableTmpDirAsHomeHook, +}: +buildPythonPackage rec { + pname = "protoletariat"; + version = "3.3.10"; + pyproject = true; + + src = fetchFromGitHub { + owner = "cpcloud"; + repo = "protoletariat"; + tag = version; + hash = "sha256-oaZmgen/7WkX+nNuphrcyniL7Z/OaeqlcnbCnqR5h0w="; + }; + + build-system = [ poetry-core ]; + + dependencies = [ + astunparse + click + grpcio-tools + protobuf + ]; + + pythonRelaxDeps = [ + "protobuf" + ]; + + postPatch = '' + substituteInPlace protoletariat/__main__.py \ + --replace-fail 'default="protoc",' 'default="${lib.getExe' pkgs.protobuf "protoc"}",' + ''; + + pythonImportsCheck = [ "protoletariat" ]; + + nativeCheckInputs = [ + pytestCheckHook + writableTmpDirAsHomeHook + mypy-protobuf + ]; + + meta = { + description = "Python protocol buffers for the rest of us"; + changelog = "https://github.com/cpcloud/protoletariat/blob/${version}/CHANGELOG.md"; + license = with lib.licenses; [ asl20 ]; + maintainers = with lib.maintainers; [ sigmanificient ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 355a7214a19d..e9d4818d3599 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -12048,6 +12048,8 @@ self: super: with self; { inherit (pkgs.__splicedPackages) protobuf; }; + protoletariat = callPackage ../development/python-modules/protoletariat { }; + proton-client = callPackage ../development/python-modules/proton-client { }; proton-core = callPackage ../development/python-modules/proton-core { }; From 833f9f9c2e4d14dfcf5bb9706c790f23e5b4de6f Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Sat, 9 Aug 2025 12:57:10 +0200 Subject: [PATCH 19/22] python313Packages.kicad-python: init at 0.4.0 --- .../python-modules/kicad-python/default.nix | 70 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 72 insertions(+) create mode 100644 pkgs/development/python-modules/kicad-python/default.nix diff --git a/pkgs/development/python-modules/kicad-python/default.nix b/pkgs/development/python-modules/kicad-python/default.nix new file mode 100644 index 000000000000..3344a073b448 --- /dev/null +++ b/pkgs/development/python-modules/kicad-python/default.nix @@ -0,0 +1,70 @@ +{ + lib, + buildPythonPackage, + fetchFromGitLab, + poetry-core, + protoletariat, + mypy-protobuf, + pkgs, + protobuf, + pynng, + pytestCheckHook, + gitMinimal, + pythonOlder, + typing-extensions, +}: +buildPythonPackage rec { + pname = "kicad-python"; + version = "0.4.0"; + pyproject = true; + + src = fetchFromGitLab { + owner = "kicad/code"; + repo = "kicad-python"; + tag = version; + hash = "sha256-M2vJ/lSwc1XjrG661ayNIOZKJitmy/UPM2SesQI1xYE="; + fetchSubmodules = true; + }; + + build-system = [ + poetry-core + protoletariat + ]; + + dependencies = [ + protobuf + pynng + mypy-protobuf + ] + ++ (lib.optional (pythonOlder "3.13") typing-extensions); + + nativeBuildInputs = [ + pkgs.protobuf + mypy-protobuf + gitMinimal + ]; + + pythonRelaxDeps = [ "protobuf" ]; + + # fixes: FileExistsError: File already exists .../kipy/__init__.py + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail 'script =' "#" + ''; + + preBuild = '' + python build.py + ''; + + pythonImportsCheck = [ "kipy" ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + meta = { + description = "KiCad API Python Bindings"; + homepage = "https://kicad.org/"; + downloadPage = "https://gitlab.com/kicad/code/kicad-python"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ sigmanificient ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e9d4818d3599..f575af2ab995 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7737,6 +7737,8 @@ self: super: with self; { kicad = toPythonModule (pkgs.kicad.override { python3 = python; }).src; + kicad-python = callPackage ../development/python-modules/kicad-python { }; + kicadcliwrapper = callPackage ../development/python-modules/kicadcliwrapper { }; kinparse = callPackage ../development/python-modules/kinparse { }; From 7b399afac28eb3d8d2609223d9fa36f9112d14e3 Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Sat, 9 Aug 2025 13:00:05 +0200 Subject: [PATCH 20/22] python313Packages.atopile: 0.10.15 -> 0.10.23 https://github.com/atopile/atopile/compare/v0.10.15...v0.10.23 python313Packages.atopile: remove posthog patch --- pkgs/development/python-modules/atopile/default.nix | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/atopile/default.nix b/pkgs/development/python-modules/atopile/default.nix index 80df90597e75..080d1bb8aa90 100644 --- a/pkgs/development/python-modules/atopile/default.nix +++ b/pkgs/development/python-modules/atopile/default.nix @@ -21,6 +21,7 @@ fastapi-github-oidc, freetype-py, gitpython, + kicad-python, kicadcliwrapper, matplotlib, mcp, @@ -56,7 +57,7 @@ buildPythonPackage rec { pname = "atopile"; - version = "0.10.15"; + version = "0.10.23"; pyproject = true; disabled = pythonOlder "3.13"; @@ -65,7 +66,7 @@ buildPythonPackage rec { owner = "atopile"; repo = "atopile"; tag = "v${version}"; - hash = "sha256-18+hPvVSKgYnjpreJLs4ZeeA1T8gCDtoXWznOFjMEwA="; + hash = "sha256-dwlST3Cf4SLSYvuaPBbpkwHG0c57NZ+9tIWXcXsI1wQ="; }; build-system = [ @@ -93,6 +94,7 @@ buildPythonPackage rec { fastapi-github-oidc freetype-py gitpython + kicad-python kicadcliwrapper matplotlib mcp @@ -124,11 +126,6 @@ buildPythonPackage rec { "zstd" ]; - postPatch = '' - substituteInPlace src/atopile/telemetry.py \ - --replace-fail "api_key=" "project_api_key=" - ''; - pythonImportsCheck = [ "atopile" ]; preCheck = '' From 3cf87d340b6acad629aeb5302f175e1ff6e347b5 Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Sun, 10 Aug 2025 23:08:34 +0200 Subject: [PATCH 21/22] python313Packages.atopile: 0.10.23 -> 0.11.2 --- pkgs/development/python-modules/atopile/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/atopile/default.nix b/pkgs/development/python-modules/atopile/default.nix index 080d1bb8aa90..d23011337da9 100644 --- a/pkgs/development/python-modules/atopile/default.nix +++ b/pkgs/development/python-modules/atopile/default.nix @@ -57,7 +57,7 @@ buildPythonPackage rec { pname = "atopile"; - version = "0.10.23"; + version = "0.11.2"; pyproject = true; disabled = pythonOlder "3.13"; @@ -66,7 +66,7 @@ buildPythonPackage rec { owner = "atopile"; repo = "atopile"; tag = "v${version}"; - hash = "sha256-dwlST3Cf4SLSYvuaPBbpkwHG0c57NZ+9tIWXcXsI1wQ="; + hash = "sha256-JczlQulHlViV9pg0uPXd9Boagp74VBdZ1UMDXh2c3DA="; }; build-system = [ From 93364bdfa0675a8571526668c1e66cd14b589ff2 Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Sun, 10 Aug 2025 23:06:02 +0200 Subject: [PATCH 22/22] python313Packages.apotile: enable tests --- .../python-modules/atopile/default.nix | 82 +++++++++++++++++-- 1 file changed, 74 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/atopile/default.nix b/pkgs/development/python-modules/atopile/default.nix index d23011337da9..87a79f26dbd4 100644 --- a/pkgs/development/python-modules/atopile/default.nix +++ b/pkgs/development/python-modules/atopile/default.nix @@ -50,9 +50,13 @@ # tests pytestCheckHook, - pytest-xdist, + + pytest-benchmark, pytest-timeout, + pytest-datafiles, + pytest-xdist, hypothesis, + writableTmpDirAsHomeHook, }: buildPythonPackage rec { @@ -128,24 +132,86 @@ buildPythonPackage rec { pythonImportsCheck = [ "atopile" ]; + nativeCheckInputs = [ + writableTmpDirAsHomeHook + pytestCheckHook + pytest-xdist + pytest-benchmark + pytest-datafiles + pytest-timeout + hypothesis + ]; + preCheck = '' # do not report worker logs to filee substituteInPlace test/conftest.py \ --replace-fail "worker_id =" "worker_id = None #" + # unrecognized flags substituteInPlace pyproject.toml \ --replace-fail "--html=artifacts/test-report.html" "" \ - --replace-fail "--self-contained-html" "" + --replace-fail "--self-contained-html" "" \ + --replace-fail "--numprocesses=auto" "" \ + + # Replace this function call that cause test to hang + substituteInPlace \ + test/cli/test_packages.py \ + test/library/test_names.py \ + test/test_examples.py \ + test/test_parse_utils.py \ + --replace-fail "_repo_root()" "Path('$(pwd)')" + + # Fix crash due to empty list in fixture tests + substituteInPlace \ + test/test_examples.py \ + test/test_parse_utils.py \ + --replace-fail "p.stem" "p.stem if isinstance(p, Path) else p" ''; - nativeCheckInputs = [ - pytestCheckHook - pytest-xdist - pytest-timeout - hypothesis + disabledTestPaths = [ + # timouts + "test/test_cli.py" + "test/cli/test_packages.py" + "test/end_to_end/test_net_naming.py" + "test/end_to_end/test_pcb_export.py" + "test/exporters/bom/test_bom.py" + "test/front_end/test_front_end_pick.py" + "test/libs/picker/test_pickers.py" ]; - doCheck = false; # test are hanging + disabledTests = [ + # timeout + "test_build_error_logging" + "test_performance_mifs_bus_params" + "test_resistor" + "test_reserved_attrs" + # requires internet + "test_simple_pick" + "test_simple_negative_pick" + "test_jlcpcb_pick_resistor" + "test_jlcpcb_pick_capacitor" + "test_regression_rp2040_usb_diffpair_full" + "test_model_translations" + # type error + "test_alternate_trait_constructor_with_params" + "test_parameterised_trait_with_params" + "test_trait_alternate_constructor_precedence" + "test_trait_template_enum" + "test_trait_template_enum_invalid" + # failure + "test_solve_voltage_divider_complex" + ]; + + # in order to use pytest marker, we need to use ppytestFlagsArray + # using pytestFlags causes `ERROR: file or directory not found: slow` + pytestFlagsArray = [ + "-m='not slow and not not_in_ci and not regression'" + "--timeout=10" # any test taking long, timouts with more than 60s + "--benchmark-disable" + "--tb=line" + ]; + + doCheck = true; meta = { description = "Design circuit boards with code";