Skip to content

Conversation

@copybara-service
Copy link

@copybara-service copybara-service bot commented Dec 19, 2025

Explicit validator for IMAS core_profiles IDS.

@Nush395 Nush395 mentioned this pull request Dec 19, 2025
5 tasks
@copybara-service copybara-service bot force-pushed the test_846714287 branch 2 times, most recently from 56d492c to 76ac7b6 Compare January 5, 2026 16:00
@copybara-service copybara-service bot changed the title Example: Explicit validator for IMAS IDS. Explicit validator for IMAS core_profiles IDS. Jan 5, 2026
@Nush395 Nush395 requested a review from MateoBell January 5, 2026 16:16
@copybara-service copybara-service bot force-pushed the test_846714287 branch 2 times, most recently from c7bfcbe to ae47fed Compare January 6, 2026 10:10
Copy link
Collaborator

@MateoBell MateoBell left a comment

Choose a reason for hiding this comment

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

And just a general comment do you think it would be relevant to have a flag to raise error if any value is missing ? We talked about it before but I think its okay without.



def _validate_profile_conditions(ids: ids_toplevel.IDSToplevel) -> None:
"""Validates the profiles_conditions IDS."""
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: validates core_profiles IDS for profiles_conditions


def _validate_profile_conditions(ids: ids_toplevel.IDSToplevel) -> None:
"""Validates the profiles_conditions IDS."""
for profiles_1d in ids.profiles_1d:
Copy link
Collaborator

Choose a reason for hiding this comment

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

If any quantity, e.g density is missing in each profiles_1d (i.e at each time slice), it might get a bit verbose as it will give a warning for every time slice ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

good point. Would it be sufficient to only check the first slice? Could we assume the rest have the same structure?

Copy link
Collaborator

Choose a reason for hiding this comment

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

for now as we only check if it is filled, I think so. If we go further to check positivity of temp and densities or other things we might need to check all time slices.

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