Comments (9)
Also note that I'm working on issue #609 and I hope to fix this limitation in a 24.x version.
But regarding this issue, if the packages are not listed in the inventory at all, there is nothing we can really do that wouldn't be hack.
from pydoctor.
Hi
Thanks for the report.
Can you provide a full example for this error?
The full error code and the source python code?
Maybe this is an issue with pydoctor failing to find the "canonical" name of an object
Regards
from pydoctor.
# foobar.py
"""Docstring pointing to `seaborn`
and `docx`
or `python-docx`
"""
I do run pydoctor from an extra script that determine the package meta data itself. In the beginning you see the used command (via subprocess.run()
). The branch is fix/analyboolean
. Error is shown in this output near the end.
$ ./hey_doc.py
INFO - Run pydoctor with arguments:
--project-name=buhtzology (0.2.0.dev0)
--project-version=0.2.0.dev0
--project-url=https://codeberg.org/buhtz/buhtzology
--html-viewsource-base=https://codeberg.org/buhtz/buhtzology/src/branch/fix/analyboolean
--docformat=google
--make-html
--process-types
--warnings-as-errors
--project-base-dir=..
--html-output=html
--intersphinx=https://docs.python.org/3/objects.inv
--intersphinx=https://pandas.pydata.org/docs/objects.inv
--intersphinx=https://seaborn.pydata.org/objects.inv
--intersphinx=https://numpy.org/doc/stable/objects.inv
--intersphinx=https://matplotlib.org/stable/objects.inv
--intersphinx=https://pillow.readthedocs.io/en/stable/objects.inv
--intersphinx=https://openpyxl.readthedocs.io/en/stable/objects.inv
--intersphinx=https://python-docx.readthedocs.io/en/stable/objects.inv
--intersphinx=https://webcolors.readthedocs.io/en/stable/objects.inv
/home/user/goodCloud/my.work/buhtzology/src/buhtzology
adding directory /home/user/goodCloud/my.work/buhtzology/src/buhtzology
2/10 modules processed, 0 warnings
moving 'buhtzology._buhtzology.generate_filepath' into 'buhtzology'
moving 'buhtzology._buhtzology.runtime_as_string' into 'buhtzology'
moving 'buhtzology._buhtzology.how_much_elements_per_piece' into 'buhtzology'
moving 'buhtzology._buhtzology.setup_logging' into 'buhtzology'
moving 'buhtzology._buhtzology.shorten_strings_but_unique' into 'buhtzology'
4/10 modules processed, 0 warnings
moving 'buhtzology._datacontainer.DataContainer' into 'buhtzology.bandas'
10/10 modules processed, 0 warnings
writing html to html using pydoctor.templatewriter.writer.TemplateWriter
starting ModuleIndexPage ...took 0.036934s
starting ClassIndexPage ...took 0.034875s
starting NameIndexPage ...took 0.135736s
starting UndocumentedSummaryPage ...took 0.022510s
starting AllDocuments ...took 2.990770s
starting lunr search index ...took 0.874862s
7/24 pages written
/home/user/goodCloud/my.work/buhtzology/src/buhtzology/foobar.py:1: Cannot find link target for "seaborn"
/home/user/goodCloud/my.work/buhtzology/src/buhtzology/foobar.py:2: Cannot find link target for "docx"
/home/user/goodCloud/my.work/buhtzology/src/buhtzology/foobar.py:3: Cannot find link target for "python-docx"
24/24 pages written
Generating objects inventory at html/objects.inv
ERROR - Something went wrong. Check the output.
from pydoctor.
I don't think that pyhon-docx
is a valid intersphinx target
Can you try to reference docx.document.Document
or seaborn.objects.Plot
?
I did a quick look at the object inventory for docx
and I was not able to find a link for the exact docx
object.
I am not familiar with the Google docstring format and how intersphinx targets are defined.
... but that part looks ok.
from pydoctor.
"""Docstring pointing to `seaborn`
and `docx`
or `python-docx`
Try `docx.document.Document`
or `seaborn.objects.Plot`
"""
I am surprised. The links are working well.
So the problem is that the package name is somehow not linked. I do get errors only for the first three lines.
from pydoctor.
Happy to here it works.
You can use a tool like https://github.com/bskinn/sphobjinv to inspect the content of the object.inv
file.
On a quick look, the linked projects don't include a refernce for the "root" package.
Also, pydoctor will only work the object inventory links starting with :py:
.
It will not work with arbitrary sphinx references like :std:doc:
:py:function:`seaborn.violinplot`
:py:function:`seaborn.xkcd_palette`
:std:label:`faq_seaborn_sucks`
:std:doc:`generated/seaborn.FacetGrid`
:std:doc:`generated/seaborn.FacetGrid.__init__`
:std:doc:`generated/seaborn.FacetGrid.add_legend`
In this case, pydoctor is expected to give this error.
I think that this can be closed as this is not an issue with pydoctor.
If you think there should be a link to the root package, please check with the maintainers of those projects to update their object.inv files to include those references.
Note that interphinx is designed for API linked ... so by default, Sphinx apidoc generated links only for functions, methods, classes ..etc
from pydoctor.
Thanks. I understand now why my problem occur. And think the issue can be closed.
I don't understand all other details discussed at #609.
But could we somehow improve the error message to better guide users like me? I thought it was a bug because the URL was valid and it should work.
from pydoctor.
I might not be able to describe the problem the right way. Seaborn do not see a problem and closed the issue.
And even the Sphinx folks them selfs are not able to explain where the problem could be. https://github.com/orgs/sphinx-doc/discussions/12027#discussioncomment-8653396
from pydoctor.
I assume that pydoctor
do look for entries like this in the objects.inv
py:module
numpy reference/index.html#module-numpy
from pydoctor.
Related Issues (20)
- Fix the standard library smoke test
- Drop support for python 3.6 HOT 3
- Is this normal? HOT 3
- Be clear that exit code 2 means partial success HOT 3
- Intersphinx from local folder HOT 6
- Fix verbose mode
- Regression on in link not found warnings linenumbers
- ERROR collecting pydoctor/test/test_attrs.py with Python-3.12 HOT 3
- Including default values for Pydantic model attributes HOT 3
- Don't raise exceptions when offline HOT 1
- dev-doc: "pydoctor_primer" not documented HOT 6
- Missing test dependencies: hypothesis HOT 4
- Failing and undocumented test "test_pyval_repr.py::test_expressions_parens" HOT 3
- "tox -p all" not working HOT 3
- "tox -p all" to noise for extern contributors HOT 4
- Contribution docu: Code Style HOT 1
- Test docu: Missing docu about test_packags.py and processPackage()
- Build infrastructure: Run ReadTheDocs on every PR/commit? HOT 2
- Find an extensible manner to integrate templatewriter customizations
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pydoctor.