Browse Source

Anaconda deployment // Docs

marker_with_uncertainty
miili 4 years ago
parent
commit
22744f14f5
  1. 179
      README.md
  2. 7
      doc/source/install/details.rst
  3. 10
      doc/source/install/system/anaconda.rst
  4. 4
      doc/source/install/system/index.rst
  5. 5
      doc/source/install/system/mac.rst
  6. 2
      maintenance/anaconda/build.bat
  7. 6
      maintenance/anaconda/build.sh
  8. 13
      maintenance/anaconda/meta.yaml
  9. 2
      maintenance/anaconda/snuffler_mac.command
  10. 38
      maintenance/anaconda_deploy.sh
  11. 50
      maintenance/deploy-anaconda_linux.sh

179
README.md

@ -5,142 +5,47 @@
For documentation and installation instructions please see
[http://pyrocko.org/](http://pyrocko.org/).
# Python 3 Support
## TODO
- [x] Include PyAVL
- [ ] Travis Py2/3 tests
- [ ] Create dedicated folders
- [x] io
- [x] gui
- [x] datasets
- [x] model
- [ ] plots
Move `quakeml`, `station_xml` into `io`?
- [ ] Finish and Tag
- [ ] Build new docs (together w deplog mechanism?)
- [ ] Deployment mechanisms
- [ ] PIP
- [ ] Anaconda
## Module Progress
- [x] ``__init__.py``
- [x] ``ahfullgreen.py``
- [x] ``automap.py``
- [x] ``autopick.py``
- [x] ``beachball.py``
- [x] ``cake_plot.py``
- [x] ``cake.py``
- [x] ``catalog.py``
- [x] ``config.py``
- [x] ``crust2x2_data.py``
- [x] ``crust2x2.py``
- [x] ``crustdb_abbr.py``
- [x] ``crustdb.py``
- [x] ``css.py``
- [x] ``datacube.py``
- [x] ``dummy_progressbar.py``
- [x] ``edl.py`` *partial, not tested*
- [x] ``evalresp_ext.c``
- [x] ``evalresp.py``
- [x] ``eventdata.py``
- [x] ``ext/``
- [x] ``ahfullgreen_ext.c``
- [x] ``autopick_ext.c``
- [x] ``datacube_ext.c``
- [x] ``ims_ext.c``
- [x] ``mseed_ext.c``
- [x] ``orthodrome_ext.c``
- [x] ``parstack_ext.c``
- [x] ``signal_ext.c``
- [x] ``util_ext.c``
- [x] ``fdsn/``
- [x] ``__init__.py``
- [x] ``enhanced_sacpz.py``
- [x] ``resp.py``
- [x] ``station.py``
- [x] ``ws.py``
- [x] ``file.py``
- [x] ``fomosto/``
- [x] ``__init__.py``
- [x] ``ahfullgreen.py``
- [x] ``dummy.py`` *not tested*
- [x] ``poel.py`` *not tested*
- [x] ``psgrn_pscmp.py``
- [x] ``qseis2d.py``
- [x] ``qseis.py``
- [x] ``qssp.py``
- [x] ``fomosto_report/``
- [x] ``gcf.py``
- [x] ``geonames.py``
- [ ] ``gf/``
- [x] ``__init__.py``
- [x] ``builder.py``
- [x] ``meta.py``
- [x] ``seismosizer.py``
- [x] ``server.py``
- [x] ``store.py``
- [x] ``targets.py``
- [x] ``ws.py``
- [x] ``gmtpy.py``
- [x] ``gse1.py``
- [x] ``gse2_io_wrap.py``
- [x] ``gshhg.py``
- [x] ``gui_util.py``
- [x] ``guts_array.py``
- [x] ``guts.py``
- [x] ``hamster_pile.py`` *not tested*
- [x] ``hudson.py``
- [x] ``ims.py``
- [x] ``io_common.py``
- [x] ``io.py``
- [x] ``iris_ws.py``
- [x] ``kan.py``
- [x] ``marker_editor.py``
- [x] ``marker.py``
- [x] ``model.py``
- [x] ``moment_tensor.py``
- [x] ``moment_tensor_viewer.py``
- [x] ``mseed.py``
- [x] ``orthodrome.py``
- [x] ``parimap.py``
- [x] ``parstack.py``
- [x] ``pchain.py``
- [x] ``pile.py``
- [x] ``pile_viewer.py``
- [x] ``plot.py``
- [x] ``pz.py``
- [x] ``quakeml.py``
- [x] ``rdseed.py``
- [x] ``response_plot.py``
- [x] ``sac.py``
- [x] ``seed.py``
- [x] ``segy.py``
- [x] ``seisan_response.py``
- [x] ``seisan_waveform.py``
- [x] ``serial_hamster.py``
- [x] ``shadow_pile.py``
- [x] ``slink.py``
- [x] ``snuffler.py`` *WIP*
- [x] ``snuffling.py``
- [x] ``snufflings/``
- [x] ``spit.py``
- [x] ``suds.py``
- [x] ``tectonics.py``
- [x] ``topo/``
- [x] ``__init__.py``
- [x] ``dataset.py``
- [x] ``etopo1.py``
- [x] ``srtmgl3.py``
- [x] ``tile.py``
- [x] ``trace.py``
- [x] ``util.py``
- [x] ``weeding.py``
- [x] ``yaff.py``
## Installation
### Native installation
```
sudo python setup.py make_prerequisites
sudo python setup.py install
```
### Anaconda3 / MacOS
```
conda install -c pyrocko pyrocko
```
Anaconda Packages are available for Linux and OSX
### Python PIP
```
sudo pip install pyrocko
```
or from source
```
git clone https://github.org/pyrocko/pyrocko
cd pyrocko
sudo pip install -r requirements.txt
sudo pip install .
```
More installation instruction at http://pyrocko.org
## Documentation
Documentation and usage examples are available online at http://pyrocko.org/docs/current
## Community Support
Communit support at [https://hive.pyrocko.org](https://hive.pyrocko.org/signup_user_complete/?id=9edryhxeptdbmxrecbwy3zg49y).
## Citation
Recommended citation for Pyrocko
@ -166,7 +71,7 @@ You should have received a copy of the GNU General Public License along with thi
marius.isken@gfz-potsdam.de
* Marius Kriegerowski;
marius.kriegerowski@gfz-potsdam.de
marius.kriegerowski@gfz-potsdam.de
```
Helmholtz Centre Potsdam German Research Centre for Geoscienes GFZ

7
doc/source/install/details.rst

@ -15,6 +15,7 @@ Prerequisites
The following software packages must be installed before Pyrocko can be installed:
* Try to use normal system packages for these Python modules:
* `Python <http://www.python.org/>`_ (>= 2.6 and >=3.4, with development headers)
* `NumPy <http://numpy.scipy.org/>`_ (>= 1.6, with development headers)
@ -38,6 +39,10 @@ The following software packages must be installed before Pyrocko can be installe
* `QSEIS <http://kinherd.org/fomosto-qseis-2006a.tar.gz>`_ (optional, needed for the Fomosto ``qseis.2006a`` backend)
* `QSSP <http://kinherd.org/fomosto-qssp-2010.tar.gz>`_ (optional, needed for the Fomosto ``qssp.2010`` backend)
This can be shortcutted by::
sudo python setup.py make_prerequisites
The names of the system packages to be installed differ from system to system.
Whether there are separate packages for the development headers of NumPy and
Python (the \*-dev packages) is also system specific.
@ -46,7 +51,7 @@ Python (the \*-dev packages) is also system specific.
Download and install Pyrocko
----------------------------
Use *git* to download the software package and the included script *setup.py*
Use ``git`` to download the software package and the included script ``setup.py``
to install::
cd ~/src/ # or wherever you keep your source packages

10
doc/source/install/system/anaconda2.rst → doc/source/install/system/anaconda.rst

@ -1,12 +1,12 @@
Installation under Anaconda2
Installation for Anaconda
............................
* **Anaconda2** thru conda
* **Anaconda3** using ``conda`` package manager (Preferred)::
conda install -c pyrocko pyrocko
More Information available at <https://anaconda.org/pyrocko/pyrocko>_
conda install -c pyrocko pyrocko
Packages are available for Linux 64-Bit and MacOS.
More information available at https://anaconda.org/pyrocko/pyrocko
* **Anaconda2** (4.2.0)::

4
doc/source/install/system/index.rst

@ -7,10 +7,10 @@ on some popular systems.
.. toctree::
Debian based systems (Debian, Ubuntu, Mint) <deb>
Anaconda <anaconda>
Mac OS X <mac>
Fedora <fedora>
OpenSuse <suse>
Mac OS X <mac>
Anaconda2 <anaconda2>
For instructions on how to install Pyrocko on other systems or if the
installation with any of the above procedures fails, see

5
doc/source/install/system/mac.rst

@ -1,6 +1,11 @@
Installation on Mac OS X systems
................................
* Anaconda for MacOS
If you are using Anaconda under MacOS, see :doc:`/anaconda`
* **Mac OS X** (10.6 - 10.10) with **MacPorts** (2.3.3)::
sudo port install git

2
maintenance/anaconda/build.bat

@ -0,0 +1,2 @@
"%PYTHON%" setup.py install
if errorlevel 1 exit 1

6
maintenance/anaconda/build.sh

@ -0,0 +1,6 @@
$PYTHON setup.py install
if [ `uname` == Darwin ]
then
cp $RECIPE_DIR/snuffler_mac.command $PREFIX/bin
fi

13
maintenance/anaconda-meta.yaml → maintenance/anaconda/meta.yaml

@ -1,17 +1,13 @@
{% set data = load_setup_py_data() %}
package:
name: pyrocko
version: {{ data.get('version') }}
source:
path: ../../
path: ../../../
# git-url: https://github.com/pyrocko/pyrocko
build:
script: $PYTHON setup.py install
requirements:
build:
- python
@ -24,12 +20,7 @@ requirements:
- pyyaml
- progressbar2
- future
app:
entry: snuffler .
summary: A seismogram browser and workbench from Pyrocko.
icon: snuffler.png
type: gui
- requests
about:
home: http://pyrocko.org

2
maintenance/anaconda/snuffler_mac.command

@ -0,0 +1,2 @@
DIR=$(dirname $0)
$DIR/command ${HOME}

38
maintenance/anaconda_deploy.sh

@ -1,38 +0,0 @@
#!/bin/bash
# To return a failure if any commands inside fail
set -e
MINICONDA_URL="http://repo.continuum.io/miniconda"
CONDA_PREFIX=$HOME/miniconda3
BUILD_DIR=`dirname $0`/pyrocko-anaconda-deploy
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
MINICONDA_FILE=Miniconda3-latest-MacOSX-x86_64.sh
else
MINICONDA_FILE=Miniconda3-latest-Linux-x86_64.sh
fi
wget $MINICONDA_URL/$MINICONDA_FILE -O miniconda.sh
chmod +x miniconda.sh
./miniconda.sh -b -u
export PATH=$PATH:$CONDA_PREFIX/bin
conda install -y conda-build anaconda-client
anaconda logout
anaconda login --username $ANACONDA_USER --password $ANACONDA_PASSWORD
rm -rf $BUILD_DIR
mkdir $BUILD_DIR
cp anaconda-meta.yaml $BUILD_DIR/meta.yaml
wget http://pyrocko.org/v0.3/_images/pyrocko_shadow.png -O $BUILD_DIR/snuffler.png
cd $BUILD_DIR
conda config --set anaconda_upload yes
conda-build .
cd ..
rm -rf $BUILD_DIR
# Workaround for https://github.com/travis-ci/travis-ci/issues/6522
# Turn off exit on failure.
set +e

50
maintenance/deploy-anaconda_linux.sh

@ -0,0 +1,50 @@
#!/bin/bash
# To return a failure if any commands inside fail
# More: https://conda.io/docs/user-guide/tutorials/build-pkgs.html
set -e
MINICONDA_URL="http://repo.continuum.io/miniconda"
CONDA_PREFIX=$HOME/miniconda3
BUILD_DIR=`dirname $0`/anaconda/pyrocko-anaconda-deploy
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
MINICONDA_FILE=Miniconda3-latest-MacOSX-x86_64.sh
else
MINICONDA_FILE=Miniconda3-latest-Linux-x86_64.sh
fi
# Install Miniconda
wget $MINICONDA_URL/$MINICONDA_FILE -O anaconda/miniconda.sh
chmod +x anaconda/miniconda.sh
./anaconda/miniconda.sh -b -u
export PATH=$PATH:$CONDA_PREFIX/bin
# Install Anaconda client and build tools
conda install -y conda-build anaconda-client
# Create build env
rm -rf $BUILD_DIR
mkdir -p $BUILD_DIR
cp anaconda/meta.yaml $BUILD_DIR/meta.yaml
cp anaconda/build.sh $BUILD_DIR/build.sh
cd $BUILD_DIR
read -r -p "Do you want to upload pyrocko to Anaconda (https://anaconda.org/pyrocko/pyrocko) [y/N]?" resp
case $resp in
[yY][eE][sS]|[yY] )
anaconda logout;
anaconda login --username $ANACONDA_USER --password $ANACONDA_PASSWORD;
conda config --set anaconda_upload yes;
;;
* ) conda config --set anaconda_upload no;
;;
esac
conda-build .
cd -
# Workaround for https://github.com/travis-ci/travis-ci/issues/6522
# Turn off exit on failure.
set +e
Loading…
Cancel
Save