- 
                Notifications
    
You must be signed in to change notification settings  - Fork 2.1k
 
Numpy docs hmc #2405
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
Numpy docs hmc #2405
Conversation
| 
           (also, removing attribution to @jsalvatier is not meant as a slight -- I think the git history provides a record of credit, and this is interpreted by numpy as a malformed module docstring.)  | 
    
        
          
                setup.cfg
              
                Outdated
          
        
      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.
what is this for?
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.
I'll add a comment -- D100 wants a docstring at the top of every file, and D104 wants a docstring in every __init__.py file
        
          
                pymc3/step_methods/hmc/hmc.py
              
                Outdated
          
        
      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.
stopping time and step size adaptation.
        
          
                pymc3/step_methods/hmc/nuts.py
              
                Outdated
          
        
      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.
The standard says that we shouldn't document the arguments in __init__ and in the class doc string.
https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt#class-docstring
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.
It looks like most of the class doc string is documenting the sampler_stats return object -- I hadn't seen that there is an Attribute section for class docstrings though, which is probably where the sampler stats should go...
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.
Actually, that is a funny thing to document in __init__ since it is an attribute it provides on the trace object.  It makes sense to me to leave it where it is, and not adding an Attribute section.
| 
           Thanks for writing all those doc strings!  | 
    
| 
           Don't we want new line after """?  | 
    
        
          
                pymc3/step_methods/hmc/hmc.py
              
                Outdated
          
        
      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.
Numpy should be imported before local imports by pep8
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.
I updated this here -- it is actually a pylint check (wrong-import-order) that I can maybe try adding tomorrow, but that is a ton of violations!
1756260    to
    1259063      
    Compare
  
    1259063    to
    ee199ef      
    Compare
  
    | 
           Going to merge these once tests pass, since the rebasing is a pain and just making sure that the docs follow the functions around!  | 
    
| 
           This is great @ColCarroll.  | 
    
As was foretold in #2403
@aseyboldt you might take particular offense to some of the docstrings -- would love any nitpicks.