From f364b5a80766ce5287ae909fb5c1d6b8ed1d7ead Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Wed, 22 Oct 2025 22:09:53 +0000 Subject: [PATCH 1/2] python3Packages.kfactory: 1.14.4 -> 2.0.0 Diff: https://github.com/gdsfactory/kfactory/compare/v1.14.4...v2.0.0 Changelog: https://github.com/gdsfactory/kfactory/blob/v2.0.0/CHANGELOG.md --- .../python-modules/kfactory/default.nix | 74 +++++++++++++++++-- 1 file changed, 67 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/kfactory/default.nix b/pkgs/development/python-modules/kfactory/default.nix index 0e10841be1d9..5e0c219ee589 100644 --- a/pkgs/development/python-modules/kfactory/default.nix +++ b/pkgs/development/python-modules/kfactory/default.nix @@ -12,7 +12,6 @@ cachetools, klayout, loguru, - numpy, pydantic-extra-types, pydantic-settings, pydantic, @@ -21,26 +20,32 @@ rectangle-packer, requests, ruamel-yaml-string, - ruamel-yaml, scipy, semver, toolz, typer, # tests + pytest-regressions, pytestCheckHook, }: buildPythonPackage rec { pname = "kfactory"; - version = "1.14.4"; + version = "2.0.0"; pyproject = true; src = fetchFromGitHub { owner = "gdsfactory"; repo = "kfactory"; tag = "v${version}"; - hash = "sha256-el3bGv57mAfxYG9tdLX5N6R76F+9GY9jdZaIUjMqcVU="; + # kfactory uses `.git` to infer the project directory. + # https://github.com/gdsfactory/kfactory/blob/v2.0.0/src/kfactory/conf.py#L318-L327 + # Otherwise, tests fail with: + # assert kf.config.project_dir is not None + # E AssertionError: assert None is not None + leaveDotGit = true; + hash = "sha256-eZRNUb2Qw2HcR2W1pf15ulEt7ZCJwi60SuGdte/cG8E="; }; build-system = [ @@ -48,12 +53,14 @@ buildPythonPackage rec { setuptools-scm ]; + pythonRelaxDeps = [ + "pydantic" + ]; dependencies = [ aenum cachetools klayout loguru - numpy pydantic pydantic-extra-types pydantic-settings @@ -61,7 +68,6 @@ buildPythonPackage rec { rapidfuzz rectangle-packer requests - ruamel-yaml ruamel-yaml-string scipy semver @@ -71,13 +77,67 @@ buildPythonPackage rec { pythonImportsCheck = [ "kfactory" ]; - nativeCheckInputs = [ pytestCheckHook ]; + nativeCheckInputs = [ + pytest-regressions + pytestCheckHook + ]; + + disabledTests = [ + # AssertionError: Binary files ... and ... differ + "test_array" + "test_array_indexerror" + "test_autorename" + "test_cell_default_fallback" + "test_cell_in_threads" + "test_cell_yaml" + "test_circular_snapping" + "test_create" + "test_enclosure_name" + "test_euler_snapping" + "test_filter_layer_pt_reg" + "test_filter_regex" + "test_flatten" + "test_info" + "test_invalid_array" + "test_kcell_attributes" + "test_namecollision" + "test_nested_dic" + "test_nested_dict_list" + "test_netlist" + "test_netlist_equivalent" + "test_no_snap" + "test_overwrite" + "test_ports_cell" + "test_ports_in_cells" + "test_ports_instance" + "test_rename_clockwise" + "test_rename_clockwise_multi" + "test_schematic_anchor" + "test_schematic_create" + "test_schematic_create_cell" + "test_schematic_kcl_mix_netlist" + "test_schematic_mirror_connection" + "test_schematic_route" + "test_size_info" + "test_to_dtype" + ]; disabledTestPaths = [ # https://github.com/gdsfactory/kfactory/issues/511 "tests/test_pdk.py" # NameError "tests/test_session.py" + + # AssertionError: Binary files ... and ... differ + "tests/test_all_angle.py" + "tests/test_cells.py" + "tests/test_grid.py" + "tests/test_l2n.py" + "tests/test_packing.py" + "tests/test_pins.py" + "tests/test_rename.py" + "tests/test_routing.py" + "tests/test_spiral.py" ]; meta = { From 937b73dd4a1eae038c1deecfd3d631fdff1c019b Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Thu, 23 Oct 2025 09:43:46 +0000 Subject: [PATCH 2/2] python3Packages.gdsfactory: 9.18.1 -> 9.20.1 Diff: https://github.com/gdsfactory/gdsfactory/compare/v9.18.1...v9.20.1 Changelog: https://github.com/gdsfactory/gdsfactory/blob/v9.20.1/CHANGELOG.md --- pkgs/development/python-modules/gdsfactory/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/gdsfactory/default.nix b/pkgs/development/python-modules/gdsfactory/default.nix index 56914ec6fb4f..7e35b8d2decd 100644 --- a/pkgs/development/python-modules/gdsfactory/default.nix +++ b/pkgs/development/python-modules/gdsfactory/default.nix @@ -46,14 +46,14 @@ }: buildPythonPackage rec { pname = "gdsfactory"; - version = "9.18.1"; + version = "9.20.1"; pyproject = true; src = fetchFromGitHub { owner = "gdsfactory"; repo = "gdsfactory"; tag = "v${version}"; - hash = "sha256-PPps3BaQbU7PCq+tlvjlPOurgBYHx/eGDEmlUmaB+O4="; + hash = "sha256-TpMi0Rv6sQA8uAPGl6iR1qgTU7havBlWmdz98DROoSk="; }; build-system = [ flit-core ];