Skip to content

Make contacts.Contacts use the Results class#3264

Merged
IAlibay merged 8 commits intoMDAnalysis:developfrom
IAlibay:results-contacts
May 6, 2021
Merged

Make contacts.Contacts use the Results class#3264
IAlibay merged 8 commits intoMDAnalysis:developfrom
IAlibay:results-contacts

Conversation

@IAlibay
Copy link
Member

@IAlibay IAlibay commented May 6, 2021

Towards #3261

Changes made in this Pull Request:

  • deprecate timeseries in favour of results.timeseries.

PR Checklist

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

@IAlibay IAlibay added this to the 2.0 milestone May 6, 2021
@codecov
Copy link

codecov bot commented May 6, 2021

Codecov Report

Merging #3264 (95953ed) into develop (44506be) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #3264   +/-   ##
========================================
  Coverage    93.02%   93.02%           
========================================
  Files          172      172           
  Lines        22698    22703    +5     
  Branches      3193     3193           
========================================
+ Hits         21114    21119    +5     
  Misses        1534     1534           
  Partials        50       50           
Impacted Files Coverage Δ
package/MDAnalysis/analysis/contacts.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 44506be...95953ed. Read the comment docs.

Copy link
Contributor

@PicoCentauri PicoCentauri left a comment

Choose a reason for hiding this comment

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

That's music to my ears!

Copy link
Member

@orbeckst orbeckst left a comment

Choose a reason for hiding this comment

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

main change: deprecation entry in CHANGELOG

Comment on lines +322 to +328
def test_warn_deprecated_attr(self, universe):
"""Test for warning message emitted on using deprecated `timeseries`
attribute"""
CA1 = self._run_Contacts(universe, stop=1)
wmsg = "The `timeseries` attribute was deprecated in MDAnalysis"
with pytest.warns(DeprecationWarning, match=wmsg):
assert_equal(CA1.timeseries, CA1.results.timeseries)
Copy link
Member

Choose a reason for hiding this comment

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

good test: check for message and equality

@orbeckst
Copy link
Member

orbeckst commented May 6, 2021

I am approving & let you get on with it. Please merge when you're ready.

@IAlibay IAlibay merged commit 2c714fc into MDAnalysis:develop May 6, 2021
@IAlibay IAlibay deleted the results-contacts branch May 6, 2021 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants