Dear sphinx-team and sphinx-users,

I am currently working on documenting some code, and keep on getting the 
following warning/error (this is one example of multiple):

WARNING: invalid signature for automodule (
'components.component-1.orc_component_1.app)
WARNING: don't know which module to import for autodocumenting 
'components.component-1.orc_component_1.app' (try placing a "module" or 
"currentmodule" directive in the document, or giving an explicit module name
)

I think it has to do with "-" in the sub-directory names, without being 
sure. Since multiple people are working on - and using the code I can't 
change the directory names. Do you know if there is a way to work around 
this error and still get the scripts documented? Or if there are some 
settings in sphinx that can be changed to accommodate this?


Below I have sketched out a simplified representation of the project and 
how I have built the sphinx documentation:

.
|-- README.rst
|-- components
|   |-- component-1
|   |   |-- README.rst
|   |   |-- orc_component_1
|   |   |   |-- app.py
|   |   |   |-- services.py
|   |   |   `-- utils.py
|   |-- component-2
|   |   |-- README.rst
|   |   |-- orc_component_2
|   |   |   |-- app.py
|   |   |   |-- services.py
|   |   |   `-- utils.py
|-- docs
|   |-- Makefile
|   |-- build
|   |   |-- doctrees
|   |   `-- html
|   |-- make.bat
|   `-- source
|       |-- _static
|       |-- _templates
|       |-- components.rst
|       |-- conf.py
|       |-- index.rst
|       |-- readme_components.rst
.... and so on..



in conf.py, the sys.path is set to:

import os
import sys
sys.path.insert(0, os.path.abspath('../..'))


the index.rst

Welcome!
========


.. toctree::
   :maxdepth: 2
   :caption: Modules:


components
readme-components


Indices and tables
==================


* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`



the readme_components:

.. include:: ../../README.rst

.. include:: ../../component-1/README.rst

.. include:: ../../component-2/README.rst


The components (only the ones we want to document)


component-1
===========


.. automodule:: components.component-1.orc_component_1.app
   :members:


.. automodule:: components.component-1.orc_component_1.services
   :members:


.. automodule:: components.component-1.orc_component_1.utils
   :members:


component-2
===========


.. and so on

Thanks!

Best wishes, Birgitte

-- 
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/6d5339ea-323a-4286-81dc-6d76efda77bd%40googlegroups.com.

Reply via email to