I'm a bit perplexed as to why my cross reference targets at not working correctly. Only full paths seem to work. I have the following project structure:
my_project
-my_project
-adapters
-adapter_base
-adapter_1
-adapter_2
-docs
-build
-source
-config.py
config.py
sys.path.insert(0, os.path.abspath('..'))
index.rst
.. toctree::
:maxdepth: 2
modules/the_api
modules.rst
Adapter Base
------------
.. automodule:: my_project.adapters.base
:members:
:inherited-members:
:show-inheritance:
Adapter 1
---------
.. automodule:: my_project.adapters.adapter_1
:members:
:inherited-members:
:show-inheritance:
adapter_1.py
class Adapter1(object):
pass
class Adapter1API(object):
def method_a(self):
"""the docs for this method_b"""
pass
def method_b(self):
"""the docs for this method
This works :func:`my_project.adapters.adapter_1.method_a`
No link :func:`method_a`
No link :func:`.method_a`
No link :func:`.adapter_1.method_a`
"""
As you can see in method_b i have tried 4 ways of creating a target path to method_a and only the full path works. Any ideas why the other 3 are not?