Skip to content

Enhance ValidationUtils for load profile #1358

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

danielfeismann
Copy link
Member

resolves #1357

@danielfeismann danielfeismann self-assigned this Jul 3, 2025
@danielfeismann danielfeismann added the test Related to tests label Jul 3, 2025
@danielfeismann danielfeismann marked this pull request as draft July 3, 2025 16:30
@danielfeismann danielfeismann marked this pull request as ready for review July 3, 2025 19:31
@staudtMarius
Copy link
Member

@danielfeismann I see one big problem with this validation. If we want to support custom load profiles, we have to either remove this validation later or adpat it, so that no exception is thrown.

@danielfeismann
Copy link
Member Author

Which custom load profiles do you think of?

@staudtMarius
Copy link
Member

Custom might not be the best name for it. I though, that someone might want to provide and use a load profile time series, that is not linked to a load profile, that is defined in the PSDM.

@danielfeismann
Copy link
Member Author

Ok, my understanding of the docs is that one should use LoadProfile#NO_LOAD_PROFILE for this purpose.

@staudtMarius
Copy link
Member

If you use for example primary data, you can add LoadProfile#NO_LOAD_PROFILE. But if we want to use the load profile service, we need to specify a profile in the load input.

@danielfeismann
Copy link
Member Author

Ok.

(a) If I understand correctly, all inputs of load_profile will be ignored when primary data is used as the load profile. If so, LoadProfile#NO_LOAD_PROFILE would no longer be used and could perhaps be removed.

(b) I'm not sure if I can think of a case where someone would introduce their own load profile and not use the primary data method. So, in my humble opinion, I would prefer a bit more safety than flexibility. But I'm open to other suggestions.

@staudtMarius
Copy link
Member

staudtMarius commented Jul 4, 2025

One safe way, that allows some flexibility, would be to use the method LoadProfile.parse. This method loads all available profiles and then checks, if the provided string can be parsed as a load profile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Related to tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhance ValidationUtils for load profile
2 participants