Python libraries for working with COMBINE archives

38 views
Skip to first unread message

Jonathan Cooper

unread,
Jan 23, 2018, 7:10:52 AM1/23/18
to COMBINE archive
Dear all,

What are Python (3) developers using at the moment for OMEX support? I'm aware of https://github.com/FreakyBytes/pyCombineArchive (which is Python 2 only and hasn't seen much activity in a while) and the Python bindings to libCombine. The PyPI packaging for that confused me a little as tecombine appears to be both newer and deprecated? I'd also prefer a small, pure Python library if possible rather than depending on libSBML. Are there any other options?

Best wishes,
Jonathan

Tommy Yu

unread,
Jan 23, 2018, 7:45:30 AM1/23/18
to combine...@googlegroups.com
Hi Jonathan,

For PMR, I wrote a fairly barebone, standalone implementation from way back when this standard was being finalized during the 2013 Combine meeting in Paris (in fact, wrote and committed this <https://github.com/PMR2/pmr2.app/blob/c2ec7b993e7facada5ef487c8fb3775f230a533e/pmr2/app/omex/omex.py> initially while there). Unfortunately, the overall implementation is rather coupled to PMR, and I never got around to make the actual generation of the combine separate from all the PMR bits. However, it does exist as a separate library located at <https://github.com/PMR2/pmr2.omex/> (please excuse the lack of documentation), but the main part of the implementation <https://github.com/PMR2/pmr2.omex/blob/master/src/pmr2/omex/omex.py> imports from a bunch of modules that really have no business to be there if this was truly a standalone library, but it should contain enough to get started if such a need arises.

As the archive itself is a zip file, it's pretty trivial to make use of the builtin zipfile module to extract the manifest.xml and figure out what is there with the archive and what else to fetch externally. In fact, in the omex.py file there is a parse_manifest function, which just simply return a list of locations specified by the file, and the other functions are more or less related to creation of combine archives from a workspace in PMR, so they may be less useful. The _create_zip function can be a way to create a zip file from a 2-tuple of (filename, contents).

Cheers,
Tommy.
> --
> You received this message because you are subscribed to the Google Groups "COMBINE archive" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to combine-archi...@googlegroups.com <mailto:combine-archi...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/combine-archive.
> For more options, visit https://groups.google.com/d/optout.

Frank Bergmann

unread,
Jan 24, 2018, 2:54:13 AM1/24/18
to COMBINE archive
Hello Jonathan, 

Please let me know if libCombine is not working for you, the pypi version i maintain does not require tellurium: 


the repo those files are generated from: 


cheers
Frank

Martin Peters

unread,
Jan 25, 2018, 4:42:19 AM1/25/18
to combine...@googlegroups.com
Hi together,

sorry I'm a bit late to this discussion. I'm the original developer of
the pyCombineArchive library. It was initially developed to implement
COMBINE Archie support in JWS Online and is (to my knowledge) still used
in there for this purpose. At the moment it seems to me that Carl
Christensen is in charge of maintaining JWS Online, as he submitted a
Pull Request to me for the library.

However, since I'm not active in this field anymore and my free time is
already fairly limited, I'm not going to actively maintain
pyCombineArchive. (Still accepting pull request, if somebody insists ;) )

Also I would advise to switch to libCombine, since it is anyway good
practice to call C-libs from Python and it is actively maintained.
Unless you've got a good reason to use a Python-only implementation and
therefore cope with all the GIL limitations ;)

I've also updated the README of the pyCombineArchive repo to reflect the
current status. "Under heavy developed" seemed a bit misleading.

Cheers,
Martin

Cooper, Jonathan

unread,
Feb 5, 2018, 3:51:21 AM2/5/18
to combine...@googlegroups.com
Thanks all for the feedback. We’re going to start with libCombine, although we may build something that just uses the Python stdlib further down the line.

Best wishes,
Jonathan

On 25/01/2018, 09:40, "'Martin Peters' via COMBINE archive" <combine...@googlegroups.com> wrote:

Hi together,

sorry I'm a bit late to this discussion. I'm the original developer of
the pyCombineArchive library. It was initially developed to implement
COMBINE Archive support in JWS Online and is (to my knowledge) still used
To unsubscribe from this group and stop receiving emails from it, send an email to combine-archi...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages