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
Pytest Style analysis/test_hbonds.py #1544
Conversation
'angle': 150.0, | ||
} | ||
|
||
def _run(self, universe, **kwargs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't a method like this be replaced with a fixture? This would then make it easier to cache this result (if possible) by increasing the scope
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The kwargs are a problem to use a fixture here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I can see it's only ever called as self._run(universe)
so we could remove the kwargs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should replace _run
with a fixture, and look to see if we can increase the scope of it
'std': np.std, | ||
} | ||
|
||
def _normalize_timeseries(self, h): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should just put this method into the fixture rather than refer to it
@kain88-de @richardjgowers What needs to be done here? |
Fixes #
Changes made in this Pull Request:
PR Checklist