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_lineardensity.py #1548

Merged
merged 6 commits into from Aug 5, 2017

Conversation

Projects
None yet
5 participants
@utkbansal
Member

utkbansal commented Jul 23, 2017

Fixes #

Changes made in this Pull Request:

PR Checklist

  • Tests?
  • Docs?
  • CHANGELOG updated?
  • Issue raised/referenced?

utkbansal added some commits Jul 23, 2017

ld = LinearDensity(self.selection, binsize=5).run()
assert_allclose(self.xpos, ld.results['x']['pos'], rtol=1e-6, atol=0)
# TODO: Remove this?!

This comment has been minimized.

@jbarnoud

jbarnoud Jul 27, 2017

Contributor

What happens if you activate the test?

This comment has been minimized.

@utkbansal

utkbansal Jul 27, 2017

Member

@jbarnoud It fails. LinearDensity doesn't have a parameter universe and ld.run() doesn't take any parameters.

This comment has been minimized.

@jbarnoud

jbarnoud Jul 27, 2017

Contributor

I think it can be removed then.

This comment has been minimized.

@kain88-de

kain88-de Jul 29, 2017

Member

This can still be fixed @utkbansal

@utkbansal

This comment has been minimized.

Member

utkbansal commented Jul 28, 2017

@richardjgowers @kain88-de @jbarnoud I need help with coverage! The drop doesn't make sense to me. This file has one and only one function, I don't see what changed. Interesting to note that before I dropped the class, the coverage remained the same. The coverage dropped in the last commit where all I did was drop the class.

@kain88-de

This comment has been minimized.

Member

kain88-de commented Jul 28, 2017

@utkbansal are you able to point to the line that is not covered anymore?

@kain88-de

This comment has been minimized.

Member

kain88-de commented Jul 29, 2017

weird. Looks like we introduced more randomness in our testsuite.

@utkbansal

This comment has been minimized.

Member

utkbansal commented Jul 29, 2017

@kain88-de @richardjgowers What should I do to fix this?

@utkbansal utkbansal changed the title from [WIP]Pytest Style analysis/test_lineardensity.py to Pytest Style analysis/test_lineardensity.py Jul 29, 2017

@orbeckst

I don't think that the minute change in coverage should hold up this PR. LGTM.

# TODO: Remove this?!

This comment has been minimized.

@kain88-de

kain88-de Aug 2, 2017

Member

We said this can be removed.

xpos = np.array([0., 0., 0., 0.0072334, 0.00473299, 0.,
0., 0., 0., 0.])
ld = LinearDensity(selection, binsize=5).run()
assert_allclose(xpos, ld.results['x']['pos'], rtol=1e-6, atol=0)

This comment has been minimized.

@kain88-de

kain88-de Aug 3, 2017

Member

please us e assert_almost equal like everywhere else

This comment has been minimized.

@utkbansal

utkbansal Aug 3, 2017

Member

The precision would be 6, right? assert_almost_equal(xpos, ld.results['x']['pos'], 6)

This comment has been minimized.

@kain88-de

kain88-de Aug 3, 2017

Member

Try using the default precision and see if you need to reduce it.

utkbansal added some commits Aug 3, 2017

@kain88-de kain88-de merged commit 1f69ba0 into MDAnalysis:develop Aug 5, 2017

1 check passed

coverage/coveralls Coverage increased (+0.01%) to 90.436%
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment