Thank you for your reply.

I'm the author of sparse module 
https://github.com/dizcza/sparse-representation

After playing with autosummary I managed to understand what you mean and 
how to use it. Here is what I found

1. Setting `numpydoc_show_class_members = False` in the conf.py, as 
suggested in https://github.com/phn/pytpm/issues/3#issuecomment-12133978, 
with a combination of automodule+members (no autosummary) seems to work. 
But autosummary version is simpler to navigate and read.

2. Using autosummary option, I need to remove :members: key from my 
reference rst file and put the following lines in coherence.py

.. currentmodule:: sparse.coherence

.. autosummary::
   :toctree: coherence/

   mutual_coherence
   babel


Then it worked. Thank you!
Maybe it'll help someone else as well.


On Sunday, March 1, 2020 at 3:08:28 PM UTC+1, Komiya Takeshi wrote:
>
> Hi, 
>
> It seems your module sparse.greedy_pursuit expects to use autosummary 
> for documentation. So I guess you need to use autosummary instead of 
> autodoc. Could you ask the author of modules about a proper way to 
> generate documentation? 
>
> Thanks, 
> Takeshi KOMIYA 
>
> 2020年2月23日(日) 2:40 Danylo Ulianych <[email protected] <javascript:>>: 
> > 
> > Originally posted in https://github.com/sphinx-doc/sphinx/issues/7198 
> > 
> > 
> > In `sparse/greedy_pursuit.py` source file: 
> > 
> > ``` 
> > Solution = namedtuple("Solution", ("x", "support", "residuals")) 
> > ``` 
> > 
> > The .rst file is 
> > 
> > ``` 
> > .. automodule:: sparse.greedy_pursuit 
> >    :members: 
> > ``` 
> > 
> > `make html` warns 
> > 
> > ``` 
> > 
> /home/dizcza/PycharmProjects/SparseRepresentation/sparse/greedy_pursuit.py:docstring
>  
> of sparse.greedy_pursuit.Solution.rst:29: WARNING: autosummary: stub file 
> not found 'sparse.greedy_pursuit.Solution.count'. Check your 
> autosummary_generate setting. 
> > 
> /home/dizcza/PycharmProjects/SparseRepresentation/sparse/greedy_pursuit.py:docstring
>  
> of sparse.greedy_pursuit.Solution.rst:29: WARNING: autosummary: stub file 
> not found 'sparse.greedy_pursuit.Solution.index'. Check your 
> autosummary_generate setting. 
> > ``` 
> > 
> > I don't have any `autosummary_generate` defined in `conf.py` which has 
> been created by `sphinx-quickstart` default run. The only thing I modified 
> is a list of extensions below. 
> > 
> > **Environment info** 
> > - OS: Ubuntu 18.04 
> > - Python version: 3.7 
> > - Sphinx version: 2.4.2 
> > - Sphinx extensions: 
> > ``` 
> > extensions = [ 
> >     'sphinx.ext.autodoc', 
> >     'sphinx.ext.autosummary', 
> >     'sphinx.ext.doctest', 
> >     'sphinx.ext.intersphinx', 
> >     'sphinx.ext.todo', 
> >     'sphinx.ext.imgmath', 
> >     'sphinx.ext.viewcode', 
> >     'sphinx.ext.mathjax', 
> >     'numpydoc', 
> > ] 
> > ``` 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "sphinx-users" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to [email protected] <javascript:>. 
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sphinx-users/43d1c535-13eb-405d-baad-bdbf7edbfe7a%40googlegroups.com.
>  
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sphinx-users/8435c6cd-659a-4f50-a86f-d34fa5ac269c%40googlegroups.com.

Reply via email to