RFC: Add results class for storing analysis results#3233
RFC: Add results class for storing analysis results#3233orbeckst merged 37 commits intoMDAnalysis:developfrom
Conversation
|
Hello @PicoCentauri! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2021-05-05 07:29:03 UTC |
Codecov Report
@@ Coverage Diff @@
## develop #3233 +/- ##
===========================================
+ Coverage 92.87% 92.88% +0.01%
===========================================
Files 170 170
Lines 22870 22905 +35
Branches 3243 3249 +6
===========================================
+ Hits 21240 21275 +35
Misses 1582 1582
Partials 48 48
Continue to review full report at Codecov.
|
|
Just going to ping all the @MDAnalysis/coredevs this is central to the 2.0 release so the more eyes the better. |
orbeckst
left a comment
There was a problem hiding this comment.
- I think the
_Resultsclass could be made more dict like, which would also help with integrating it into the existing classes. - I am not clear how AnalysisFromFunction will use the new results class.
|
I'm wondering and don't see a reason why |
c909b12 to
0326737
Compare
History... very old code. Would be awesome to have it AnalysisBase-derived but better in a different PR – small, self-contained PRs are more easily reviewed and merged. |
|
If you raise an issue then you can attach the PR to the issue for making GNM analysis canonical. |
|
With GNM now AnalysisBase-based #3244, could you please update the PR, @PicoCentauri ? |
|
I am pretty much ready to approve this PR and the use of the @MDAnalysis/coredevs if you see issues with this approach, now is the time to make a blocking review. |
orbeckst
left a comment
There was a problem hiding this comment.
I am generally happy with the approach.
The two major things I see
- document what API should contain (or that it contain anything)
- prevent Results to have keys that collide with dict methods/attributes
Otherwise I have various minor doc things – please see comments.
f343989 to
fb55489
Compare
orbeckst
left a comment
There was a problem hiding this comment.
Looking very good, just minor doc/style comments.
|
I didn't have time to see why the tests fail but obviously they should pass, too. |
fb55489 to
15528a2
Compare
lilyminium
left a comment
There was a problem hiding this comment.
I saw you updated while I was reviewing so not all comments may be applicable @PicoCentauri. I've left comments on the docs :)
Co-authored-by: Lily Wang <31115101+lilyminium@users.noreply.github.com>
Co-authored-by: cbouy <bouysset.cedric@gmail.com>
81a552f to
85940f9
Compare
|
Thank for your suggestion @orbeckst. I implemented the doc changes. While removing the available analysis section I merged the docstring of the analysis' |
|
@lilyminium if you have a few minutes to spare to do a final look at this PR then please do. Otherwise I am happy to merge it tonight (so that we can add @IAlibay , you said on discord you found some duplicate authorship/names — I didn't understand what that was about. Anything that needs to be fixed here? |
O yeah, nothing major, there's just two |
Sorry, that was probably me who messed this up. |
Comments were addressed as far as I can see and @lilyminium said I should dismiss her review if necessary as she is busy.
|
@PicoCentauri and @joaomcteixeira – the new AnalysisBase is in 2.0.0 ! As @IAlibay said: let's get at least the most used AnalysisBase classes to also use .results (in a backward compatible way) so that we can teach the new way at the PRACE workshop. |
|
Fantastic! All kudos for this implementation to @PicoCentauri. Congratz! 🎉 |
Fixes #3115
Changes made in this Pull Request:
This PR adds a
_Resultsclass to theAnalysisBasefor similarly storing results across all analysis modules. One could think about using Python's "new" dataclass decorator when Py3.6 is dropped.I would like to know what you think about the approach and I'm open to discussing improvements or other suggestions.
The docs definitely need some polishing.
PR Checklist