title: Sphinx autosummary "toctree contains reference to nonexisting document" warnings
body: <p>I am trying to automatically create api docs for a large python codebase using Sphinx.</p>
  
  <p>I have tried using build_modules.py and sphinx-apidoc. With either one, I can get rst docs successfully created in my output directory for the packages and top-level modules. </p>
  
  <p>However, when I build using</p>
  
  <pre><code>make html
  </code></pre>
  
  <p>it gives thousands of errors of this type:</p>
  
  <pre><code>&lt;autosummary&gt;:None: WARNING: toctree contains reference to nonexisting document 'rstDocs/src.Example1.class1.method1'
  </code></pre>
  
  <p>for every single class and method in the codebase.
  With some experimentation I think I have discovered that the autosummary/autoclass directives are creating toctrees that expect there to be rst files for every class and method. </p>
  
  <p>Other than the warnings, the documentation seems to work well, but I would like to get rid of them and I think I may have misconfigured something.</p>
  
  <p>I have also tried <a href="https://github.com/nipy/nipype/tree/5e03d93f518857a4cfced10e59ab734612c9d94b/tools">nipype/tools</a> to much the same effect.</p>
  
  <p>I modified <a href="https://github.com/nipy/nipype/blob/master/tools/apigen.py">apigen.py</a> and <a href="https://github.com/nipy/nipype/blob/master/tools/build_modref_templates.py">build_modref_templates.py</a> to create rst stubs for each of these "missing" documents, with autoclass/autofunction/automethods as appropriate. However, the build takes quite a long time (10 minutes) and eventually crashes due to memory errors on the last build step.</p>
  
  <p>Here is an example module rst file that creates all the warnings:</p>
  
  <pre><code>src Package
  ===========
  
  :mod:`src` Package
  ------------------
  
  .. automodule:: src.__init__
      :members:
      :undoc-members:
      :show-inheritance:
  
  :mod:`Example1` Module
  ------------------------------------
  
  .. automodule:: src.Example1
      :members:
      :undoc-members:
      :show-inheritance:
  
  :mod:`Example2` Module
  ------------------
  
  .. automodule:: src.Example2
      :members:
      :undoc-members:
      :show-inheritance:
  </code></pre>
  
  <p>Thanks for any advice on how to make these warnings resolve! I would like to stay away from any solution that involves modifying the sphinx site-package files.</p>