Skip to main content

Distributed processing with NumPy and Zarr.

Project description

Zappy - distributed processing with NumPy and Zarr

Zappy is for distributed processing of chunked NumPy arrays on engines like Pywren, Apache Spark, and Apache Beam.

Build Status

The zappy.base module defines a ZappyArray class that exposes the same interface as numpy.ndarray, and which is backed by distributed storage and processing. The array is broken into chunks, and is typically loaded from Zarr, and each chunk is processed independently.

There are a few engines provided:

  • direct - for eager in-memory processing
  • spark - for processing using Spark
  • beam - for processing using Beam or Google Dataflow
  • executor - for processing using Python's concurrent.futures.Executor, of which Pywren is a notable implementation

Beam currently only runs on Python 2.

Full coverage of the numpy.ndarray interface is not provided. Only enough has been implemented to support running parts of Scanpy, as demonstrated in the Single Cell Experiments repo.

Installation

pip install zappy

Demo

Take a look at the rendered demo Jupyter notebook, or try it out yourself as follows.

Create and activate a Python 3 virtualenv, and install the requirements:

python3 -m venv venv
. venv/bin/activate
pip install -r requirements.txt
pip install -e .
pip install s3fs jupyter

Then run the notebook with:

jupyter notebook demo.ipynb

Testing

There is a test suite for all the engines, covering both Python 2 and 3.

Run everything in one go with tox:

pip install tox
tox

Formatting:

pip install black
black zappy tests/* *.py

Coverage:

pip install pytest-cov
pytest --cov-report html --cov=zappy
open htmlcov/index.html

Publishing

See https://jonemo.github.io/neubertify/2017/09/13/publishing-your-first-pypi-package/

pip install twine
python setup.py sdist
twine upload -r pypitest dist/zappy-0.1.0.tar.gz
# Check https://test.pypi.org/project/zappy/

twine upload -r pypi dist/zappy-0.1.0.tar.gz
# Check https://pypi-hypernode.com/project/zappy/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zappy-0.1.0.tar.gz (16.6 kB view details)

Uploaded Source

File details

Details for the file zappy-0.1.0.tar.gz.

File metadata

  • Download URL: zappy-0.1.0.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.5

File hashes

Hashes for zappy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 dd372602ff1ddb25f06eded6a0c57e0a717e7a58dc29cfffc85a06a3b02cbb67
MD5 9c90d5d05f1cf6ebdc043398ab877f97
BLAKE2b-256 f652d3b83d400f3ff621a7799eb328a8756beea9528503e0ace5de956272e2c1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page