I would like to remove warnings mostly. I describe my setup below:
.. autosignature:: gmic.GmicImage.from_PIL
:nosummary:
:debug:
after this, when building HTML with sphinx, I get the following log with warnings regarding a package import attempt:
(numpy291) { } AAA@N302L-G18F04:~/Productions/GMIC/gmic-py$
$ bash build_tools.bash 6b_make_doc_without_c_recompilation
🐯 Targeting G'MIC 2.9.1 (gmic.eu) as package 2.9.1-alpha2🐯
Found existing installation: gmic 2.9.1a1
Uninstalling gmic-2.9.1a1:
Successfully uninstalled gmic-2.9.1a1
Processing ./dist/gmic-2.9.1a1-cp37-cp37m-linux_x86_64.whl
Requirement already satisfied: wurlitzer in /export/home/AAA/.virtualenvs/numpy291/lib/python3.7/site-packages (from gmic==2.9.1a1) (2.0.1)
Installing collected packages: gmic
Successfully installed gmic-2.9.1a1
WARNING: You are using pip version 20.2.2; however, version 20.2.4 is available.
You should consider upgrading via the '/export/home/AAA/.virtualenvs/numpy291/bin/python3.7 -m pip install --upgrade pip' command.
Sphinx v3.2.1 en cours d'exécution
chargement de l'environnement pickled... fait
construction en cours [mo]:cibles pour les fichiers po 0 qui sont périmées
construction [html]:cibles pour les fichiers sources 7 qui sont périmées
mise-à-jour de l'environnement :0 ajouté, 7 modifié, 0 supprimé
OUTPUT FILENAME gmic_sphinxpuvos1js/5e1f69be-147c-11eb-9e0e-8cec4b8c0881.png
WILL RUN /export/home/AAA/.virtualenvs/numpy291/lib/python3.7/site-packages/gmic_sphinx/samples/sample_earth.png blur 4 output gmic_sphinxpuvos1js/5e1f69be-147c-11eb-9e0e-8cec4b8c0881.png
OUTPUT FILENAME gmic_sphinxpuvos1js/5e1f69bf-147c-11eb-9e0e-8cec4b8c0881.png
WILL RUN /export/home/AAA/.virtualenvs/numpy291/lib/python3.7/site-packages/gmic_sphinx/samples/sample_earth.png blur 4 output gmic_sphinxpuvos1js/5e1f69bf-147c-11eb-9e0e-8cec4b8c0881.png
OUTPUT FILENAME gmic_sphinxpuvos1js/5e1f69c0-147c-11eb-9e0e-8cec4b8c0881.png
WILL RUN /export/home/AAA/.virtualenvs/numpy291/lib/python3.7/site-packages/gmic_sphinx/samples/sample_earth.png blur 4 fx_bokeh 3,8,0,30,8,4,0.3,0.2,210,210,80,160,0.7,30,20,20,1,2,170,130,20,110,0.15,0 output gmic_sphinxpuvos1js/5e1f69c0-147c-11eb-9e0e-8cec4b8c0881.png
lecture des sources... [100%] numpy
WARNING: [autosignature] unable to import 'gmic.GmicImage.from_PIL' due to 'Unable to import 'gmic.GmicImage.from_PIL'. Exceptions met: function-<class 'RuntimeError'>-Unable to compile and execute 'from gmic.GmicImage import from_PIL\nmyfunc = from_PIL' due to No module named 'gmic.GmicImage'; 'gmic' is not a package given: gmic.GmicImage.from_PIL ### method-<class 'TypeError'>-'gmic.GmicImage.from_PIL' is not a method - <built-in method from_PIL of type object at 0x7ff9c43e6ee0> ### staticmethod-<class 'TypeError'>-'gmic.GmicImage.from_PIL' is not a static method - <built-in method from_PIL of type object at 0x7ff9c43e6ee0> ### property-<class 'TypeError'>-'gmic.GmicImage.from_PIL' is not a property(*) - <built-in method from_PIL of type object at 0x7ff9c43e6ee0> ### class-<class 'RuntimeError'>-Unable to compile and execute 'from gmic.GmicImage import from_PIL\nmyfunc = from_PIL' due to No module named 'gmic.GmicImage'; 'gmic' is not a package given: gmic.GmicImage.from_PIL'
WARNING: File "/export/home/AAA/Productions/GMIC/gmic-py/docs/PIL.rst", line 8
WARNING: [autosignature] object 'gmic.GmicImage.from_PIL' cannot be imported.
recherche des fichiers périmés... aucun résultat
environnement de sérialisation... fait
vérification de la cohérence... fait
document en préparation... fait
écriture... [100%] numpy
generating indices... genindex py-modindexfait
writing additional pages... searchfait
copie des images... [100%] gmic_sphinxpuvos1js/5e1f69c0-147c-11eb-9e0e-8cec4b8c0881.png
copie des fichiers statiques... ... fait
copying extra files... fait
dumping search index in English (code: en)... fait
dumping object inventory... fait
build a réussi, 3 warnings.
Les pages HTML sont dans _build/html .
Hello,
I would like to remove warnings mostly. I describe my setup below:
I am trying this in a .rst file for the gmic-py purely compiled C/C++ Python binding which has C docstrings:
.. autosignature:: gmic.GmicImage.from_PIL
:nosummary:
:debug:
For it to work I had to do three things:
pyquickhelperandsphinxcontrib.imagesvgto my docs/'s requirements.txtimport gmicand addpyquickhelper.sphinxext.sphinx_autosignatureto the extensions array variable, within mydocs/conf.pyafter this, when building HTML with sphinx, I get the following log with warnings regarding a package import attempt:
the result is:

How do I:
Thanks for your help!