Bug 2384200 - Review Request: python-autodocsumm - Extended sphinx autodoc including automatic autosummaries
Summary: Review Request: python-autodocsumm - Extended sphinx autodoc including automa...
Keywords:
Status: RELEASE_PENDING
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Karolina Surma
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-07-29 05:16 UTC by Benson Muite
Modified: 2025-08-23 15:01 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:
ksurma: fedora-review+


Attachments (Terms of Use)

Description Benson Muite 2025-07-29 05:16:07 UTC
spec: https://fed500.fedorapeople.org/python-autodocsumm.spec
srpm: https://fed500.fedorapeople.org/python-autodocsumm-0.2.14-1.fc41.src.rpm

description:
Welcome! This sphinx extension provides some useful extensions to the Sphinxs
autodoc extension. Those are

- It creates a Table of Contents in the style of the autosummary extension with
  methods, classes, functions and attributes
- As you can include the __init__ method documentation for via the
  autoclass_content configuration value, we provide the autodata_content
  configuration value to include the documentation from the __call__ method
- You can exclude the string representation of specific objects. E.g. if you
  have a large dictionary using the not_document_data configuration value.

fas: fed500

Reproducible: Always

Comment 1 Karolina Surma 2025-07-30 11:29:29 UTC
1. You can avoid bootstrapping the package by moving/adding this in the %install section to use the just installed package to generate the documentation (and then remove the BuildRequires on python3-autodocsumm as well as all the bconds).

pushd docs
export PYTHONPATH=%{buildroot}%{python3_sitelib}
sphinx-build -b texinfo . texinfo
pushd texinfo
makeinfo --docbook autodocsumm.texi
install -pDm0644 autodocsumm.xml \
  %{buildroot}%{_datadir}/help/en/autodocsumm/autodocsumm.xml
popd
popd

Out of curiosity: how can you consume the autodocsumm.xml file? Is there a CLI or GUI tool to display it nicely?

2. Delete the leftover comment: "# Fill in the actual package description to submit package to Fedora"

3. Consider adding doc file
%doc README.rst

