Installing from source¶
Clone from git:
git clone https://github.com/Kitware/romanesco.git cd romanesco
python -m unittest -v tests.table_test python -m unittest -v tests.tree_test
pip install pymongo rpy2 # may need sudo
You’ll need to get a MongoDB server listening on localhost by running
In R, you’ll need to install some stuff too, currently just the
Some things depend on VTK Python bindings. Romanesco uses some features from cutting-edge VTK, so you’ll likely need to build it from scratch (takes ~30 minutes). First get CMake, then do the following:
git clone git://vtk.org/VTK.git cd VTK mkdir build cd build cmake .. -DVTK_WRAP_PYTHON:BOOL=ON -DBUILD_TESTING:BOOL=OFF make export PYTHONPATH=`pwd`/Wrapping/Python:`pwd`/lib python -c "import vtk" # should work without an error
Want to run things remotely? On the client and server install celery:
pip install celery
Then fire up the celery worker:
python -m romanesco
On the client, run a script akin to the following example:
This section of the documentation is meant for those who wish to contribute to the Romanesco core platform.
Note on building VTK¶
The VTK binaries used for testing in the .travis.yml is built in an Ubuntu precise 64-bit VM using the following commands:
# from host vagrant up vagrant ssh # from Vagrant guest sudo apt-get update sudo apt-get install g++ make wget http://www.cmake.org/files/v2.8/cmake-22.214.171.124.tar.gz tar xzvf cmake-126.96.36.199.tar.gz cd cmake-188.8.131.52 ./bootstrap --prefix=~/cmake-184.108.40.206-precise64 make install cd ~ git clone git://vtk.org/VTK.git cd VTK mkdir build cd build ~/cmake-220.127.116.11-precise64/bin/cmake .. -DBUILD_TESTING:BOOL=OFF -DVTK_WRAP_PYTHON:BOOL=ON -DVTK_Group_Rendering:BOOL=OFF -DVTK_Group_StandAlone:BOOL=OFF -DModule_vtkCommonDataModel:BOOL=ON -DModule_vtkIOInfovis:BOOL=ON -DModule_vtkFiltersSources:BOOL=ON -DCMAKE_INSTALL_PREFIX:PATH=~/vtk-precise64 make install tar czvf vtk-precise64.tar.gz ~/vtk-precise64/ exit # from host scp -P 2222 vagrant@localhost:~/vtk-precise64-118242.tar.gz .
Creating a new release¶
Romanesco releases are uploaded to PyPI
for easy installation via
pip. The recommended process for generating a new
release is described here.
From the target commit, set the desired version number in
plugin.json. Create a new commit and note the SHA; this will become the release tag.
Ensure that all tests pass.
Clone the repository in a new directory and checkout the release SHA. (Packaging in an old directory could cause extraneous files to be mistakenly included in the source distribution.)
python setup.py sdist --dist-dir .to generate the distribution tarball in the project directory, which looks like
Create a new virtual environment and install the python package into it. This should not be done in the repository directory because the wrong package will be imported.
mkdir test && cd test virtualenv release source release/bin/activate pip install ../romanesco-<version>.tar.gz
Once that finishes, you should be able to start the worker by simply running
When you are confident everything is working correctly, generate a new release on GitHub. You must be sure to use a tag version of
<version>is the version number as it exists in
plugin.json. For example,
v0.2.4. Attach the three tarballs you generated to the release.
Add the tagged version to readthedocs and make sure it builds correctly.
Finally, upload the release to PyPI with the following command:
python setup.py sdist upload
The first time you create a release, you will need to register to PyPI
before you can run the upload step. To do so, simply run
python setup.py sdist register.