Conversation
|
I'm not sure where to put this code in the codebase, so I create a new folder for it right now. I'm open to it being moved somewhere Some stuff which I like to still add (besides tests and docs):
|
|
I think others will have to confirm, but likely we'll want to have Additional it's not finalised yet but if the mmcif reader in #2367 gets finalised then the default download shouldn't be |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #4943 +/- ##
========================================
Coverage 92.73% 92.73%
========================================
Files 180 182 +2
Lines 22475 22499 +24
Branches 3190 3194 +4
========================================
+ Hits 20842 20865 +23
- Misses 1176 1177 +1
Partials 457 457 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I'm ok with that. I can make the code raise an exception if |
|
Assuming that |
|
You've added it to one of the optional dependency categories which is all that should be required. For the actual files where it is used you'll need to have something setup like the usage of biopython: mdanalysis/package/MDAnalysis/analysis/align.py Lines 200 to 207 in dcaa087 I'm not an expert on the pipelines so someone else would have to pitch in more on that. |
|
Thanks for the comment! |
|
I happen to have another question! Is it normal for some of the tests to not be consistent across each commit? From what I understand, each github CLI has to get and build each MDAnalysis from source, and this instance can potentially timeout from what I observe across each commit. The macOS (of the latest commit) failed at 97% of test because it reached the max wall time of two hours. Even then the latest Azure tests failed because of other tests in the source code which I didn't write (namely due to other tests) |
|
In principle, tests should pass everywhere. The Azure tests time out in the test which looks like something that you added. I haven't looked at your code but it might simply be the case that some stuff needs to be written differently for windows. |
|
@jauy123 do you have time to pick up this PR again? Would be great to have the feature in 2.10! |
|
I have time again. I was busy starting the end of spring break with comps, classes, and you know what. |
…since text files are just binary files with special encoding
hadn't implemented changes yet
orbeckst
left a comment
There was a problem hiding this comment.
Looking good. Primarily add docs and integrate into the docs under package/doc/sphinx/source/documentation_pages. You'll need a new fetch_modules.rst and also link that file from ../index.rst. Check the rendered docs to see that your docs show up correctly. Put yourself in the shoes of someone who wants to learn more about this new functionality.
Changed default file_format to cif.gz Chaned return type to pathlib.Path Updated test appropriately removed true_basename()
However, I don't know where to put it? And I kinda finicking around with the sphinx code in order to get it actually show up modified: package/MDAnalysis/fetch/__init__.py modified: package/MDAnalysis/fetch/pdb.py new file: package/doc/sphinx/source/documentation_pages/auxiliary/fetch_init.rst new file: package/doc/sphinx/source/documentation_pages/auxiliary/fetch_pdb.rst modified: package/doc/sphinx/source/documentation_pages/auxiliary_modules.rst
|
Comments addressed and fixed: One thing that I need to do (and something that I need input for from the core devs) is where to place |
| @@ -0,0 +1 @@ | |||
| .. automodule:: MDAnalysis.fetch.__init__ | |||
There was a problem hiding this comment.
Probably need to remove __init__ and just ended it at fetch
|
@orbeckst Can I get input on where to put the |
|
To integrate a new top-level module:
.. automodule:: MDAnalysis.fetch.pdb`(see others for examples). This will use the doc strings from the actual module. (see automodule) |
|
@orbeckst |
orbeckst
left a comment
There was a problem hiding this comment.
Looks almost done to me. Just minor fixes.
|
@orbeckst Ok, I added your requests. |
There was a problem hiding this comment.
Thank you for doing all the work and addressing the change requests.
This looks good to go from my perspective. @p-j-smith @BradyAJohnston can you also have a Quick Look?
Fixes #4907
Changes made in this Pull Request:
This is a still work in progress, but here's a implementation of @BradyAJohnston 's code wrapped into classes. I still need to write tests and docs for the entire thing.
DownloaderBaseand 'PDBDownloader' in order to implement downloading structure file from online sources such as the PDB databank.requestsas a dependencymda.fetch_pdb()is implemented as a wrapper to commonly used option in 'PDBDownloader'PR Checklist
package/CHANGELOGfile updated?Developers Certificate of Origin
I certify that I can submit this code contribution as described in the Developer Certificate of Origin, under the MDAnalysis LICENSE.
📚 Documentation preview 📚: https://mdanalysis--4943.org.readthedocs.build/en/4943/