Comment 2 Benson Muite 2025-08-01 09:47:10 UTC
(In reply to Karolina Surma from comment #1)
> 1. You can avoid bootstrapping the package by moving/adding this in the
> %install section to use the just installed package to generate the
> documentation (and then remove the BuildRequires on python3-autodocsumm as
> well as all the bconds).
> 
> pushd docs
> export PYTHONPATH=%{buildroot}%{python3_sitelib}
> sphinx-build -b texinfo . texinfo
> pushd texinfo
> makeinfo --docbook autodocsumm.texi
> install -pDm0644 autodocsumm.xml \
>   %{buildroot}%{_datadir}/help/en/autodocsumm/autodocsumm.xml
> popd
> popd
> 

Is this ok? Documentation is being built in the install step. Should all
building happen in the %build step?  If this is ok, maybe it is worth
updating the packaging guidelines to indicate documentation can be built
in the %install step?

At the moment have left as is, but happy to update.

spec: https://fed500.fedorapeople.org/python-autodocsumm.spec
srpm: https://fed500.fedorapeople.org/python-autodocsumm-0.2.14-1.fc42~bootstrap.src.rpm  


A bootstrapped build is available at:
https://copr.fedorainfracloud.org/coprs/fed500/python-autodocsumm

> Out of curiosity: how can you consume the autodocsumm.xml file? Is there a
> CLI or GUI tool to display it nicely?
> 

It can be viewed in:
 
https://apps.gnome.org/Yelp/
https://packages.fedoraproject.org/pkgs/yelp/yelp/

https://apps.kde.org/khelpcenter/
https://packages.fedoraproject.org/pkgs/khelpcenter/khelpcenter

Happy to contribute tooling to pyp2spec if the documentation seems ok and would be nice
for other Fedora packages.

> 2. Delete the leftover comment: "# Fill in the actual package description to
> submit package to Fedora"

Done.

> 
> 3. Consider adding doc file
> %doc README.rst

Done

Comment 3 Karolina Surma 2025-08-05 10:10:56 UTC
> Is this ok? Documentation is being built in the install step. Should all
> building happen in the %build step?  If this is ok, maybe it is worth
> updating the packaging guidelines to indicate documentation can be built
> in the %install step?

I don't think it's documented anywhere, but sometimes packagers use it to avoid the bootstrap: https://src.fedoraproject.org/rpms/python-cbor2/blob/rawhide/f/python-cbor2.spec#_48 or https://src.fedoraproject.org/rpms/python-mido/blob/rawhide/f/python-mido.spec#_42
In the end it's up to you and definitely a non-blocking issue.

A suggestion: if you decide to go the bootstrap route, consider using the newer `%bcond bootstrap 0` syntax, which is easier to comprehend.

> > Out of curiosity: how can you consume the autodocsumm.xml file? Is there a
> > CLI or GUI tool to display it nicely?
> > 
> 
> It can be viewed in:
>  
> https://apps.gnome.org/Yelp/
> https://packages.fedoraproject.org/pkgs/yelp/yelp/
> 
> https://apps.kde.org/khelpcenter/
> https://packages.fedoraproject.org/pkgs/khelpcenter/khelpcenter
> 
> Happy to contribute tooling to pyp2spec if the documentation seems ok and
> would be nice
> for other Fedora packages.
> 

Thank you. I haven't realized there's a GUI help app available in Gnome.
As a rule we're not encouraging creating the documentation packages too much
(Sphinx and its ecosystem moves in a different pace than Fedora and the maintenance is cumbersome).


Review:

===== MUST items =====

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: License field in the package spec file matches the actual license.
[x]: Package must own all directories that it creates.
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Package is not known to require an ExcludeArch tag.
[x]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: If (and only if) the source package includes the text of the
     license(s) in its own file, then that file, containing the text of the
     license(s) for the package is included in %license.
[x]: The License field must be a valid SPDX expression.
[x]: Package requires other packages for directories it uses.
[x]: Package does not own files or directories owned by other packages.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package must not depend on deprecated() packages.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 4230 bytes in 1 files.
[x]: Packages must not store files under /srv, /opt or /usr/local

Python:
[-]: Python eggs must not download any dependencies during the build
     process.
[-]: A package which is used by another package via an egg interface should
     provide egg info.
[x]: Package meets the Packaging Guidelines::Python
[x]: Package contains BR: python2-devel or python3-devel
[x]: Packages MUST NOT have dependencies (either build-time or runtime) on
     packages named with the unversioned python- prefix unless no properly
     versioned package exists. Dependencies on Python packages instead MUST
     use names beginning with python2- or python3- as appropriate.
[x]: Python packages must not contain %{pythonX_site(lib|arch)}/* in %files
[x]: Binary eggs must be removed in %prep

===== SHOULD items =====

Generic:
[-]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[x]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[x]: %check is present and all tests pass.
[ ]: Packages should try to preserve timestamps of original installed
     files.
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on all installed packages.
[x]: Spec file according to URL is the same as in SRPM.

Rpmlint (installed packages)
----------------------------
============================ rpmlint session starts ============================
rpmlint: 2.7.0
configuration:
    /usr/lib/python3.14/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
checks: 32, packages: 1

python3-autodocsumm.noarch: E: spelling-error ('autosummaries', 'Summary(en_US) autosummaries -> auto summaries, auto-summaries, summarizes')
python3-autodocsumm.noarch: E: spelling-error ('autosummary', '%description -l en_US autosummary -> auto summary, auto-summary, summary')
python3-autodocsumm.noarch: E: spelling-error ('init', '%description -l en_US init -> unit, int, nit')
python3-autodocsumm.noarch: E: spelling-error ('autoclass', '%description -l en_US autoclass -> auto class, auto-class, autoclaves')
python3-autodocsumm.noarch: E: spelling-error ('autodata', '%description -l en_US autodata -> auto data, auto-data, autodidact')
 1 packages and 0 specfiles checked; 5 errors, 0 warnings, 5 filtered, 5 badness; has taken 0.1 s 


Filter out the rpmlint issues when adding package to the repository.

Package APPROVED.

Comment 4 Fedora Admin user for bugzilla script actions 2025-08-23 15:01:09 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/python-autodocsumm


Note You need to log in before you can comment on or make changes to this bug.