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

ENH: allow hint keyword for yt.load to select superclasses #4397

Merged
merged 1 commit into from
Apr 6, 2023

Conversation

yut23
Copy link
Member

@yut23 yut23 commented Apr 5, 2023

PR Summary

This PR allows users to explicitly select a specific class in a Dataset hierarchy, even if one or more of its subclasses are valid. I'm currently trying to improve the boxlib detection code by adjusting the class hierarchy (as brought up in #3005 (comment)), but making e.g. NyxDataset inherit from AMReXDataset would break cases like #3510.

PR Checklist

  • New features are documented, with docstrings and narrative docs
  • Adds a test for any bugs fixed. Adds tests for new features.

This allows users to explicitly select a specific class in a Dataset
hierarchy, even if one or more of its subclasses are valid.
@welcome
Copy link

welcome bot commented Apr 5, 2023

Hi! Welcome, and thanks for opening this pull request. We have some guidelines for new pull requests, and soon you'll hear back about the results of our tests and continuous integration checks. Thank you for your contribution!

@neutrinoceros neutrinoceros added the enhancement Making something better label Apr 5, 2023
Copy link
Member

@neutrinoceros neutrinoceros left a comment

Choose a reason for hiding this comment

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

Thank you for this patch ! It's absolutely in line with what hint is supposed to do, there are tests, and even background motivation echoing a comment I wrote a mere 2 years ago...
I'll give other maintainers a chance to have a look, but this looks perfect to me.

@neutrinoceros neutrinoceros merged commit 45ca56c into yt-project:main Apr 6, 2023
@welcome
Copy link

welcome bot commented Apr 6, 2023

Hooray! Congratulations on your first merged pull request! We hope we keep seeing you around! 🎆

@yut23 yut23 deleted the load_hint_superclasses branch April 6, 2023 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Making something better
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants