Skip to content

Generate datapackage metadata explicitly instead of inferring it#472

Open
Bachibouzouk wants to merge 6 commits into
mainfrom
feature/generate-datapackage-metadata-without-inferring
Open

Generate datapackage metadata explicitly instead of inferring it#472
Bachibouzouk wants to merge 6 commits into
mainfrom
feature/generate-datapackage-metadata-without-inferring

Conversation

@Bachibouzouk
Copy link
Copy Markdown

Calling infer_metadata_from_data from oemof.datapackage was slowing down the generation of the datapackage. Instead I propose to generate the information contained within the datapackage.json directly. This results in much lower waiting time before the simulation is sent to the simulation server. It also allows us to not worry about generating the datapackage on the fly to process the results

@Bachibouzouk Bachibouzouk requested a review from paulapreuss May 11, 2026 23:21
@Bachibouzouk Bachibouzouk changed the title Generate datapackage metadata explicitely instead of inferring it Generate datapackage metadata explicitly instead of inferring it May 11, 2026
Comment on lines +233 to +237
if isinstance(value, int):
return "integer"

if isinstance(value, float):
return "number"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could there be an issue where it will falsely label a float as an int field, e.g. if the parsed value is 0? Or should it be fine?

@paulapreuss
Copy link
Copy Markdown

Just out of curiosity, what is the big difference between this method of inferring the datapackage vs. what was done in infer_metadata_from_data that allows this to be significantly faster?

@paulapreuss
Copy link
Copy Markdown

Seems like the build test is failing due to the most recent changes to oemof.eesyplan. Not sure on which side the issue is.

@Bachibouzouk
Copy link
Copy Markdown
Author

Seems like the build test is failing due to the most recent changes to oemof.eesyplan. Not sure on which side the issue is.

yes this is just a missing package

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants