A set of python tools for reading, writing and viewing Cinema databases
git clone --recurse-submodules https://github.com/cinemascience/cinemasci.git
or
git clone https://github.com/cinemascience/cinemasci.git
cd cinemasci
git submodule init
git submodule update
The latest release of this module is available on pypi.org, and you can install it in the normal way, with pip:
pip install cinemasci
You can also install it locally from source using the setup.py file.
- cdb: Tools for reading, writing and manipulating a cinema database.
- cis: Tools for reading, writing and manipulating composable image sets.
- install: Tools for installing viewers.
- pynb: A Jupyter notebook viewer for simple databases.
- server: A simple server to help view databases, using the
viewerssubmodule. - viewers: Viewers (submodule)
High level Cinema objects can be created with the high level new() command, which takes a typename and dict of args as arguments:
import cinemasci
my_database = cinemasci.new("cdb", {"path": "path/to/database.cdb"})
There is a script to create a local testing area. To use it, run the testing/make_url_tests script. The script will print out instructions for using the cinema server and a web browser.
./testing/make_url_tests
Creating temporary work area at testing/scratch/url
To use:
pushd testing/scratch/url
open test-url.html
python -m cinemasci.server --port 8200 --viewer view --data data/sphere.cdb
All code shall be committed with unit testing, using python's unittest module. All tests shall be run on code commit, with the following command, which will automatically run all files in the testing directory:
python -m unittest discover testing
For each submodule included:
- There shall be a unit testing file in
testing/namedtest_<modulename>.py - All tests are expected to pass.
This project uses coding standards spelled out in PEP8