Skip to content
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

Fix kinematic vs kinematic_coverage check #2023

Merged
merged 2 commits into from
Mar 26, 2024
Merged

Conversation

Radonirinaunimi
Copy link
Member

Currently, when kinematic_coverage does not contain 3 variables and len(kinematics.variable)<=3, extra_ variables are added to comply with vp.

nkincov = self.kinematic_coverage + [f"extra_{i}" for i in range(diff_to_3)]

This, however, could be inconsistent with the following check:

for var in self.kinematic_coverage:
if var not in self.kinematics.variables:
raise ValidationError(
f"Variable {var} is in `kinematic_coverage` but not included in `kinematics` for {self.name}"
)

This is a minimal fix by basically skipping extra_ whenever kinematics and kinematic_coverage are compared.

Copy link
Member

@scarlehoff scarlehoff left a comment

Choose a reason for hiding this comment

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

thanks!
I guess you were the first one trying to use a dataset with only two variables :__)

We need to get rid of this limitation of "3 and only 3" though...

@Radonirinaunimi
Copy link
Member Author

thanks! I guess you were the first one trying to use a dataset with only two variables :__)

We need to get rid of this limitation of "3 and only 3" though...

Yes, I fully agree! In the meantime, I just added it to the holy list #1974 xd

@Radonirinaunimi Radonirinaunimi merged commit c8e9364 into master Mar 26, 2024
6 checks passed
@Radonirinaunimi Radonirinaunimi deleted the fix-kinematic-check branch March 26, 2024 22:44
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.

None yet

2 participants