Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ test = [
"PyVisa-sim>=0.6.0",
"sphinx>=4.5.0", # sphinx extension tests
"types-jsonschema>=4.16.0",
"types-networkx >= 3.6.1.20260303", # minimum version required for correct edge_subgraph types
"types-networkx >= 3.6.1.20260512", # minimum version required for generic data types in graph
"types_requests>=0.1.8",
"types-tabulate>=0.1.0",
"types-tqdm>=4.64.6",
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ traitlets==5.15.0
# nbsphinx
types-jsonschema==4.26.0.20260508
# via qcodes (pyproject.toml)
types-networkx==3.6.1.20260508
types-networkx==3.6.1.20260512
# via qcodes (pyproject.toml)
types-pywin32==311.0.0.20260508
# via qcodes (pyproject.toml)
Expand Down
10 changes: 7 additions & 3 deletions src/qcodes/dataset/descriptions/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ def __init__(
inferences: ParamSpecTree | None = None,
standalones: tuple[ParamSpecBase, ...] = (),
):
self._graph: nx.DiGraph[str] = nx.DiGraph()
self._graph: nx.DiGraph[str, dict[str, ParamSpecBase], dict[str, str]] = (
nx.DiGraph()
)
self.add_dependencies(dependencies)
self.add_inferences(inferences)
self.add_standalones(standalones)
Expand Down Expand Up @@ -260,7 +262,9 @@ def paramspecs(self) -> tuple[ParamSpecBase, ...]:
"""
Return the ParamSpecBase objects of this instance
"""
return tuple(paramspec for _, paramspec in self.graph.nodes(data="value"))
return tuple(
paramspec_dict["value"] for _, paramspec_dict in self.graph.nodes(data=True)
)

@property
def top_level_parameters(self) -> tuple[ParamSpecBase, ...]:
Expand Down Expand Up @@ -355,7 +359,7 @@ def __getitem__(self, name: str) -> ParamSpecBase:
return self._node_to_paramspec(name)

@property
def graph(self) -> nx.DiGraph[str]:
def graph(self) -> nx.DiGraph[str, dict[str, ParamSpecBase], dict[str, str]]:
return self._graph

def to_ipycytoscape_json(self) -> dict[str, list[dict[str, Any]]]:
Expand Down
Loading