Skip to content

[FW][IMP] conf.py: strip module path from upgrade utils #13525

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

Open
wants to merge 1 commit into
base: 17.0
Choose a base branch
from

Conversation

fw-bot
Copy link
Collaborator

@fw-bot fw-bot commented May 23, 2025

The full module path in upgrade utils docs causes confusion for users.
See issues odoo/upgrade-util#272 and odoo/upgrade-util#175.

All utils we document online should be used via the top-level module
--i.e. util.name instead of util.submodule.name

Stripping the module path can be achieved in the configuration with
add_module_name=False
Unfortunately this is a global setting that could affect other parts of
Odoo documentation. Thus in current patch we strip the module path from
the signature of odoo.upgrade.util functions and classes.

Technical links:
https://www.sphinx-doc.org/en/master/extdev/event_callbacks.html#event-object-description-transform
https://www.sphinx-doc.org/en/master/extdev/nodes.html#sphinx.addnodes.desc_signature
https://github.com/sphinx-doc/sphinx/blob/v4.3.2/sphinx/domains/python.py#L512
https://sphinx-docutils.readthedocs.io/en/latest/docutils.nodes.html#docutils.nodes

Forward-Port-Of: #13519

@robodoo
Copy link
Collaborator

robodoo commented May 23, 2025

Pull request status dashboard

@fw-bot
Copy link
Collaborator Author

fw-bot commented May 23, 2025

@aj-fuentes @Feyensv cherrypicking of pull request #13519 failed.

stdout:

Auto-merging conf.py
CONFLICT (content): Merge conflict in conf.py

Either perform the forward-port manually (and push to this branch, proceeding as usual) or close this PR (maybe?).

In the former case, you may want to edit this PR message as well.

⚠️ after resolving this conflict, you will need to merge it via @robodoo.

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

The full module path in upgrade utils docs causes confusion for users.
See issues odoo/upgrade-util#272 and odoo/upgrade-util#175.

All utils we document online should be used via the top-level module
--i.e. `util.name` instead of `util.submodule.name`

Stripping the module path can be achieved in the configuration with
[`add_module_name=False`](https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-add_module_names)
Unfortunately this is a global setting that could affect other parts of
Odoo documentation. Thus in current patch we strip the module path from
the signature of `odoo.upgrade.util` functions and classes.

Technical links:
https://www.sphinx-doc.org/en/master/extdev/event_callbacks.html#event-object-description-transform
https://www.sphinx-doc.org/en/master/extdev/nodes.html#sphinx.addnodes.desc_signature
https://github.com/sphinx-doc/sphinx/blob/v4.3.2/sphinx/domains/python.py#L512
https://sphinx-docutils.readthedocs.io/en/latest/docutils.nodes.html#docutils.nodes

X-original-commit: 541c9d4
@aj-fuentes aj-fuentes force-pushed the 17.0-16.0-improve_upg_utils_docs-afu-438515-fw branch from e50e559 to 0405041 Compare May 23, 2025 19:29
@aj-fuentes
Copy link
Contributor

Conflict resolved.

@aj-fuentes
Copy link
Contributor

@robodoo r+

@C3POdoo C3POdoo requested a review from a team May 23, 2025 19:31
@robodoo
Copy link
Collaborator

robodoo commented May 23, 2025

@aj-fuentes @Feyensv 'ci/documentation' failed on this reviewed PR.

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

Successfully merging this pull request may close these issues.

3 participants