Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
1d7c561
python313Packages.kicadcliwrapper: init at 1.0.4
Sigmanificient May 30, 2025
836c445
python313Packages.atopile-easy2kicad: init at 0.9.4
Sigmanificient May 30, 2025
b2774cc
python313Packaes.atopile: 0.2.69 -> 0.3.20
Sigmanificient Mar 24, 2025
c63ad81
python313Packages.atopile-easyda2ato: 0.9.4 -> 0.9.5
Sigmanificient May 5, 2025
3d4984b
python313Packages.fastapi-github-oidc: init at 0.3.0
Sigmanificient May 5, 2025
5000a3b
python313Packages.atopile: 0.3.24 -> 0.4.1
Sigmanificient May 5, 2025
1c8f95a
python313Packages.atopile: fix posthog telemery initialization
Sigmanificient Aug 9, 2025
7eea5b3
python313Packages.kicadcliwrapper: 1.0.4 -> 1.10
Sigmanificient May 5, 2025
152e01c
python313Packages.atopile: 0.4.1 -> 0.6.0
Sigmanificient May 5, 2025
384dc15
python313Packages.atopile: 0.6.0 -> 0.7.0
Sigmanificient May 30, 2025
b5b2ed1
python313Packages.atopile: 0.7.0 -> 0.8.2
Sigmanificient May 30, 2025
8a90e3c
python313Packages.atopile: 0.8.2 -> 0.9.0
Sigmanificient Jun 8, 2025
fd281e2
python313Packages.easyda2ato: remove
Sigmanificient Jun 8, 2025
d690766
python313Packages.atopile: disable python 3.12
Sigmanificient Jun 12, 2025
ed2a0f8
python313Packages.atopile: 0.9.0 -> 0.9.6
Sigmanificient Aug 9, 2025
2bc70e5
python313Packages.kicadcliwrapper: 1.1.0 -> 1.1.1
Sigmanificient Aug 9, 2025
00b5480
python313Packages.atopile: 0.9.6 -> 0.10.15
Sigmanificient Aug 9, 2025
2032eb4
python313Packages.protoletariat: init at 3.3.10
Sigmanificient Aug 9, 2025
833f9f9
python313Packages.kicad-python: init at 0.4.0
Sigmanificient Aug 9, 2025
7b399af
python313Packages.atopile: 0.10.15 -> 0.10.23
Sigmanificient Aug 9, 2025
3cf87d3
python313Packages.atopile: 0.10.23 -> 0.11.2
Sigmanificient Aug 10, 2025
93364bd
python313Packages.apotile: enable tests
Sigmanificient Aug 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
{
lib,
buildPythonPackage,
fetchPypi,
setuptools,
fetchFromGitHub,
hatchling,
hatch-vcs,
pydantic,
requests,
}:

