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

Intersphinx issue #1637

Closed
dopplershift opened this issue Oct 26, 2022 · 8 comments · Fixed by #1638
Closed

Intersphinx issue #1637

dopplershift opened this issue Oct 26, 2022 · 8 comments · Fixed by #1638

Comments

@dopplershift
Copy link
Contributor

With the release of 0.20, pint.Quantity and pint.Unit no longer appear in the intersphinx catalog (objects.inv) and can't be linked in other sphinx docs any more. I get errors like:

 WARNING: py:obj reference target not found: pint.Quantity
@dcamron
Copy link

dcamron commented Oct 26, 2022

Coming from the same discovery, #1474 removed the top-level pint automodule, removing those references and any documentation of those classes in the API docs.

@marscher
Copy link
Contributor

marscher commented Oct 27, 2022

Actually the top-level pint module aliases Quantity and Unit, but since Sphinx inspects the __module__ attribute, both objects will not be contained in the documentation, right?

The docs still contains the automodule instruction though:

===================
Developer reference
===================

All Modules
===========

.. automodule:: pint
    :members:

But as a I said before, both objects of interest won't be collected for the members list.

The __module__ attribute for Quantity is:

In [3]: pint.Quantity.__module__
Out[3]: 'pint.util'

@marscher
Copy link
Contributor

Mhm, I just saw, that #1638 will introduce lots of changes. Will there be a new release soon after this has been merged?

@hgrecco
Copy link
Owner

hgrecco commented Oct 27, 2022

I am improving the docs as there were a lot of warnings. In the new version I am explicitly origanizing these classes.. If the current build works, I will release a new version ASAP.

You can take a peek https://pint.readthedocs.io/en/develop/

the problem that I see is that Quantity, Unit and Measurement are not shown separetly but as a single chunk

@hgrecco
Copy link
Owner

hgrecco commented Oct 27, 2022

Ok. This has been fixed now

$  python -m sphinx.ext.intersphinx ~/Downloads/objects.inv | grep pint.Quantity
	pint.Quantity                            api/base.html#pint.Quantity

I will release a new version as soon as tests are done.

@marscher
Copy link
Contributor

really fast roll-out! Thank you so much!!

@hgrecco
Copy link
Owner

hgrecco commented Oct 27, 2022

You are welcome 0.20.1 is out.

I have started a section in the docs to explain how to test continuously against upstream pint. The goal is to catch as many issues as possible before the release.

https://pint.readthedocs.io/en/stable/getting/pint-in-your-projects.html#keeping-up-to-date-with-pint-development

@dopplershift
Copy link
Contributor Author

@hgrecco Just FYI, pint itself is not listed as a module in objects.inv. We'll work around it in MetPy's docs, so no worries, but wanted you to be aware.

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

Successfully merging a pull request may close this issue.

4 participants