Bug 1395396 - Review Request: python-sphinx-gallery - Sphinx extension to automatically generate an examples gallery
Summary: Review Request: python-sphinx-gallery - Sphinx extension to automatically gen...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Athos Ribeiro
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-15 21:54 UTC by Orion Poplawski
Modified: 2016-11-23 04:13 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-23 04:13:52 UTC
Type: Bug
Embargoed:
athoscribeiro: fedora-review+


Attachments (Terms of Use)

Description Orion Poplawski 2016-11-15 21:54:45 UTC
Spec URL: https://www.cora.nwra.com/~orion/fedora/python-sphinx-gallery.spec
SRPM URL: https://www.cora.nwra.com/~orion/fedora/python-sphinx-gallery-0.1.5-1.fc26.src.rpm
Description:
A Sphinx extension that builds an HTML version of any Python script and puts
it into an examples gallery.

Fedora Account System Username: orion

http://koji.fedoraproject.org/koji/taskinfo?taskID=16466702

Comment 1 Athos Ribeiro 2016-11-19 18:22:13 UTC
License: BSD licenses require the full license text to be shipped with the package. You should ask upstream to prepare a new version of the package with the license text. Note that the github repository has a LICENSE file, which is not shipped with the pypi package (This is a blocker).

You set PKG-INFO as the license file, but that is not the license text.

Requires: There is a import on matplotlib in one of the modules (gen_rst.py). Why isn't it listed as a requirement?

Also, this is a sphinx extension, what are your thoughts on requiring sphinx here?

Package Review
==============

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

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

Generic:
[!]: 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.
[!]: License file installed when any subpackage combination is installed.
[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.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 20480 bytes in 2 files.
[!]: 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: No rpmlint messages.
[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]: 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]: All build dependencies are listed in BuildRequires, except for any
     that are listed in the exceptions section of Packaging Guidelines.
[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 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]: Packages must not store files under /srv, /opt or /usr/local

Python:
[x]: 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.
[x]: Package meets the Packaging Guidelines::Python
[x]: Package contains BR: python2-devel or python3-devel
[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]: Fully versioned dependency in subpackages if applicable.
[ ]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[x]: %check is present and all tests pass.
[x]: 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.
     Note: No rpmlint messages.
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: python2-sphinx-gallery-0.1.5-1.fc26.noarch.rpm
          python3-sphinx-gallery-0.1.5-1.fc26.noarch.rpm
          python-sphinx-gallery-0.1.5-1.fc26.src.rpm
3 packages and 0 specfiles checked; 0 errors, 0 warnings.




Rpmlint (installed packages)
----------------------------
2 packages and 0 specfiles checked; 0 errors, 0 warnings.



Requires
--------
python2-sphinx-gallery (rpmlib, GLIBC filtered):
    python(abi)

python3-sphinx-gallery (rpmlib, GLIBC filtered):
    python(abi)



Provides
--------
python2-sphinx-gallery:
    python-sphinx-gallery
    python2-sphinx-gallery
    python2.7dist(sphinx-gallery)
    python2dist(sphinx-gallery)

python3-sphinx-gallery:
    python3-sphinx-gallery
    python3.5dist(sphinx-gallery)
    python3dist(sphinx-gallery)



Source checksums
----------------
https://files.pythonhosted.org/packages/source/s/sphinx-gallery/sphinx-gallery-0.1.5.tar.gz :
  CHECKSUM(SHA256) this package     : 7a55a3f13aaa40d4454e5b54efc657d3572de703e1272c7ebf0a64021ba35874
  CHECKSUM(SHA256) upstream package : 7a55a3f13aaa40d4454e5b54efc657d3572de703e1272c7ebf0a64021ba35874

Comment 2 Orion Poplawski 2016-11-19 22:56:55 UTC
Spec URL: https://www.cora.nwra.com/~orion/fedora/python-sphinx-gallery.spec
SRPM URL: https://www.cora.nwra.com/~orion/fedora/python-sphinx-gallery-0.1.5-2.fc26.src.rpm

* Sat Nov 19 2016 Orion Poplawski <orion.com> - 0.1.5-2
- Use github source, ship LICENSE
- Update URL
- Add needed requires

Good catch on all counts.  I went for adding a sphinx requirement as it does not seem useful without it, although it doesn't appear to directly import anything from it.  It is listed in requirements.txt.

But now I'm getting some test failures:

+ nosetests-2.7
/usr/lib64/python2.7/site-packages/matplotlib/font_manager.py:279: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
  warnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.')
