Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into feature/docs
Browse files Browse the repository at this point in the history
  • Loading branch information
JPXKQX committed Jul 9, 2024
2 parents ba69531 + 5865b35 commit bd6b612
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/anemoi/graphs/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ def generate_graph(self) -> HeteroData:
"""
graph = HeteroData()

for nodes_cfg in self.config.nodes:
graph = instantiate(nodes_cfg.node_builder, name=nodes_cfg.name).update_graph(
for nodes_name, nodes_cfg in self.config.nodes.items():
graph = instantiate(nodes_cfg.node_builder, name=nodes_name).update_graph(
graph, nodes_cfg.get("attributes", {})
)

Expand Down
9 changes: 4 additions & 5 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,15 @@ def graph_nodes_and_edges() -> HeteroData:
def config_file(tmp_path) -> tuple[str, str]:
"""Mock grid_definition_path with files for 3 resolutions."""
cfg = {
"nodes": [
{
"name": "test_nodes",
"nodes": {
"test_nodes": {
"node_builder": {
"_target_": "anemoi.graphs.nodes.NPZFileNodes",
"grid_definition_path": str(tmp_path),
"resolution": "o16",
},
}
],
},
},
"edges": [
{
"source_name": "test_nodes",
Expand Down

0 comments on commit bd6b612

Please sign in to comment.