buildPythonPackage rec {
pname = "easyeda2ato";
version = "0.2.7";
pname = "atopile-easyeda2kicad";
version = "0.9.5";
pyproject = true;

# repo version does not match
src = fetchPypi {
inherit pname version;

hash = "sha256-bHhBN+h9Vx9Q4wZVKxMzkEEXzV7hKoQz8i+JpkSFsYA=";
src = fetchFromGitHub {
owner = "atopile";
repo = "easyeda2kicad.py";
tag = "v${version}";
hash = "sha256-TLGLNe/Lk2WpYMzmX2iK3S27/QRqTOdHqO8XIMZSda4=";
};

build-system = [ setuptools ];
build-system = [
hatchling
hatch-vcs
];

dependencies = [
pydantic
Expand All @@ -32,8 +36,8 @@ buildPythonPackage rec {

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}";
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";
Expand Down
203 changes: 151 additions & 52 deletions pkgs/development/python-modules/atopile/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,59 +2,75 @@
lib,
buildPythonPackage,
fetchFromGitHub,

cmake,
ninja,
# build-system
hatchling,
scikit-build-core,
hatch-vcs,
nanobind,
# deps
antlr4-python3-runtime,
attrs,
atopile-easyeda2kicad,
black,
case-converter,
cattrs,
click,
deepdiff,
easyeda2ato,
eseries,
fake-useragent,
fastapi,
cookiecutter,
dataclasses-json,
deprecated,
fastapi-github-oidc,
freetype-py,
gitpython,
igraph,
jinja2,
kicad-python,
kicadcliwrapper,
matplotlib,
mcp,
more-itertools,
natsort,
networkx,
pandas,
numpy,
ordered-set,
pathvalidate,
pint,
posthog,
psutil,
pydantic-settings,
pygls,
quart-cors,
quart-schema,
quart,
questionary,
requests,
rich,
ruamel-yaml,
schema,
scipy,
ruff,
semver,
toolz,
sexpdata,
shapely,
typer,
urllib3,
uvicorn,
watchfiles,
pyyaml,
zstd,
pythonOlder,

# tests
pytestCheckHook,
pytest-xdist,

pytest-benchmark,
pytest-timeout,
pytest-datafiles,
pytest-xdist,
hypothesis,
writableTmpDirAsHomeHook,
}:

buildPythonPackage rec {
pname = "atopile";
version = "0.2.69";
version = "0.11.2";
pyproject = true;

disabled = pythonOlder "3.13";

src = fetchFromGitHub {
owner = "atopile";
repo = "atopile";
tag = "v${version}";
hash = "sha256-mQYnaWch0lVzz1hV6WboYxBGe3ruw+mK2AwMx13DQJM=";
hash = "sha256-JczlQulHlViV9pg0uPXd9Boagp74VBdZ1UMDXh2c3DA=";
};

build-system = [
Expand All @@ -64,59 +80,142 @@ 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
fastapi-github-oidc
freetype-py
gitpython
igraph
jinja2
kicad-python
kicadcliwrapper
matplotlib
mcp
more-itertools
natsort
networkx
pandas
numpy
ordered-set
pathvalidate
pint
posthog
psutil
pydantic-settings
pygls
quart-cors
quart-schema
quart
questionary
requests
rich
ruamel-yaml
schema
scipy
ruff
semver
toolz
sexpdata
shapely
typer
urllib3
uvicorn
watchfiles
pyyaml # required for ato
zstd
];

pythonRelaxDeps = [ "antlr4-python3-runtime" ];
pythonRelaxDeps = [
"posthog"
"zstd"
];

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
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"
];

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did the comment say "timouts with more than 60s" but the flag say --timeout=10?

When working on PR #452102, nixpkgs-review tests run with nixpkgs-review-gha fails to build python313Packages.atopile on x86_64-linux due to test timeout (#452102 (comment)). The following is part of the build log:

........................................................................ [ 93%]
.................................error uploading: HTTPSConnectionPool(host='telemetry.atopileapi.com', port=443): Max retries exceeded with url: /batch/ (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7fffbeb1b4d0>: Failed to resolve 'telemetry.atopileapi.com' ([Errno -3] Temporary failure in name resolution)"))
error uploading: HTTPSConnectionPool(host='telemetry.atopileapi.com', port=443): Max retries exceeded with url: /batch/ (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7fffbe647c50>: Failed to resolve 'telemetry.atopileapi.com' ([Errno -3] Temporary failure in name resolution)"))
error uploading: HTTPSConnectionPool(host='telemetry.atopileapi.com', port=443): Max retries exceeded with url: /batch/ (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7fffbe9c0050>: Failed to resolve 'telemetry.atopileapi.com' ([Errno -3] Temporary failure in name resolution)"))
....................................... [ 98%]
....................xxx..                                                [100%]
=================================== FAILURES ===================================
/nix/store/lcp5h087xp01smj5xjwddpnddq1lsw4d-python3.13-atopile-0.12.4/lib/python3.13/site-packages/faebryk/core/pathfinder.py:41: Failed: Timeout (>10.0s) from pytest-timeout.
=========================== short test summary info ============================
FAILED test/core/test_mif_connect.py::test_regression_rp2040_usb_diffpair - Failed: Timeout (>10.0s) from pytest-timeout.
====== 1 failed, 1345 passed, 26 skipped, 21 xfailed in 79.45s (0:01:19) =======

"--benchmark-disable"
"--tb=line"
];

doCheck = true;

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 ];
Expand Down
55 changes: 55 additions & 0 deletions pkgs/development/python-modules/fastapi-github-oidc/default.nix
Original file line number Diff line number Diff line change
@@ -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 ];
};
}
Loading
Loading