.........../builddir/build/BUILD/sphinx-gallery-0.1.5/sphinx_gallery/gen_rst.py:538: UserWarning: ________________________________________________________________________________
/tmp/tmp1xCZ4j/raise.py failed to execute correctly:Traceback (most recent call last):
  File "/builddir/build/BUILD/sphinx-gallery-0.1.5/sphinx_gallery/gen_rst.py", line 518, in execute_code_block
    exec(code_block, example_globals)
  File "<string>", line 1, in <module>
NameError: name 'First_test_fail' is not defined
________________________________________________________________________________

  warnings.warn(fail_example_warning)


+ nosetests-3.5
/usr/lib64/python3.5/site-packages/matplotlib/font_manager.py:279: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
  warnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.')
/usr/lib64/python3.5/site-packages/matplotlib/font_manager.py:279: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
  warnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.')
...........EE..S...
======================================================================
ERROR: Test that failing examples are only executed until failing block
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILD/sphinx-gallery-0.1.5/sphinx_gallery/tests/test_gen_rst.py", line 159, in test_fail_example
    gallery_conf['examples_dir'], gallery_conf)
  File "/builddir/build/BUILD/sphinx-gallery-0.1.5/sphinx_gallery/gen_rst.py", line 599, in generate_file_rst
    if md5sum_is_current(example_file):
  File "/builddir/build/BUILD/sphinx-gallery-0.1.5/sphinx_gallery/gen_rst.py", line 290, in md5sum_is_current
    src_md5 = get_md5sum(src_file)
  File "/builddir/build/BUILD/sphinx-gallery-0.1.5/sphinx_gallery/gen_rst.py", line 277, in get_md5sum
    src_content = src_data.read()
  File "/usr/lib64/python3.5/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 99: ordinal not in range(128)

======================================================================
ERROR: Test if only examples matching pattern are executed
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILD/sphinx-gallery-0.1.5/sphinx_gallery/tests/test_gen_rst.py", line 192, in test_pattern_matching
    gallery_conf['examples_dir'], gallery_conf)
  File "/builddir/build/BUILD/sphinx-gallery-0.1.5/sphinx_gallery/gen_rst.py", line 599, in generate_file_rst
    if md5sum_is_current(example_file):
  File "/builddir/build/BUILD/sphinx-gallery-0.1.5/sphinx_gallery/gen_rst.py", line 290, in md5sum_is_current
    src_md5 = get_md5sum(src_file)
  File "/builddir/build/BUILD/sphinx-gallery-0.1.5/sphinx_gallery/gen_rst.py", line 277, in get_md5sum
    src_content = src_data.read()
  File "/usr/lib64/python3.5/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 99: ordinal not in range(128)

Comment 3 Orion Poplawski 2016-11-21 20:28:06 UTC
Spec URL: https://www.cora.nwra.com/~orion/fedora/python-sphinx-gallery.spec
SRPM URL: https://www.cora.nwra.com/~orion/fedora/python-sphinx-gallery-0.1.5-1.fc26.src.rpm

* Mon Nov 21 2016 Orion Poplawski <orion.com> - 0.1.5-3
- Add upstream patch to fix UnicodeDecodeError

Comment 4 Athos Ribeiro 2016-11-22 15:07:10 UTC
The SRPM URL points to release 1, but the SPEC file uses release 3, could you provide the link for 0.1.5-3?

Comment 5 Orion Poplawski 2016-11-22 16:01:30 UTC
Shouldn't be too hard to figure out :)

SRPM URL: https://www.cora.nwra.com/~orion/fedora/python-sphinx-gallery-0.1.5-3.fc26.src.rpm

Comment 6 Athos Ribeiro 2016-11-22 18:15:46 UTC
(In reply to Orion Poplawski from comment #5)
> Shouldn't be too hard to figure out :)
> 
> SRPM URL:
> https://www.cora.nwra.com/~orion/fedora/python-sphinx-gallery-0.1.5-3.fc26.
> src.rpm

I was getting a 404 on that link before...

There's still one error when executing tests:

/tmp/tmp1g4aadqb/raise.py failed to execute correctly:Traceback (most recent call last):
  File "/builddir/build/BUILD/sphinx-gallery-0.1.5/sphinx_gallery/gen_rst.py", line 514, in execute_code_block
    exec(code_block, example_globals)
  File "<string>", line 1, in <module>
NameError: name 'First_test_fail' is not defined

But tests are passing.

The pointed issues were solved, package looks good to me. Approved

Comment 7 Gwyn Ciesla 2016-11-22 18:45:34 UTC
Package request has been approved: https://admin.fedoraproject.org/pkgdb/package/rpms/python-sphinx_gallery

Comment 8 Gwyn Ciesla 2016-11-22 23:03:36 UTC
Package request has been approved: https://admin.fedoraproject.org/pkgdb/package/rpms/python-sphinx-gallery

Comment 9 Orion Poplawski 2016-11-23 04:13:52 UTC
Checked in and built


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