audreyfeldroy / cookiecutter-pypackage

Cookiecutter template for a Python package.
BSD 3-Clause "New" or "Revised" License
4.26k stars 1.78k forks source link

Fix for autodoc on readthedocs.io #342

Closed verginer closed 6 years ago

verginer commented 7 years ago

Description

I tried to get the autodoc to compile on rtfd but it failed until I removed the rst files specified in the docs/.gitignore. If they are not pushed and committed then read the docs cannot use autodoc

I propose to remove the files from that docs/.gitignore or find a way that it still compiles on readthedocs.io

delgadom commented 7 years ago

It does seem like one of three things are true:

  1. the docs/.gitignore file should not be there
  2. sphinx-apidoc -o docs {{cookiecutter.package_slug}} needs to be part of a pre-commit hook in order to serve docs
  3. Some ReadTheDocs configuration option allows apidoc to be run on their end, but this needs to be turned on, and the docs don't reflect that

Anyone else having this problem? I don't get api docs for any modules using this cookiecuter.

monkeez commented 6 years ago

I'm also having this issue, is there any solution? I'd prefer if ReadTheDocs could build these files so I wouldn't have to remember to do it every time my code changes.

delgadom commented 6 years ago

you can definitely get around the issue by removing docs/.gitignore or removing *.rst from that file. it's just annoying that packages cut with this template have this bug.

pydanny commented 6 years ago

Resolved