Bug 1388396 - Review Request: python-pynlpl - A Python library for Natural Language Processing
Summary: Review Request: python-pynlpl - A Python library for Natural Language Processing
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Dominika Krejčí
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-25 08:55 UTC by Iryna Shcherbina
Modified: 2016-12-16 00:25 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-15 23:29:40 UTC
Type: ---
Embargoed:
dkrejci: fedora-review+


Attachments (Terms of Use)

Description Iryna Shcherbina 2016-10-25 08:55:19 UTC
Spec URL: https://github.com/irushchyshyn/rpm_package/blob/master/python-pynlpl.spec
SRPM URL: https://github.com/irushchyshyn/rpm_package/blob/master/python-pynlpl-1.0.9-1.fc24.src.rpm
Description: PyNLPl, pronounced as ‘pineapple’, is a Python library for Natural Language Processing. It contains various modules useful for common, and less common, NLP tasks. PyNLPl can be used for basic tasks such as the extraction of n-grams and frequency lists, and to build simple language model. There are
also more complex data types and algorithms. Moreover, there are parsers for file formats common in NLP (e.g. FoLiA/Giza/Moses/ARPA/Timbl/CQL). There are
also clients to interface with various NLP specific servers. PyNLPl most notably features a very extensive library for working with FoLiA XML (Format
for Linguistic Annotation).
Fedora Account System Username: ishcherb

Koji URL: http://koji.fedoraproject.org/koji/taskinfo?taskID=16193827
PyPI URL: https://pypi.python.org/pypi/PyNLPl/
GitHub URL: https://github.com/proycon/pynlpl

This is my first package, and I am seeking a sponsor.

Comment 1 Miro Hrončok 2016-10-25 09:06:53 UTC
Please always include link to the files themselves. On GitHub, that's the "Raw" button. Some automated tools will attempt to download the HTML page instead.

Comment 3 Dominika Krejčí 2016-10-26 14:56:25 UTC
Hi Iryna, there are my comments:

* [!]: Requires correct, justified where necessary.
Please be more specific in (Build)Requires and put python2-* instead of just python- wherever it is possible.
Add python-numpy, it is listed in requires.txt in upstream.

* Current Source0 creates folder named "v1.0.9.tar.gz", it should be rather "pynlpl-1.0.9.tar.gz" (add #/%{pkg_name}-%{version}.tar.gz to the current URL) ;)

* [!]: License file installed when any subpackage combination is installed.
Please add license to python-pynlpl-doc package.

* You can use macro %{summary}, which will contain content of the Summary tag (it's generated automatically, you do not have to define it). Just keep the first Summary tag as it is and in python2/3- subpackages you can use `Summary:   %{summary}`.


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

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

===== 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.
[!]: 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.
[!]: 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]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
[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]: 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).
[-]: 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.
[?]: %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: There are rpmlint messages (see attachment).
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: python2-pynlpl-1.0.9-1.fc26.noarch.rpm
          python3-pynlpl-1.0.9-1.fc26.noarch.rpm
          python-pynlpl-doc-1.0.9-1.fc26.noarch.rpm
          python-pynlpl-1.0.9-1.fc26.src.rpm
python2-pynlpl.noarch: W: spelling-error %description -l en_US parsers -> parser, parses, parers
python3-pynlpl.noarch: W: spelling-error %description -l en_US parsers -> parser, parses, parers
python3-pynlpl.noarch: W: no-manual-page-for-binary pynlpl-computepmi-3.5
python3-pynlpl.noarch: W: no-manual-page-for-binary pynlpl-computepmi-3
python3-pynlpl.noarch: W: no-manual-page-for-binary pynlpl-sampler-3
python3-pynlpl.noarch: W: no-manual-page-for-binary pynlpl-sampler-3.5
python3-pynlpl.noarch: W: no-manual-page-for-binary pynlpl-makefreqlist-3.5
python3-pynlpl.noarch: W: no-manual-page-for-binary pynlpl-makefreqlist-3
python-pynlpl.src: W: spelling-error %description -l en_US parsers -> parser, parses, parers
4 packages and 0 specfiles checked; 0 errors, 9 warnings.




