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

Docu: Reference to root package missing in object.inv file #3645

Closed
buhtz opened this issue Feb 29, 2024 · 6 comments
Closed

Docu: Reference to root package missing in object.inv file #3645

buhtz opened this issue Feb 29, 2024 · 6 comments

Comments

@buhtz
Copy link

buhtz commented Feb 29, 2024

As diagnosed here at pydocotor it seems that the object.inv file from seaborn miss a so called "reference to the root package".

That occur the problem that using pydoctor as API doc generator I am not able to reference "seaborn" as a package. I can reference seaborn objects (functions, methods, classes) without problems. But the package itself I can not.

@mwaskom
Copy link
Owner

mwaskom commented Mar 1, 2024

What is object.inv? There is not a file with that name in the repository.

@buhtz
Copy link
Author

buhtz commented Mar 1, 2024

There is not a file with that name in the repository.

Don't have to be. It is auto generated by your doc systems (e.g. Sphinx). Here it is (binary): https://seaborn.pydata.org/objects.inv

What is object.inv?

It is a file generated by your doc system. It can be used by other doc systems so that one doc can link to another doc just by naming the object (e.g. a class or method) instead of using a full URL.
You do use that feature yourself. See the last lines in your docs/conf.py:

intersphinx_mapping = {
    'numpy': ('https://numpy.org/doc/stable/', None),
    'scipy': ('https://docs.scipy.org/doc/scipy/', None),
    'matplotlib': ('https://matplotlib.org/stable', None),
    'pandas': ('https://pandas.pydata.org/pandas-docs/stable/', None),
    'statsmodels': ('https://www.statsmodels.org/stable/', None)
}

Your Sphinx machine do look for a object.inv file in this URLs.

Reference about objects.inv: https://sphobjinv.readthedocs.io/en/stable/syntax.html

You as "seaborn" do offer an objects.inv. But it lacks of a root package reference. Other docus can use seaborn objects in there docstrings but not the package name itself. I don't know how to configure sphinx to acheiv this. I opened a question in Sphinx discussions.

You can take a look what is inside this your objects.inv:

$ python3 -m sphinx.ext.intersphinx https://seaborn.pydata.org/objects.inv

@mwaskom
Copy link
Owner

mwaskom commented Mar 1, 2024

Feel free to look into it. I'll accept a simple fix to the docs configuration if you can come up with one.

@buhtz
Copy link
Author

buhtz commented Mar 1, 2024

Sorry, no expertise in that and also no resources for Sphinx.

@mwaskom
Copy link
Owner

mwaskom commented Mar 1, 2024

OK, I'm going to close then. I don't consider this a bug in seaborn; third-party sites that want a reference for "seaborn" can link to the doc homepage, which makes more sense anyway.

@mwaskom mwaskom closed this as completed Mar 1, 2024
@buhtz
Copy link
Author

buhtz commented Mar 2, 2024

You are a maintainer and it is up to you of course. Compared to other packages (python, matplotlib, pandas, numpy, webcolors, openpyxl, PIL, ...) it is unusual not to have such a root reference in the objects.inv.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants