Skip to content

Document when a new function / class / method / attribute was introduced for the 0.17 release #5504

Closed

Description

@ogrisel

Sphinx makes it possible to declare when a new feature was added using thie versionadded directive:

http://sphinx-doc.org/markup/para.html#directive-versionadded

We should review all the classes / functions / methods / attributes introduced in 0.17 (see the changelog) and add a ..versionadded:: 0.17 declaration in the docstring for those elements.

It's also a good opportunity to add the missing links to the github PR numbers (or issue number if no PR) when those features where added to the matching entry of doc/whats_new.rst.

The commits to address this PR should first be merged in master and then @ogrisel or @amueller will take care of the actual backport to the 0.17.X branch.

Activity

  1. added
    Easy
    on Oct 21, 2015
  2. added this to the 0.17 milestone on Oct 21, 2015
  3. ogrisel commented on Oct 21, 2015

    @ogrisel
    MemberAuthor

    I will open a sister issue to do the same work for features added in the future 0.18 release.

  4. ogrisel commented on Oct 21, 2015

    @ogrisel
    MemberAuthor

    To people deciding to tackle this: don't hesitate to open an early pull request with a [WIP] tag in the title of the pull-request (on github, not in the commit message) so that reviewers can give you feedback early on how to do that. This is the first time we do it on this project so expect a bit of discussion on the best practices that will emerge ;)

  5. jnothman commented on Oct 21, 2015

    @jnothman
    Member

    Perhaps this will help:

    git diff 0.16.0 0.17b1 $(find sklearn -name "*.py" | grep -v tests/) | grep -e '^[-+] *def ' -e '^[-+] *class ' -e '^[-+].* : ' -e '^+++' -e '^---' -e '^@@'
    

    (Perhaps it won't!)

  6. KamalakerDadi commented on Oct 21, 2015

    @KamalakerDadi
    Contributor

    Anybody on this one ?I want to try.

  7. amueller commented on Oct 21, 2015

    @amueller
    Member

    go ahead @KamalakerDadi :)

  8. KamalakerDadi commented on Oct 22, 2015

    @KamalakerDadi
    Contributor

    So, here is the case. To make sure that we agree to one particular space alignment to the versionadded or versionchanged which looks like New in version 0.17 and Changed in version 0.17

    Here are the few snapshots of how it looks like.

    • Class case
      versionadded
    • parameter improved case
      parameter
    • new parameter case
      newparameter

    parameter2

  9. amueller commented on Oct 22, 2015

    @amueller
    Member

    I would always put it at the very bottom of the docstring. So I would do it differently for labels.
    I don't exactly know what I would do for solver.
    Maybe

    * 'cd'  coordinate descent solver (recommended)
    * 'pg' Projected gradient solver (deprecated)
    
    .. versionadded 0.17: 'cd'
    .. versionchanged 0.17: deprecated 'pg'
    
    

    put I'm open for discussion on this.

    I think that the version info is "for the interested expert user" and shouldn't stop the flow of reading the docstring too much.

  10. amueller commented on Nov 1, 2015

    @amueller
    Member

    @KamalakerDadi did you end up working on this? Any partial work would be appreciated for the 0.17 release.

  11. KamalakerDadi commented on Nov 2, 2015

    @KamalakerDadi
    Contributor

    I am half done in PR #5511 . The other half I will finish by this evening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationEasy

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions