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

Issue 782 removeflags #2515

Merged
merged 11 commits into from
Feb 15, 2020
Merged

Issue 782 removeflags #2515

merged 11 commits into from
Feb 15, 2020

Conversation

richardjgowers
Copy link
Member

Fixes #782

Changes made in this Pull Request:

  • removed flags

PR Checklist

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

@codecov
Copy link

codecov bot commented Feb 9, 2020

Codecov Report

Merging #2515 into develop will increase coverage by 0.81%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2515      +/-   ##
===========================================
+ Coverage    90.25%   91.07%   +0.81%     
===========================================
  Files          170      170              
  Lines        22874    23070     +196     
  Branches      2989     3028      +39     
===========================================
+ Hits         20646    21011     +365     
+ Misses        1625     1467     -158     
+ Partials       603      592      -11     
Impacted Files Coverage Δ
package/MDAnalysis/lib/mdamath.py 91.39% <0.00%> (-2.16%) ⬇️
package/MDAnalysis/coordinates/PDB.py 90.09% <0.00%> (-0.55%) ⬇️
package/MDAnalysis/coordinates/TRJ.py 94.25% <0.00%> (-0.51%) ⬇️
package/MDAnalysis/analysis/hole.py 71.54% <0.00%> (-0.47%) ⬇️
package/MDAnalysis/analysis/rms.py 92.41% <0.00%> (-0.40%) ⬇️
package/MDAnalysis/lib/util.py 87.97% <0.00%> (-0.21%) ⬇️
__init__.py 91.89% <0.00%> (ø) ⬆️
datafiles.py 31.25% <0.00%> (ø) ⬆️
lib/__init__.py 100.00% <0.00%> (ø) ⬆️
topology/base.py 97.87% <0.00%> (ø) ⬆️
... and 60 more

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 e1d13e2...e06bd25. Read the comment docs.

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, just a couple of minor docstring suggestions.

* Removed core.flags. Default behaviour (eg pbc, units) now defaults to
the default setting of the flag before removal. If you were using flags
you will now have to supply the flag setting as keyword arguments to
function calls.
Copy link
Member

Choose a reason for hiding this comment

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

Would it be worth adding the issue number here?

@@ -148,10 +147,8 @@ def __init__(self, filename, n_atoms=None, atoms=None, convert_units=None,
"""
Copy link
Member

Choose a reason for hiding this comment

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

Whilst convert_units wasn't part of the __init__ docstring originally, would it be worth adding it?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is on the Writer, so this being true would convert inputs to the native units ... for xyz? I'm not sure if XYZ has a native unit? So I'm not going to break anything here, but I'm not sure I want to document the fact that this option exists?

Copy link
Member

Choose a reason for hiding this comment

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

XYZ units are generally in angstroms and that's how most visualization packages interpret them (VMD for example).

Copy link
Member

Choose a reason for hiding this comment

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

So MDA does seem to assume ps/Angstrom on read, and the default writer also assume those units on the conversion. I guess the only case I could think of where this might be useful, is if for some reason you created a Universe with non-base units, and then wanted to use the writer to have a non-ps/Angstrom write. With the removal of flags, I'm not sure how likely that would be to happen though...

@@ -2090,13 +2089,10 @@ class ReaderBase(ProtoReader):

Copy link
Member

Choose a reason for hiding this comment

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

Since these are base readers, would it be worth documenting the slight behaviour change as a versionchanged?

package/MDAnalysis/core/topologyattrs.py Show resolved Hide resolved
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.

lgtm — one minor typesetting comment...

You're a hero, you shall be known henceforth as the Slayer of Ill-Conceived and Misguided Features.

If ``True`` and `compound` is ``'group'``, move all atoms to the
primary unit cell before calculation. If ``True`` and `compound` is
``'segments'`` or ``'residues'``, the center of each compound will
be calculated without moving any :class:`Atoms<Atom>` to keep the
compounds intact. Instead, the resulting position vectors will be
moved to the primary unit cell after calculation.
moved to the primary unit cell after calculation. Default False.
Copy link
Member

Choose a reason for hiding this comment

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

Typeset False as

``False``

@orbeckst
Copy link
Member

@IAlibay and @RMeli thanks for the reviews!

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.

@richardjgowers
Copy link
Member Author

@orbeckst ok docs now all done, grepping doesn't show any more flag stuff in the repo

@orbeckst
Copy link
Member

Thanks go ahead and do what needs to be done.

(I’m traveling and on mobile...)

@richardjgowers richardjgowers merged commit 6f51a26 into develop Feb 15, 2020
@richardjgowers richardjgowers deleted the issue-782-removeflags branch February 15, 2020 23:51
@fiona-naughton fiona-naughton added maintainability Component-Core deprecation Deprecated functionality to give advance warning for API changes. labels Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component-Core deprecation Deprecated functionality to give advance warning for API changes. maintainability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

remove flag registry
5 participants