-
Notifications
You must be signed in to change notification settings - Fork 664
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
updated to return Permissive PDB Reader and Parser for all PDBs #812
Conversation
The travis CI build should fail at this point, tests requiring the PDB reader need to be removed or made into a known fail. If this looks good I'll go ahead and remove the tests involving the strict PDB reader. In addition, by my understanding, the QC issue probably should be ignored. If we want a permissive/strict reader distinction for some other format at some point down the road this backbone will be useful. |
I'm thinking now that it would be better to just go ahead and delete all references to the BioPython PDB Reader and Parser altogether. Would this mean that we just go ahead and rename the PrimitivePDBReader to be the PDBReader? |
Yes you can do that. Please still keep a dummy @deprecated(...)
PrimitivePDBReader = PDBReader |
BTW you also need to change the documentation what the BioPython parsers are removed and check that the tests still pass, so you can't cross out the two points. |
This is very clearly broken as of right now, I am seeing issues with import errors that I will address either tonight or tomorrow. Fixing the tests shouldn't be difficult after the code is working. |
8b34f1b
to
5d51914
Compare
as options for 'permissive'=False. Added deprecation warnings for Primitive Readers/Writers and Parsers. Changed doc strings to eliminate references to BioPython Reader/Writer. Updated CHANGELOG to reflect changes.
This is the only failure.
I'm getting an error for a PDBQT test, which is strange since I didn't change the file at all and it doesn't have any dependencies on the PDBReader, Writer or Parser, does anyone know of this problem? FWIW its worth this seems to only be a problem on my machine, and fails in my copy of the upstream/develop branch as well. |
I just did some testing and realized I need to move the deprecation warnings to inside the objects. I'll get on this tonight. |
caused by BioPython, updated CHANGELOG.
492add3
to
64dfdfa
Compare
Out of curiosity, why using |
The deprecate decorator wasn't working. I didn't actually try it in the form of |
@@ -3960,6 +3960,9 @@ def __init__(self, *args, **kwargs): | |||
.. versionchanged:: 0.11.0 | |||
Added the *is_anchor* and *anchor_name* keywords for finer behavior | |||
control when unpickling instances of :class:`MDAnalysis.core.AtomGroup.AtomGroup`. | |||
.. versionchanged:: 0.14.1 |
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.
wrong version. It will be 0.15.0
@jdetle did you make any progress on this? There are some conflicts with the develop branch you have to solve. All in all this goes into a good direction. I haven't noticed to much looking over the changes right now. |
I thought that keeping the permissive flag for a version would help the transition. If this is bad practice I can go ahead and delete it. Right now it really does nothing so I can see now why this would be bad practice. The conflict is only in the changelog. I'll go ahead and fix that now. |
For some reason I can't see commit e27c33a when rebasing. I vote that we keep the permissive argument to avoid confusing people until they understand the feature is going away. If we didn't keep it, why do we have a dummy primitive readers/writers/parsers? |
I also think we should keep it with a warning during the deprecation period. On 11-04-16 19:58, John Detlefs wrote:
|
9b67e9d
to
b82e11e
Compare
Okay, changes made. Should I rebase to one big commit? |
It seems to me that your commits are sensible self-contained units but maybe someone else has stronger feelings about this. |
Okay, actually I forgot the sloppy builder so I still need to get that. |
…ment. Updated tests in test_pdb and test_topology, updated tests to remove references to the permissive flag. Updated docs to identify deprecated modules, removed structure builder and updated the CHANGELOG
Build passing, need to update the changelog, but I made the changes that you asked for @orbeckst, @kain88-de |
@@ -67,8 +64,8 @@ def get_reader_for(filename, permissive=False, format=None): | |||
if format is None: | |||
format = util.guess_format(filename) | |||
format = format.upper() | |||
if permissive and format == 'PDB': | |||
return _READERS['Permissive_PDB'] | |||
if format == 'PDB': |
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.
This whole statement should be removed. (Lines 67 & 68) because we'll just run through the try/except below.
There are still occurrences of format = "Permissive_PDB" We should not need this anymore. Just change them all to "PDB" instead of "Permissive_PDB". |
Alright! Will do, thanks.
|
@orbeckst After thinking about this a little bit I remembered why I was doing what I was doing. By my understanding the point of the deprecation warning in the primitive readers/writers/parsers was to allow a user to pass format='Permissive_PDB' to the |
One can still use the class directly in user code. Hopefully unlikely but possible. Let them sit there for one release cycle and then we remove them as scheduled. (Deprecations are tricky business because you never know how other people use your code. But all the classes are officially documented as the API and thus users are welcome to use them directly, e.g. someone might have subclassed PrimitivePDBReader for their own purposes. We don’t know this so we have to honor the promise that we make through our API documentation and at least give them some warning.) Oliver Beckstein * [email protected] |
Okay, that works, thanks.
|
err_msg="Writing PDB file with PrimitivePDBWriter " | ||
"does not reproduce original coordinates") | ||
u = mda.Universe(PSF, self.outfile) | ||
assert_almost_equal(u.atoms.coordinates(), |
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.
Why has this gone back to coordinates()? Is it because we changed this to positions after you created this branch?
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.
Resolved the conflict wrong while tired last night, my apologies!
Looking good, just fix the coordinates() to positions again. It's nice to simplify to a single PDB solution! |
Thanks Oliver! I was having some trouble rebasing commits made before some
|
Fixes #777
Changes made in this Pull Request:
PR Checklist