Skip to content

error in doc generation for AR.fit #563

Closed

Description

@josef-pkt

reported on mailinglist by mikedewar

The fit method of AR shows the Likelihoodmodel.fit docstring in the sphinx rendered docs and with help(...)

fit.__doc__ += base.LikelihoodModel.fit.__doc__

Since this appends the full doc, we have Parameters, and the other categories defined twice. I guess sphinx takes the last one, which is wrong.

see print sm.tsa.AR.fit.__doc__

Activity

  1. jseabold commented on Nov 8, 2012

    @jseabold
    Member

    Uh oh. This is used elsewhere too. Should probably move all this over to templating.

  2. josef-pkt commented on Nov 8, 2012

    @josef-pkt
    MemberAuthor

    Is there really anything in common in the fit() docstring?
    templating assumes that there is enough gain to justify the additional code complication. And templates make the source docstring less informative.

    My first guess was that the templating was wrong.

  3. jseabold commented on Nov 8, 2012

    @jseabold
    Member

    Yes since all of the subclass fit methods call the fit method in Model and can use these parameters as well. I'll have to look if there's a clash of keywords between Model.fit and AR.fit now.

    I'm not really that concerned about source docstring readability. It's a mess now for users (in the way that Matplotlib was and in a way pandas has avoided with decorators and templating). I think the way to clean this up and keep from making these mistakes is by moving to templates everywhere as I've started to do elsewhere. Templates seem to work just fine whereas my ad hoc += is not doing the job. Pretty disappointed that I missed this until now.

  4. josef-pkt commented on Feb 3, 2013

    @josef-pkt
    MemberAuthor

    I don't think we need to copy all the information that is identical to each class.

    as part of PR #640 :
    I removed the docstring appending, for now.
    I fixed also the links in See Also, so now we can just click and get to the full base model docs

  5. added a commit that references this issue on Feb 20, 2013
    9e6194d
  6. added a commit that references this issue on Sep 2, 2014
    d4266fe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions