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

Alias bfactor to tempfactor #3345

Merged
merged 11 commits into from
Aug 12, 2021
Merged

Conversation

lilyminium
Copy link
Member

@lilyminium lilyminium commented May 31, 2021

Fixes #1901

Changes made in this Pull Request:

  • Aliases bfactor to tempfactor with some abstract-ish machinery (aliases) in case we do this again in the future.
  • Added deprecation warning on access

I forget, did we want to warn people that this attribute now has 2 names?

I kept most of the mentions of bfactor in the tests the same to make sure we're not altering behaviour.

PR Checklist

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

@pep8speaks
Copy link

pep8speaks commented May 31, 2021

Hello @lilyminium! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 161:80: E501 line too long (91 > 79 characters)

Comment last updated at 2021-08-01 17:02:38 UTC

package/CHANGELOG Outdated Show resolved Hide resolved
package/MDAnalysis/core/topologyattrs.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jun 1, 2021

Codecov Report

Merging #3345 (b82ba6e) into develop (1e31180) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #3345   +/-   ##
========================================
  Coverage    93.62%   93.62%           
========================================
  Files          176      176           
  Lines        22835    22848   +13     
  Branches      3224     3224           
========================================
+ Hits         21379    21392   +13     
  Misses        1405     1405           
  Partials        51       51           
Impacted Files Coverage Δ
package/MDAnalysis/converters/RDKit.py 98.06% <ø> (-0.02%) ⬇️
package/MDAnalysis/topology/PDBParser.py 100.00% <ø> (ø)
package/MDAnalysis/topology/__init__.py 100.00% <ø> (ø)
package/MDAnalysis/core/topologyattrs.py 96.77% <100.00%> (+0.05%) ⬆️
package/MDAnalysis/core/universe.py 97.98% <100.00%> (-0.02%) ⬇️
package/MDAnalysis/topology/MMTFParser.py 98.07% <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 1e31180...b82ba6e. Read the comment docs.

@lilyminium lilyminium force-pushed the alias-bfactor branch 2 times, most recently from 766929f to b8e7f7c Compare June 1, 2021 23:19
@lilyminium lilyminium requested review from orbeckst and IAlibay June 2, 2021 01:22
@orbeckst
Copy link
Member

orbeckst commented Jun 2, 2021 via email

@lilyminium
Copy link
Member Author

lilyminium commented Jun 2, 2021 via email

Copy link
Member

@IAlibay IAlibay left a comment

Choose a reason for hiding this comment

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

Couple of small comments.

package/CHANGELOG Show resolved Hide resolved
@@ -265,6 +265,25 @@ def _attach_transplant_stubs(attribute_name, topology_attribute_class):
setattr(dest_class, method_name, stub)


# TODO: remove bfactors in 3.0
BFACTOR_WARNING = ("The bfactor topology attribute is only "
Copy link
Member

Choose a reason for hiding this comment

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

This should be documented somewhere.

Copy link
Member Author

@lilyminium lilyminium Jun 3, 2021

Choose a reason for hiding this comment

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

I'm not sure we really document all the topology attributes anywhere. I added it as a docstring to the bfactor/s properties?

Edit: and I'll update the user guide

Copy link
Member

Choose a reason for hiding this comment

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

Yeah that sounds reasonable, for some reason I thought we had a big table somewhere, but maybe I'm getting confused with something else.

Copy link
Member Author

Choose a reason for hiding this comment

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

in __init__.py, but I think that might firstly be woefully out of date, and secondly never mentioned bfactors to start off with :p

testsuite/MDAnalysisTests/core/test_universe.py Outdated Show resolved Hide resolved
Copy link
Member

@IAlibay IAlibay left a comment

Choose a reason for hiding this comment

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

sorry it took so long to re-review.

Couple of questions and some docs changes for pdb/mmtf

@@ -265,6 +265,25 @@ def _attach_transplant_stubs(attribute_name, topology_attribute_class):
setattr(dest_class, method_name, stub)


# TODO: remove bfactors in 3.0
BFACTOR_WARNING = ("The bfactor topology attribute is only "
Copy link
Member

Choose a reason for hiding this comment

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

Yeah that sounds reasonable, for some reason I thought we had a big table somewhere, but maybe I'm getting confused with something else.

package/MDAnalysis/core/topologyattrs.py Show resolved Hide resolved
package/MDAnalysis/topology/MMTFParser.py Show resolved Hide resolved
package/MDAnalysis/topology/PDBParser.py Show resolved Hide resolved
@IAlibay
Copy link
Member

IAlibay commented Jul 19, 2021

@lilyminium if you can give a yea/nay to my review comments we can aim to merge this.

@lilyminium lilyminium force-pushed the alias-bfactor branch 2 times, most recently from 173f09c to 89072af Compare July 19, 2021 13:14
Copy link
Member

@IAlibay IAlibay left a comment

Choose a reason for hiding this comment

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

lgtm - please do merge whenever

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.

minor doc issues that should be corrected, please

package/MDAnalysis/core/topologyattrs.py Show resolved Hide resolved
package/MDAnalysis/core/topologyattrs.py Show resolved Hide resolved
package/MDAnalysis/topology/PDBParser.py Outdated Show resolved Hide resolved
@IAlibay
Copy link
Member

IAlibay commented Aug 12, 2021

@orbeckst is this good to merge now?

@IAlibay IAlibay merged commit 09f50ec into MDAnalysis:develop Aug 12, 2021
@IAlibay
Copy link
Member

IAlibay commented Aug 12, 2021

🎉 one step closer to a 2.0 release!

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.

Alias tempfactor & bfactors
6 participants