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

AthenaDataset._is_valid() is extremely brittle #3001

Closed
neutrinoceros opened this issue Dec 17, 2020 · 0 comments · Fixed by #3424
Closed

AthenaDataset._is_valid() is extremely brittle #3001

neutrinoceros opened this issue Dec 17, 2020 · 0 comments · Fixed by #3424
Labels
bug code frontends Things related to specific frontends

Comments

@neutrinoceros
Copy link
Member

Bug report

Bug summary

AthenaDataset._is_valid() is currently implemented as

    @classmethod
    def _is_valid(self, *args, **kwargs):
        try:
            if "vtk" in args[0]:
                return True
        except Exception:
            pass
        return False

Note that the try/except block is basically useless and that the whole function is equivalent to

    @classmethod
    def _is_valid(self, *args, **kwargs):
        return "vtk" in args[0]

This is a problem for two reasons:

I have no expertise with Athena so I'm not in a position where I can easily come up with a more robust validation function.

@neutrinoceros neutrinoceros added bug code frontends Things related to specific frontends labels Dec 17, 2020
@neutrinoceros neutrinoceros linked a pull request Jul 13, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug code frontends Things related to specific frontends
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant