Tools for using article data in Python.
Project description
elife-tools
Tools for using article data in Python
Non-Python dependencies
libxml2 (Ubuntu, Arch)
Install for users
Install via pip:
$ pip install elifetools
You might need to install libxml manually first
$ sudo STATIC_DEPS=true pip install lxml==3.4.1
To install the latest version directly from git
$ pip install git+https://github.com/elifesciences/elife-tools.git@master
or you can add it to your project’s requirements.txt file
git+https://github.com/elifesciences/elife-tools.git@master
Install for developers
Clone the git repo
Make a virtualenv (optional)
Then
$ python setup.py install
Example usage
>>> from elifetools import parseJATS as parser
>>> soup = parser.parse_document('sample-xml/elife-kitchen-sink.xml')
>>> print parser.doi(soup)
More code examples can be found in tests/basic_usage_test.py
These code examples can be run with:
$ cd elifetools/
$ python -m unittest discover -s tests -p *_test.py
and with xml output:
$ cd elifetools/
$ python -m xmlrunner discover -s tests -p *_test.py
Testing
You can run the full automated test suite from the base folder with:
$ python -m unittest discover elifetools/tests
or you can run tests with coverage:
$ coverage run -m unittest discover elifetools/tests
and then view the coverage report:
$ coverage report -m
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
elifetools-0.1.6.tar.gz
(89.8 kB
view hashes)
Built Distribution
Close
Hashes for elifetools-0.1.6-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d27a3218dd885ff2c100f74f6e011235f339dfd21b903b05a6ae13a88676891 |
|
MD5 | 1594703d142cc44df3df8736f15d82fd |
|
BLAKE2b-256 | 48df878c47fe64f6e006d4059c9b780db2d308888bd78155882f90272a139248 |