Rpmlint (installed packages)
----------------------------
python2-pynlpl.noarch: W: spelling-error %description -l en_US parsers -> parser, parses, parers
python3-pynlpl.noarch: W: spelling-error %description -l en_US parsers -> parser, parses, parers
python3-pynlpl.noarch: W: no-manual-page-for-binary pynlpl-computepmi-3.5
python3-pynlpl.noarch: W: no-manual-page-for-binary pynlpl-makefreqlist-3
python3-pynlpl.noarch: W: no-manual-page-for-binary pynlpl-sampler-3.5
python3-pynlpl.noarch: W: no-manual-page-for-binary pynlpl-computepmi-3
python3-pynlpl.noarch: W: no-manual-page-for-binary pynlpl-sampler-3
python3-pynlpl.noarch: W: no-manual-page-for-binary pynlpl-makefreqlist-3.5
3 packages and 0 specfiles checked; 0 errors, 8 warnings.



Requires
--------
python2-pynlpl (rpmlib, GLIBC filtered):
    /bin/bash
    python(abi)
    python-httplib2
    python-lxml
    python-setuptools

python-pynlpl-doc (rpmlib, GLIBC filtered):

python3-pynlpl (rpmlib, GLIBC filtered):
    /bin/bash
    /usr/bin/python3
    python(abi)
    python3-httplib2
    python3-lxml
    python3-setuptools



Provides
--------
python2-pynlpl:
    python-pynlpl
    python2-pynlpl
    python2.7dist(pynlpl)
    python2dist(pynlpl)

python-pynlpl-doc:
    python-pynlpl-doc

python3-pynlpl:
    python3-pynlpl
    python3.5dist(pynlpl)
    python3dist(pynlpl)



Source checksums
----------------
https://github.com/proycon/pynlpl/archive/v1.0.9.tar.gz :
  CHECKSUM(SHA256) this package     : 9df7cc8679c085747047be129f9da978aa2a432f60602480a0ffdd7e35d26921
  CHECKSUM(SHA256) upstream package : 9df7cc8679c085747047be129f9da978aa2a432f60602480a0ffdd7e35d26921


Generated by fedora-review 0.6.1 (f03e4e7) last change: 2016-05-02
Command line :/usr/bin/fedora-review -b 1388396
Buildroot used: fedora-rawhide-x86_64
Active plugins: Python, Generic, Shell-api
Disabled plugins: Java, C/C++, fonts, SugarActivity, Ocaml, Perl, Haskell, R, PHP
Disabled flags: EXARCH, DISTTAG, EPEL5, BATCH, EPEL6

Comment 4 Miro Hrončok 2016-10-26 22:08:43 UTC
You can use 

    %package doc

Instead of

    %package -n python-%{pkg_name}-doc

---------------

The docs generation tracebacks a lot, have a look at that and investigate please.

---------------

The docs would be better generated with python 3 to show our love of Python 3, however, if that would be too complicated, just keep it as is.

---------------

The links in /usr/bin should normally follow this pastern:

less specific -> more specific

I.e. the other way around than:

    /usr/bin/pynlpl-computepmi-3
    /usr/bin/pynlpl-computepmi-3.5 -> /usr/bin/pynlpl-computepmi-3
    /usr/bin/pynlpl-makefreqlist-3
    /usr/bin/pynlpl-makefreqlist-3.5 -> /usr/bin/pynlpl-makefreqlist-3
    /usr/bin/pynlpl-sampler-3
    /usr/bin/pynlpl-sampler-3.5 -> /usr/bin/pynlpl-sampler-3

Also, in this case I would say just omit the Python version at all, as the version thing is there just to distinguish between the Python 2 and Python 3 executables and here the executables are only in Python 3 subpackage.

---------------

I was quite curious, how it is possible that after %py3_install there is stuff in /usr/bin to move around and after %py2_install, there is none. So I've looked at the sources and it's explicitly only allowed on Python 3, so it works as expected. I recommend adding a comment after %py2_install, something like:

    # the executables are only installed on python 3 (by statement in setup.py)

Comment 5 Iryna Shcherbina 2016-10-31 13:40:01 UTC
Hey Dominika and Miro,

thank you for the review and very useful comments.

@Dominika

* [!]: Requires correct, justified where necessary.
Added a missing dependency, and specified the python version where possible.

* [!]: License file installed when any subpackage combination is installed.
Added license to python-pynlpl-doc package.

* Current Source0 creates folder named "v1.0.9.tar.gz", it should be rather "pynlpl-1.0.9.tar.gz"
Changed.

* Used %{summary} macro.

All above changes to the scpec file are available in the following commit:
https://github.com/irushchyshyn/rpm_package/commit/4fbbf0e65e74aa5f787092bc25c855fb0b0f299a

@Miro

* Removed not needed package renaming.
* Use Python 3 for docs generation.
* Removed Python version from Python 3 executables.

The changes are available in the following commit:
https://github.com/irushchyshyn/rpm_package/commit/2431c712af57d0b55a7049b2833712c7fc183ff5


---------------

The docs generation tracebacks a lot, have a look at that and investigate please.

Created an issue for upstream, to track the warnings and tracebacks:
https://github.com/proycon/pynlpl/issues/23
Also created PRs to fix the tracebacks which were merged, so with the next release it will be fixed.

New koji build: http://koji.fedoraproject.org/koji/taskinfo?taskID=16259888

Comment 6 Miro Hrončok 2016-11-01 11:29:42 UTC
I suggested one cosmetic change on GitHub inline comment. Other that that, the package seems good to me, although I did not try to use it / run it.

The final word would have Dominkina, as she raised the review flag, not me.

Excellent work with upstream.

I'd gladly sponsor you, if you also do some reviews. There are plenty Python related open reviews here: https://fedoraproject.org/wiki/SIGs/Python#Review_Python_packages - please indicate in the review that you are not yet sponsored and thus cannot approve the package yet, but that you can do it once sponsored. Don't forget to add me to CC in that bug.

Don't hesitate to contact me or others on #fedora-python IRC channel with questions.

Comment 7 Dominika Krejčí 2016-11-02 14:06:56 UTC
Great Iryna! :)

PACKAGE APPROVED.

Comment 8 Miro Hrončok 2016-11-02 14:23:05 UTC
@iryna You will not be able to create the package in pkgdb before you get sponsored.

Comment 9 Iryna Shcherbina 2016-11-02 14:58:42 UTC
@Miro Thanks for pointing this out.

I have done a review for the following packages, and am planning to do more.
https://bugzilla.redhat.com/show_bug.cgi?id=1383416
https://bugzilla.redhat.com/show_bug.cgi?id=1372836

@Miro, @Dominika Thank you for approving my package, and looking forward to getting sponsored :)

Comment 10 Miro Hrončok 2016-11-22 16:41:29 UTC
Sponsored. Good luck.

Comment 11 Gwyn Ciesla 2016-11-22 18:43:47 UTC
Package request has been approved: https://admin.fedoraproject.org/pkgdb/package/rpms/python-pynlpl

Comment 12 Fedora Update System 2016-11-22 23:03:12 UTC
python-pynlpl-1.0.9-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-c75647fa6a

Comment 13 Fedora Update System 2016-11-25 09:40:57 UTC
python-pynlpl-1.0.9-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-c75647fa6a

Comment 14 Fedora Update System 2016-12-15 23:29:40 UTC
python-pynlpl-1.0.9-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 15 Fedora Update System 2016-12-16 00:25:03 UTC
python-pynlpl-1.0.9-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.


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