Bug 2243337 - Review Request: ford - Generate FORtran Documentation from code comments
Summary: Review Request: ford - Generate FORtran Documentation from code comments
Keywords:
Status: ASSIGNED
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: mmassari
QA Contact: Fedora Extras Quality Assurance
URL: https://github.com/Fortran-FOSS-Progr...
Whiteboard:
Depends On: 2247917
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-10-11 19:35 UTC by Benson Muite
Modified: 2023-11-06 14:15 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)
The .spec file difference from Copr build 6517599 to 6524124 (2.31 KB, patch)
2023-10-13 18:18 UTC, Fedora Review Service
no flags Details | Diff
The .spec file difference from Copr build 6524124 to 6599201 (3.11 KB, patch)
2023-11-05 03:15 UTC, Fedora Review Service
no flags Details | Diff

Description Benson Muite 2023-10-11 19:35:40 UTC
spec: https://download.copr.fedorainfracloud.org/results/fed500/ford/fedora-rawhide-x86_64/06517293-ford/ford.spec
srpm: https://download.copr.fedorainfracloud.org/results/fed500/ford/fedora-rawhide-x86_64/06517293-ford/ford-6.2.5-1.fc40.src.rpm

description:
This is an automatic documentation generator for modern Fortran programs.
FORD stands for FORtran Documenter. As you may know, "to ford" refers to
crossing a river (or other body of water). It does not, in this context,
refer to any company or individual associated with cars.

Ford was written due to Doxygen's poor handling of Fortran and the lack of
comparable alternatives. ROBODoc can't actually extract any information from
the source code and just about any other automatic documentation software I
found was either proprietary, didn't work very well for Fortran, or was
limited in terms of how it produced its output. f90doc is quite good and I
managed to modify it so that it could handle most of Fortran 2003, but it
produces rather ugly documentation, can't provide as many links between
different parts of the documentation as I'd like, and is written in Perl
(which I'm not that familiar with and which lacks the sort of libraries
found in Python for producing HTML content).

The goal of FORD is to be able to reliably produce documentation for modern
Fortran software which is informative and nice to look at. The documentation
should be easy to write and non-obtrusive within the code. While it will never
be as feature-rich as Doxygen, hopefully FORD will be able to provide a good
alternative for documenting Fortran projects.

fas: fed500

Reproducible: Always

Comment 1 Fedora Review Service 2023-10-11 19:42:21 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/6517599
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2243337-ford/fedora-rawhide-x86_64/06517599-ford/fedora-review/review.txt

Please take a look if any issues were found.

---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 2 mmassari 2023-10-13 07:44:28 UTC
Hi,

this is my first review and I hope I will not suggest you something wrong (I also asked for an help to Nikola Forro who I thank).

a) Here below my suggestions for the rpmlint complains

```
ford.noarch: E: zero-length /usr/lib/python3.12/site-packages/ford/js/MathJax-config/.gitignore
ford.noarch: E: version-control-internal-file /usr/lib/python3.12/site-packages/ford/js/MathJax-config/.gitignore
```

in prep section, ford/js/MathJax-config directory has to be removed
---
```
ford.noarch: E: non-executable-script /usr/lib/python3.12/site-packages/ford/__init__.py 644 /usr/bin/env python
ford.noarch: E: non-executable-script /usr/lib/python3.12/site-packages/ford/fixed2free2.py 644 /usr/bin/python
ford.noarch: E: non-executable-script /usr/lib/python3.12/site-packages/ford/reader.py 644 /usr/bin/env python
```

I think that __init__py and reader.py probably do not need a shebang:
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_shebang_lines
https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_shebangs

fixed2free2.py is a script but it is not installed in /usr/bin, you should probably decide if remove the shebang or install it in /usr/bin.
---
```
ford.noarch: W: no-documentation
```

I would set `%doc README.md` after %files.
---
```
ford.noarch: W: hidden-file-or-dir /usr/lib/python3.12/site-packages/ford/tipuesearch/.DS_Store
ford.noarch: W: hidden-file-or-dir /usr/lib/python3.12/site-packages/ford/tipuesearch/img/.DS_Store
```

in prep section, ford/tipuesearch/img/.DS_Store directory has to be removed
---
```
ford.spec: W: invalid-url Source0: ford.tar.gz
```

I would use:

URL:            https://pypi.org/project/FORD/
Source0:        %{pypi_source FORD}
[...]
%autosetup -n FORD-%{version}

in this way you can also remove:

