Bug 722249 (python-hl7) - Review Request: python-hl7 - Python library parsing HL7 v2.x messages
Summary: Review Request: python-hl7 - Python library parsing HL7 v2.x messages
Keywords:
Status: CLOSED ERRATA
Alias: python-hl7
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Brendan Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: fedora-medical
TreeView+ depends on / blocked
 
Reported: 2011-07-14 18:16 UTC by Ankur Sinha (FranciscoD)
Modified: 2011-08-12 18:21 UTC (History)
3 users (show)

Fixed In Version: python-hl7-0.2.0-2.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-25 14:55:34 UTC
Type: ---
Embargoed:
brendan.jones.it: fedora-review+
gwync: fedora-cvs+


Attachments (Terms of Use)

Description Ankur Sinha (FranciscoD) 2011-07-14 18:16:00 UTC
Spec URL: http://ankursinha.fedorapeople.org/hl7/python-hl7.spec
SRPM URL: http://ankursinha.fedorapeople.org/hl7/python-hl7-0.1.1_xml.4-0.1.20110714git97ddbe9.fc15.src.rpm

Description: 
python-hl7 is a simple library for parsing messages of Health Level 7 (HL7) 
v2.x and v3.x into Python objects.

Some documentation for an older version can be seen 
at http://python-hl7.readthedocs.org/en/latest/

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

[ankur@ankur SRPMS]$ rpmlint ../SPECS/python-hl7.spec python-hl7-0.1.1_xml.4-0.1.20110714git97ddbe9.fc15.src.rpm /var/lib/mock/fedora-rawhide-i386/result/*.rpm
../SPECS/python-hl7.spec: W: invalid-url Source0: python-hl7-20110714.tar.gz
python-hl7.src: W: invalid-url Source0: python-hl7-20110714.tar.gz
python-hl7.src: W: invalid-url Source0: python-hl7-20110714.tar.gz
3 packages and 1 specfiles checked; 0 errors, 3 warnings.

Comment 1 Brendan Jones 2011-07-15 15:07:13 UTC
Hi, 

just a few things on first look that need addressing before I go any further.

The header of setup.py states that there should be a file COPYING containing the license. I can't see this in the package. 

Moreover, it is unclear what the HL7 specification files are referenced under. The reference/README.txt states 'This data comes from http://www.mirthcorp.com/svn' - which is a broken link. You should also consider moving these files to a separate package - if they can be validly used, the specs would be useful outside this package.

Also, the removal of \r from these documents may be better suited to a patch. The output of your loop is very noisy.

regards,

Brendan

Comment 2 Ankur Sinha (FranciscoD) 2011-07-15 15:29:30 UTC
Hello,

(In reply to comment #1)
> Hi, 
> 
> just a few things on first look that need addressing before I go any further.
> 
> The header of setup.py states that there should be a file COPYING containing
> the license. I can't see this in the package. 

I'll add it.

> 
> Moreover, it is unclear what the HL7 specification files are referenced under.
> The reference/README.txt states 'This data comes from
> http://www.mirthcorp.com/svn' - which is a broken link. You should also
> consider moving these files to a separate package - if they can be validly
> used, the specs would be useful outside this package.

I found them here:

http://www.mirthcorp.com/community/fisheye/browse/~br=tag%3A2.1.1/Mirth/trunk/generator/reference

Would you want me to split them into a subpackage, or should I package them separately as a different package all together?

> 
> Also, the removal of \r from these documents may be better suited to a patch.
> The output of your loop is very noisy.

Sure, I'll create one and add it.

> 
> regards,
> 
> Brendan

Thanks, I'll have the spec up in a few hours. 

Ankur

Comment 3 Brendan Jones 2011-07-15 16:50:24 UTC
Hi again

Where did you get the COPYING file ?

I am really quite confused by this package. The spec file points to a project home page which is just a git repository. I could not find any details of the project which indicate it as being a continuation or a fork of the project cited above (http://python-hl7.readthedocs.org/en/latest/) apart from a copyright notice included in the header of setup.py

The HL7 specs have been pulled in by from a third repository some of which seems to be released under Mozilla Public license 1.1 and probably constitutes a separate project in itself.

Can you please clarify with upstream and ask them to provide the correct license? 

This is from setup.py:

#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2009 John Paulett (john -at- 7oars.com)
# Copyright (C) 2010 Luke Kenneth Casson Leighton <lkcl>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.

Comment 4 Ankur Sinha (FranciscoD) 2011-07-15 19:27:21 UTC
Already in conversation with them. I'll keep the ticket updated.

Comment 5 Ankur Sinha (FranciscoD) 2011-07-17 13:34:39 UTC
Upstream suggested I use the 0.2.0 version which supports HL7 2.x versions. They're doing a merge soon, and I shall update when this happens.

http://ankursinha.fedorapeople.org/hl7/python-hl7-0.2.0-1.fc15.src.rpm

http://ankursinha.fedorapeople.org/hl7/python-hl7.spec

Thanks,
Ankur

Comment 6 Brendan Jones 2011-07-21 09:53:46 UTC
Hi Ankur,

I've a few things that need addressing:

* Missing %if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
http://fedoraproject.org/wiki/Packaging:Python#Macros

 * Description is longer than 80 characters, and you can probably remove the link as it is not relevant in this section.

* Your BuildRequires section should be:
BuildRequires: python2-devel
BuildRequires: python-setuptools-devel

* %defattr required in %files section.

* Missing %doc where you need to include LICENSE, README.rst etc.

I noticed that SOURCES.txt and the MANIFEST  list docs/* and tests/* which are not included in your package - I'm not sure if they were meant to be.

Also, the source included in the SRPM does not match the source URL listed in the spec file. It looks to me to be a later version obtained from the git repository? If so, you need to update the the version and add comments indicating how you obtained it.

cheers,

Brendan

Comment 7 Brendan Jones 2011-07-21 16:31:16 UTC
(In reply to comment #6)
> Also, the source included in the SRPM does not match the source URL listed in
> the spec file. It looks to me to be a later version obtained from the git
> repository? If so, you need to update the the version and add comments
> indicating how you obtained it.
> 
Ignore this last bit - they are the same - my mistake. 

Cheers,

Brendan

Comment 8 Ankur Sinha (FranciscoD) 2011-07-21 18:07:13 UTC
(In reply to comment #6)
> Hi Ankur,
> 
> I've a few things that need addressing:
> 
> * Missing %if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
> http://fedoraproject.org/wiki/Packaging:Python#Macros

The if condition isn't required any more, since we are always going to be building for f>12 ;)

> 
>  * Description is longer than 80 characters, and you can probably remove the
> link as it is not relevant in this section.

Corrected. 

> 
> * Your BuildRequires section should be:
> BuildRequires: python2-devel
> BuildRequires: python-setuptools-devel

I created this spec using rpmdev-newspec -t python, which provides a skeleton spec file for python packages. Not sure why the difference. 

repoquery -i python2-devel doesn't return me anything. I'm letting this be for the time being.

> 
> * %defattr required in %files section.

It isn't after rpm 4.4
https://fedoraproject.org/wiki/Packaging/Guidelines#File_Permissions

> 
> * Missing %doc where you need to include LICENSE, README.rst etc.
> 
> I noticed that SOURCES.txt and the MANIFEST  list docs/* and tests/* which are
> not included in your package - I'm not sure if they were meant to be.
> 

Corrected. I haven't included tests, they're not for users, more for upstream IMO.

> 
> cheers,
> 
> Brendan

Fresh spec/srpm:
http://ankursinha.fedorapeople.org/hl7/python-hl7.spec

http://ankursinha.fedorapeople.org/hl7/python-hl7-0.2.0-2.fc15.src.rpm

* Thu Jul 21 2011 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.2.0-2
- Correct description
- Make additional docs


Thanks,
Ankur

Comment 9 Brendan Jones 2011-07-22 23:40:15 UTC
+ OK
- N/A
! Problem
? Not evaluated

Required
========

[+] named according to the Package Naming Guidelines 
[+] The spec file name must match the base package %{name}, in the format
%{name}.spec 
[+] Meet the Packaging Guidelines
[+] Be licensed with a Fedora approved license and meet the Licensing
Guidelines 
[+] The License field in the package spec file must match the actual license 
[+] License file must be included in %doc
[+] The spec file must be written in American English
[+] The spec file for the package MUST be legible
[+] The sources used to build the package must match the upstream source
[+] Successfully compile and build into binary rpms on at least one primary
architecture
[+] Proper use of ExcludeArch 
[+] All build dependencies must be listed in BuildRequires
[+] The spec file MUST handle locales properly
[+] Shared library files (not just symlinks) in any of the dynamic linker's
default paths, must call ldconfig in %post and %postun
[+] Packages must NOT bundle copies of system libraries
[+] If the package is designed to be relocatable, the packager must state this
fact in the request for review, along with the rationalization for relocation
of that specific package
[+] A package must own all directories that it creates
directories under this
[+] A Fedora package must not list a file more than once in the spec file's
%files listings
[+] Permissions on files must be set properly.
[+] Each package must consistently use macros
[+] The package must contain code, or permissable content
[-] Large documentation files must go in a -doc subpackage
[+] If a package includes something as %doc, it must not affect the runtime of
the application
[-] Header files must be in a -devel package
[-] Static libraries must be in a -static package
[-] library files that end in .so (without suffix) must go in a -devel package
[-] devel packages must require the base package using a fully versioned
dependency
[-] Packages must NOT contain any .la libtool archives
[-] GUI apps must include a %{name}.desktop file, properly installed with
desktop-file-install in the %install section 
[-] Packages must not own files or directories already owned by other packages
[+] All filenames in rpm packages must be valid UTF-8

Should Items
============
[+] the packager SHOULD query upstream for any missing license text files to
include it
[-] Non-English language support for description and summary sections in the
package spec if available
[+] The reviewer should test that the package builds in mock
[+] The package should compile and build into binary rpms on all supported
architectures
[+] The reviewer should test that the package functions as described
[-] If scriptlets are used, those scriptlets must be sane
[-] Usually, subpackages other than devel should require the base package using
a fully versioned dependency
[-] The placement of pkgconfig(.pc) should usually be placed in a -devel pkg
[-] If the package has file dependencies outside of /etc, /bin, /sbin,
/usr/bin, or /usr/sbin consider requiring the package which provides the file
instead of the file itself
[-] Should contain man pages for binaries/scripts

Comment 10 Ankur Sinha (FranciscoD) 2011-07-25 13:33:16 UTC
Thank you for the review Brandon :)

Comment 11 Ankur Sinha (FranciscoD) 2011-07-25 13:34:42 UTC
New Package SCM Request
=======================
Package Name: python-hl7
Short Description: Python library parsing HL7 v2.x messages
Owners: ankursinha
Branches: f14 f15
InitialCC: susmit mrceresa

Comment 12 Gwyn Ciesla 2011-07-25 13:40:46 UTC
Git done (by process-git-requests).

Comment 13 Fedora Update System 2011-07-25 14:37:54 UTC
python-hl7-0.2.0-2.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/python-hl7-0.2.0-2.fc14

Comment 14 Fedora Update System 2011-07-25 14:39:11 UTC
python-hl7-0.2.0-2.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/python-hl7-0.2.0-2.fc15

Comment 15 Fedora Update System 2011-08-12 10:54:47 UTC
python-hl7-0.2.0-2.fc14 has been pushed to the Fedora 14 stable repository.

Comment 16 Fedora Update System 2011-08-12 18:21:36 UTC
python-hl7-0.2.0-2.fc14 has been pushed to the Fedora 14 stable repository.

Comment 17 Fedora Update System 2011-08-12 18:21:49 UTC
python-hl7-0.2.0-2.fc15 has been pushed to the Fedora 15 stable repository.


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