amzn/ion-python

Name: ion-python

Owner: Amazon

Description: A Python Implementation of Amazon Ion.

Created: 2016-04-07 20:38:50.0

Updated: 2018-05-16 01:29:59.0

Pushed: 2018-05-16 01:30:40.0

Homepage: http://amzn.github.io/ion-docs/

Size: 244

Language: Python

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Amazon Ion Python

An implementation of Amazon Ion for Python.

Build Status

This package is designed to work with Python 2.6+ and Python 3.3+

Git Setup

This repository contains a git submodule called ion-tests, which holds test data used by ion-python's unit tests.

The easiest way to clone the ion-python repository and initialize its ion-tests submodule is to run the following command.

t clone --recursive https://github.com/amzn/ion-python.git ion-python

Alternatively, the submodule may be initialized independently from the clone by running the following commands.

t submodule init
t submodule update
Development

It is recommended to use virtualenv to create a clean environment to build/test Ion Python.

rtualenv venv

venv/bin/activate
p install -r requirements.txt
p install -e .

You can also run the tests through setup.py or py.test directly.

thon setup.py test
Tox Setup

In order to verify that all platforms we support work with Ion Python, we use a combination of tox with pyenv.

Install relevant versions of Python:

r V in 2.6.9 2.7.15 3.3.7 3.4.8 3.5.5 3.6.5 pypy2.7-6.0.0 pypy3.5-6.0.0; do pyenv install $V; done

Note that on Mac OS X, you may need to change the CFLAGS:

r V in 2.6.9 2.7.15 3.3.7 3.4.8 3.5.5 3.6.5 pypy2.7-6.0.0 pypy3.5-6.0.0; do
CFLAGS="-I$(xcrun --show-sdk-path)/usr/include" pyenv install $V; done

Once you have these installations, add them as a local pyenv configuration

env local 2.6.9 2.7.15 3.3.7 3.4.8 3.5.5 3.6.5 pypy2.7-6.0.0 pypy3.5-6.0.0

At the time of this writing, on Mac OS X, you may have problems with pyenv and pypy. On this platform, it is probably easier to have pypy not managed by pyenv and install and use it directly from brew.

Assuming you have pyenv properly set up (making sure pyenv init is evaluated into your shell), you can now run tox:

n tox for all versions of python which executes py.test.
x

n tox for just Python 2.7 and 3.5.
x -e py27,py35

n tox for a specific version and run py.test with high verbosity
x -e py27 -- py.test -vv

n tox for a specific version and just the virtual env REPL.
x -e py27 -- python
TODO

The following build, deployment, or release tasks are required:


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.