%global         SETUPTOOLS_SCM_PRETEND_VERSION %{version}
---
```
ford.spec:53: W: macro-in-comment %{version}
ford.spec:63: W: macro-in-comment %{version}
ford.spec:64: W: macro-in-comment %{version}
ford.spec:65: W: macro-in-comment %{version}
```
I would remove the comments.
---

b) The package is failing building under f37, I don't know if you want to release it for Fedora 37

c) You do not need to specify `BuildRequires:  python3dist(pytest)` if you use `%pyproject_buildrequires -x tests`


---
Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
[ ] = Manual review needed



===== 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.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated", "*No copyright* GNU General Public
     License v3.0 or later", "*No copyright* GNU General Public License,
     Version 3", "GNU General Public License v3.0 or later", "GNU General
     Public License v2.0 or later", "GNU Affero General Public License v3.0
     or later", "MIT License", "Creative Commons Attribution 3.0". 123
     files have unknown license. Detailed output of licensecheck in
     /tmp/2243337-ford/licensecheck.txt
[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.
[ ]: Package does not generate any conflict.
[ ]: 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.
[-]: 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 must own all directories that it creates.
[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 0 bytes in 0 files.
[x]: Packages must not store files under /srv, /opt or /usr/local

Python:
[-]: Binary eggs must be removed in %prep
     Note: Cannot find any build in BUILD directory (--prebuilt option?)
[-]: Python eggs must not download any dependencies during the build
     process.
[X]: A package which is used by another package via an egg interface should
     provide egg info.
[ ]: 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

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

Generic:
[-]: Avoid bundling fonts in non-fonts packages.
     Note: Package contains font files
[-]: 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).
[ ]: Package functions as described.
[X]: Latest version is packaged.
[X]: Package does not include license text files separate from upstream.
[!]: SourceX tarball generation or download is documented.
     Note: Package contains tarball without URL, check comments
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[!]: 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]: 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.
     Note: There are rpmlint messages (see attachment).
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: ford-6.2.5-1.fc40.noarch.rpm
          ford-6.2.5-1.fc40.src.rpm
======================================================= rpmlint session starts ======================================================
rpmlint: 2.4.0
configuration:
    /usr/lib/python3.11/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-legacy-licenses.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
rpmlintrc: [PosixPath('/tmp/tmpm8egjcey')]
checks: 31, packages: 2

ford.noarch: E: zero-length /usr/lib/python3.12/site-packages/ford/js/MathJax-config/.gitignore
ford.noarch: E: version-control-internal-file /usr/lib/python3.12/site-packages/ford/js/MathJax-config/.gitignore
ford.noarch: E: non-executable-script /usr/lib/python3.12/site-packages/ford/__init__.py 644 /usr/bin/env python
ford.noarch: E: non-executable-script /usr/lib/python3.12/site-packages/ford/fixed2free2.py 644 /usr/bin/python
ford.noarch: E: non-executable-script /usr/lib/python3.12/site-packages/ford/reader.py 644 /usr/bin/env python
ford.noarch: W: no-manual-page-for-binary ford
ford.noarch: W: no-documentation
ford.spec:53: W: macro-in-comment %{version}
ford.spec:63: W: macro-in-comment %{version}
ford.spec:64: W: macro-in-comment %{version}
ford.spec:65: W: macro-in-comment %{version}
ford.spec: W: invalid-url Source0: ford.tar.gz
ford.noarch: W: hidden-file-or-dir /usr/lib/python3.12/site-packages/ford/tipuesearch/.DS_Store
ford.noarch: W: hidden-file-or-dir /usr/lib/python3.12/site-packages/ford/tipuesearch/img/.DS_Store
======================== 2 packages and 0 specfiles checked; 5 errors, 9 warnings, 5 badness; has taken 0.5 s =======================




Rpmlint (installed packages)
----------------------------
============================ rpmlint session starts ============================
rpmlint: 2.4.0
configuration:
    /usr/lib/python3.12/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-legacy-licenses.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: 31, packages: 1

ford.noarch: E: zero-length /usr/lib/python3.12/site-packages/ford/js/MathJax-config/.gitignore
ford.noarch: E: version-control-internal-file /usr/lib/python3.12/site-packages/ford/js/MathJax-config/.gitignore
ford.noarch: E: non-executable-script /usr/lib/python3.12/site-packages/ford/__init__.py 644 /usr/bin/env python
ford.noarch: E: non-executable-script /usr/lib/python3.12/site-packages/ford/fixed2free2.py 644 /usr/bin/python
ford.noarch: E: non-executable-script /usr/lib/python3.12/site-packages/ford/reader.py 644 /usr/bin/env python
ford.noarch: W: no-manual-page-for-binary ford
ford.noarch: W: no-documentation
ford.noarch: W: hidden-file-or-dir /usr/lib/python3.12/site-packages/ford/tipuesearch/.DS_Store
ford.noarch: W: hidden-file-or-dir /usr/lib/python3.12/site-packages/ford/tipuesearch/img/.DS_Store
 1 packages and 0 specfiles checked; 5 errors, 4 warnings, 5 badness; has taken 0.0 s 



