Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It would be awesome if you could add a spot for apidoc calls #16

Open
Jnorm911 opened this issue Oct 20, 2022 · 5 comments
Open

It would be awesome if you could add a spot for apidoc calls #16

Jnorm911 opened this issue Oct 20, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@Jnorm911
Copy link

An option before the push that would allow us to enter a popular apidoc call for example "sphinx-apidoc -f -o . .." With this we could completely automate sphinx docs on push.

@SilverRainZ
Copy link
Member

Hello, sorry for replying so late.

Do you have an example of this? If we generate apidoc for a python object, we do not need to call sphinx-apidoc by hand.

@SilverRainZ SilverRainZ added the enhancement New feature or request label Nov 5, 2022
@hesic73
Copy link

hesic73 commented Feb 29, 2024

I've encountered the same issue and have implemented some modifications in my fork available at https://github.com/hesic73/pages, where I also introduced a parameter module_path. To enable sphinx-build to locate the module, it's essential to add the following lines to conf.py:

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

@SilverRainZ
Copy link
Member

Hi @hesic73, what the value of module_path should be?

B.T.W. Are you willing to make a pull request?

@hesic73
Copy link

hesic73 commented Mar 2, 2024

According to https://www.sphinx-doc.org/en/master/man/sphinx-apidoc.html, MODULE_PATH is the path to a Python package to document. For example in my repository, module_path=gomoku_rl.

For now it's hard-coded. But this should be an optional parameter. Maybe I will change the code and make a pr.

@SilverRainZ
Copy link
Member

Yes, it would be better to make the parameter optional. Besides, I think apidoc_module_path should better than module_path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

3 participants