From 50e0665c3464da31a37082ebd801c6db055e6e59 Mon Sep 17 00:00:00 2001 From: Joaquin Matres <4514346+joamatab@users.noreply.github.com> Date: Tue, 1 Jul 2025 04:14:15 +0200 Subject: [PATCH] update to gdsfactory9 --- piel/analysis/metrics/metadata.py | 4 ++-- piel/types/digital.py | 4 ++-- piel/types/digital_electro_optic.py | 2 +- pyproject.toml | 8 ++++---- tests/analysis/metrics/test_units.py | 2 +- tests/analysis/signals/time/core/test_dimension.py | 4 ++-- tests/analysis/signals/time/core/test_transiton.py | 8 ++++---- tests/integration/signal/frequency/test_convert.py | 2 ++ tests/tools/amaranth/test_construct.py | 2 ++ tests/tools/amaranth/test_export.py | 2 ++ tests/tools/amaranth/test_verify.py | 2 ++ tests/tools/skrf/test_convert.py | 2 ++ tests/types/test_type_conversion.py | 2 ++ 13 files changed, 28 insertions(+), 16 deletions(-) diff --git a/piel/analysis/metrics/metadata.py b/piel/analysis/metrics/metadata.py index 17bac932..a04aa7c4 100644 --- a/piel/analysis/metrics/metadata.py +++ b/piel/analysis/metrics/metadata.py @@ -26,8 +26,8 @@ def rename_metrics_collection( # Create a new list of metrics with updated names updated_metrics = [] for metric, new_name in zip(collection.metrics, new_names): - updated_metric = metric.copy(update={"name": new_name}) + updated_metric = metric.model_copy(update={"name": new_name}) updated_metrics.append(updated_metric) # Return a new ScalarMetricCollection with the updated metrics - return collection.copy(update={"metrics": updated_metrics}) + return collection.model_copy(update={"metrics": updated_metrics}) diff --git a/piel/types/digital.py b/piel/types/digital.py index c0cbdafd..453f9cae 100644 --- a/piel/types/digital.py +++ b/piel/types/digital.py @@ -103,7 +103,7 @@ def dataframe(self) -> pd.DataFrame: """ data = { k: v - for k, v in self.dict().items() + for k, v in self.model_dump().items() if k not in {"input_ports", "output_ports"} } return pd.DataFrame(data) @@ -117,7 +117,7 @@ def implementation_dictionary(self) -> dict: dict: A dictionary with keys that are part of the input and output connection. """ selected_ports = set(self.input_ports + self.output_ports) - filtered_dict = {k: v for k, v in self.dict().items() if k in selected_ports} + filtered_dict = {k: v for k, v in self.model_dump().items() if k in selected_ports} return filtered_dict diff --git a/piel/types/digital_electro_optic.py b/piel/types/digital_electro_optic.py index 2d90a422..0b1cd05a 100644 --- a/piel/types/digital_electro_optic.py +++ b/piel/types/digital_electro_optic.py @@ -46,7 +46,7 @@ def dataframe(self) -> pd.DataFrame: Returns: pd.DataFrame: A DataFrame containing the bits and their corresponding phases. """ - return pd.DataFrame(self.dict()) + return pd.DataFrame(self.model_dump()) """ diff --git a/pyproject.toml b/pyproject.toml index 122a0b54..46428613 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,19 +28,19 @@ jaxlib = ">=0.4.14,<0.5.0" jaxtyping = "*" matplotlib = "*" networkx = ">=3.1,<4.0" -numpy = ">=1.24.4,<2.0.0" +numpy = "==2.2" pandas = ">=1.5.3,<2.0.0" pydantic = ">=2.0,<3.0" scipy = ">=1.11.4,<2.0.0" setuptools = "*" -xarray = ">=2024.1.0,<2024.10.0" +xarray = "==2025.1.2" # TOOLS amaranth = { version = ">=0.4.0,<0.5.0", optional = true } amaranth-yosys = { version = ">=0.40.0.0.post94,<0.41.0", optional = true } cocotb = { version = "==1.9.1", optional = true } -gdsfactory = { version = "==7.27.2", optional = true } -gplugins = { version = ">=0.14.0,<0.15.0", extras = ["schematic"], optional = true } +gdsfactory = { version = ">=9.3.5", optional = true } +gplugins = { version = ">=1.4.0", extras = ["schematic"], optional = true } hdl21 = { version = ">=6.0.0,<7.0.0", optional = true } qutip = { version = ">=4.7,<5.0", optional = true } sax = { version = "==0.12.2", optional = true } # Pinned for pydantic