Requires
--------
ford (rpmlib, GLIBC filtered):
    /usr/bin/python3
    python(abi)
    python3.12dist(beautifulsoup4)
    python3.12dist(graphviz)
    python3.12dist(jinja2)
    python3.12dist(markdown)
    python3.12dist(markdown-include)
    python3.12dist(pygments)
    python3.12dist(python-markdown-math)
    python3.12dist(toposort)
    python3.12dist(tqdm)



Provides
--------
ford:
    ford
    python3.12dist(ford)
    python3dist(ford)



Generated by fedora-review 0.10.0 (e79b66b) last change: 2023-07-24
Command line :/usr/bin/fedora-review -b 2243337
Buildroot used: fedora-rawhide-x86_64
Active plugins: Generic, Python, Shell-api
Disabled plugins: fonts, Perl, Java, Haskell, Ocaml, SugarActivity, C/C++, PHP, R
Disabled flags: EXARCH, EPEL6, EPEL7, DISTTAG, BATCH

Comment 3 Benson Muite 2023-10-13 18:05:10 UTC
Thanks. Updated:

spec: https://download.copr.fedorainfracloud.org/results/fed500/ford/fedora-rawhide-x86_64/06524064-ford/ford.spec
srpm: https://download.copr.fedorainfracloud.org/results/fed500/ford/fedora-rawhide-x86_64/06524064-ford/ford-6.2.5-1.fc40.src.rpm

Examining python files with shebang errors. There are bundled fonts, css and javascript files.
This seems common to html documentation generation systems.  Want to see if can
modify to use what is packaged in Fedora and avoid bundling. Can ping you once figured out
what to do for these.

Comment 4 Fedora Review Service 2023-10-13 18:18:39 UTC
Created attachment 1993783 [details]
The .spec file difference from Copr build 6517599 to 6524124

Comment 5 Fedora Review Service 2023-10-13 18:18:41 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/6524124
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2243337-ford/fedora-rawhide-x86_64/06524124-ford/fedora-review/review.txt

Please take a look if any issues were found.

---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 6 mmassari 2023-11-03 15:00:00 UTC
Hi,
are you waiting for my review?
If I got it correctly, you will ping me when you have found a solution for the shebangs, right? I just wanted to double check that I got it correctly.

Maja

Comment 7 Benson Muite 2023-11-04 15:28:36 UTC
It will take a bit longer.

Updated:
spec: https://download.copr.fedorainfracloud.org/results/fed500/ford/fedora-rawhide-x86_64/06598080-ford/ford.spec
srpm: https://download.copr.fedorainfracloud.org/results/fed500/ford/fedora-rawhide-x86_64/06598080-ford/ford-7.0.2-1.fc40.src.rpm

For fixed2free2.py checking whether this can be packaged separately:
https://github.com/Fortran-FOSS-Programmers/ford/issues/585

Raised several issues upstream about bundled javascript files:
https://github.com/Fortran-FOSS-Programmers/ford/issues/586
https://github.com/Fortran-FOSS-Programmers/ford/issues/587

Would like to unbundle these.  There are also bundled fonts, 
Fontawesome https://packages.fedoraproject.org/pkgs/fontawesome-fonts/fontawesome-fonts
glyphicons-halflings https://packages.fedoraproject.org/pkgs/glyphicons-halflings-fonts/glyphicons-halflings-fonts

glyphicons-halflings needs update to get the woff and eot fonts for web use, similar to fontawesome.

Comment 8 Fedora Review Service 2023-11-05 03:15:56 UTC
Created attachment 1997175 [details]
The .spec file difference from Copr build 6524124 to 6599201

Comment 9 Fedora Review Service 2023-11-05 03:15:59 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/6599201
(failed)

Build log:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2243337-ford/fedora-rawhide-x86_64/06599201-ford/builder-live.log.gz

Please make sure the package builds successfully at least for Fedora Rawhide.

- If the build failed for unrelated reasons (e.g. temporary network
  unavailability), please ignore it.
- If the build failed because of missing BuildRequires, please make sure they
  are listed in the "Depends On" field


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 10 mmassari 2023-11-06 14:15:28 UTC
Thank you for the update and all this work!
I will wait for the review your ping.

Have a nice day,

Maja


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