Skip to content

Commit

Permalink
replace oep_metadata_version function
Browse files Browse the repository at this point in the history
  • Loading branch information
khelfen committed Aug 22, 2024
1 parent 14373af commit 39327ea
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/egon/data/datasets/DSM_cts_ind.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
generate_resource_fields_from_db_table,
license_odbl,
meta_metadata,
oep_metadata_version,
meta_metadata,
sources,
)

Expand Down Expand Up @@ -396,7 +396,7 @@ def add_metadata_individual():
},
}

dialect = get_dialect(oep_metadata_version())()
dialect = get_dialect(meta_metadata()["metadataVersion"])()

meta = dialect.compile_and_render(dialect.parse(json.dumps(meta)))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
license_ccby,
license_odbl,
meta_metadata,
oep_metadata_version,
meta_metadata,
sources,
)

Expand Down Expand Up @@ -410,7 +410,7 @@ def add_metadata():
},
}

dialect = get_dialect(oep_metadata_version())()
dialect = get_dialect(meta_metadata()["metadataVersion"])()

meta = dialect.compile_and_render(dialect.parse(json.dumps(meta)))

Expand Down Expand Up @@ -532,7 +532,7 @@ def add_metadata():
},
}

dialect = get_dialect(oep_metadata_version())()
dialect = get_dialect(meta_metadata()["metadataVersion"])()

meta = dialect.compile_and_render(dialect.parse(json.dumps(meta)))

Expand Down Expand Up @@ -654,7 +654,7 @@ def add_metadata():
},
}

dialect = get_dialect(oep_metadata_version())()
dialect = get_dialect(meta_metadata()["metadataVersion"])()

meta = dialect.compile_and_render(dialect.parse(json.dumps(meta)))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
generate_resource_fields_from_db_table,
license_odbl,
meta_metadata,
oep_metadata_version,
meta_metadata,
)

Base = declarative_base()
Expand Down Expand Up @@ -152,7 +152,7 @@ def add_metadata():
},
}

dialect = get_dialect(oep_metadata_version())()
dialect = get_dialect(meta_metadata()["metadataVersion"])()

meta = dialect.compile_and_render(dialect.parse(json.dumps(meta)))

Expand Down
4 changes: 2 additions & 2 deletions src/egon/data/datasets/power_plants/mastr_db_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
generate_resource_fields_from_db_table,
license_dedl,
meta_metadata,
oep_metadata_version,
meta_metadata,
sources,
)

Expand Down Expand Up @@ -437,7 +437,7 @@ def add_metadata():
},
}

dialect = get_dialect(oep_metadata_version())()
dialect = get_dialect(meta_metadata()["metadataVersion"])()

meta = dialect.compile_and_render(dialect.parse(json.dumps(meta)))

Expand Down
4 changes: 2 additions & 2 deletions src/egon/data/datasets/power_plants/pv_rooftop_buildings.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
license_dedl,
license_odbl,
meta_metadata,
oep_metadata_version,
meta_metadata,
sources,
)

Expand Down Expand Up @@ -2216,7 +2216,7 @@ def add_metadata():
},
}

dialect = get_dialect(oep_metadata_version())()
dialect = get_dialect(meta_metadata()["metadataVersion"])()

meta = dialect.compile_and_render(dialect.parse(json.dumps(meta)))

Expand Down
4 changes: 2 additions & 2 deletions src/egon/data/datasets/storages/home_batteries.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
license_dedl,
license_odbl,
meta_metadata,
oep_metadata_version,
meta_metadata,
sources,
)

Expand Down Expand Up @@ -329,7 +329,7 @@ def add_metadata():
},
}

dialect = get_dialect(oep_metadata_version())()
dialect = get_dialect(meta_metadata())()

meta = dialect.compile_and_render(dialect.parse(json.dumps(meta)))

Expand Down

0 comments on commit 39327ea

Please sign in to comment.