Skip to content

Commit

Permalink
Merge in master
Browse files Browse the repository at this point in the history
  • Loading branch information
caspervdw committed Jun 29, 2018
2 parents 38ee45f + 81c0d38 commit 120423d
Show file tree
Hide file tree
Showing 58 changed files with 1,943 additions and 2,962 deletions.
40 changes: 15 additions & 25 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,54 +5,44 @@ matrix:
include:
# "Legacy" environments: oldest supported versions, without and with numba
- python: "2.7"
env: DEPS="numpy=1.8.2 scipy=0.12.0 matplotlib=1.3 pillow==2.1 pandas=0.13.0 scikit-image=0.9 pyyaml pytables" BUILD_DOCS=false
env: DEPS="numpy=1.8.2 scipy=0.12.0 matplotlib=1.3 pillow=2.1 pandas=0.13.0 scikit-image=0.9 pytables scikit-learn=0.14.1 pyyaml" BUILD_DOCS=false SKIP_SLOW=true
- python: "2.7"
env: DEPS="numpy=1.8.2 scipy=0.13.3 matplotlib=1.3 pillow==2.5.1 pandas=0.13.0 scikit-image=0.9 pyyaml numba=0.13.4 pytables" BUILD_DOCS=false
# "Recommended" environments: More recent versions, for Py2 and Py3.
env: DEPS="numpy=1.8.2 scipy=0.12.0 matplotlib=1.3 pillow=2.1 pandas=0.13.0 scikit-image=0.9 numba=0.13.4 pytables scikit-learn=0.14.1 pyyaml" BUILD_DOCS=false SKIP_SLOW=true
# "Typical" environments: package versions from 2016
- python: "2.7"
env: DEPS="libgfortran=1.0 numpy=1.9 scipy=0.16 matplotlib=1.4 pillow==2.9 pandas=0.16 scikit-image=0.11 pyyaml numba=0.20 pytables pyfftw" BUILD_DOCS=false
- python: "3.4"
env: DEPS="libgfortran=1.0 numpy=1.9 scipy=0.16 matplotlib=1.4 pillow==3.0 pandas=0.16 scikit-image=0.11 pyyaml numba=0.20 pytables pyfftw" BUILD_DOCS=true
env: DEPS="numpy=1.10 scipy=0.17 matplotlib=1.5 pillow=3.1 pandas=0.18.1 scikit-image=0.12 pytables numba=0.23.1 scikit-learn=0.17.1 pyyaml" BUILD_DOCS=false SKIP_SLOW=true
- python: "3.5"
env: DEPS="numpy scipy matplotlib pillow pandas!=0.18.0 scikit-image pyyaml pytables numba" BUILD_DOCS=false
env: DEPS="numpy=1.10 scipy=0.17 matplotlib=1.5 pillow=3.1 pandas=0.18.1 scikit-image=0.12 pytables numba=0.23.1 scikit-learn=0.17.1 pyyaml" BUILD_DOCS=true SKIP_SLOW=true
# Environments with most recent versions, on python 2.7 and python 3.6
- python: "2.7"
env: DEPS="numpy scipy matplotlib pillow pandas scikit-image pyyaml pytables numba scikit-learn" BUILD_DOCS=false SKIP_SLOW=true
- python: "3.6"
env: DEPS="numpy scipy matplotlib pillow pandas!=0.18.0 scikit-image pyyaml pytables numba" BUILD_DOCS=false
env: DEPS="numpy scipy matplotlib pillow pandas scikit-image pyyaml pytables numba scikit-learn" BUILD_DOCS=false SKIP_SLOW=false


install:
# See:
# https://groups.google.com/a/continuum.io/forum/#!topic/conda/RSFENqovnro
# - conda update --yes --no-deps conda
# OK, this used to *fix* the build, but now it *breaks* the build.
# If you're reading this, good luck out there. I'm not sure what to tell you.
- conda update --yes conda
# Append the conda-forge channel, instead of adding it. See:
# https://github.com/conda-forge/conda-forge.github.io/issues/232)
- conda config --append channels conda-forge
- conda create -n testenv --yes $DEPS pip nose setuptools python=$TRAVIS_PYTHON_VERSION
- conda create -n testenv --yes $DEPS nose python=$TRAVIS_PYTHON_VERSION
- source activate testenv
- |
if [ $BUILD_DOCS == true ]; then
conda install -n testenv --yes ipython=5.1.0 sphinx=1.4.8 numpydoc=0.6.0 nbconvert=4.2.0
pip install sphinx_bootstrap_theme==0.4.12
fi

# for debugging...
- echo $PATH
- which python
- conda info
- conda list
- python setup.py install

before_install:
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then wget http://repo.continuum.io/miniconda/Miniconda-3.5.5-Linux-x86_64.sh -O miniconda.sh; else wget http://repo.continuum.io/miniconda/Miniconda3-3.5.5-Linux-x86_64.sh -O miniconda.sh; fi
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh; else wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; fi
- chmod +x miniconda.sh
- ./miniconda.sh -b -p /home/travis/mc
- export PATH=/home/travis/mc/bin:$PATH

script:
- nosetests --nologcapture -a '!slow'
- if [ $SKIP_SLOW == true ]; then nosetests --nologcapture -a '!slow'; else nosetests --nologcapture; fi
- |
if [ $BUILD_DOCS == true ]; then
conda config --append channels conda-forge
conda install --yes ipython=5.1.0 sphinx=1.4.8 numpydoc=0.6.0 nbconvert=4.2.0 sphinx_bootstrap_theme=0.4
cd $TRAVIS_BUILD_DIR/..
git clone https://github.com/soft-matter/trackpy-examples.git
cd trackpy/doc
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
trackpy
=======

[![build status](https://travis-ci.org/soft-matter/trackpy.png?branch=master)](https://travis-ci.org/soft-matter/trackpy) [![DOI](https://zenodo.org/badge/doi/10.5281/zenodo.60550.svg)](http://dx.doi.org/10.5281/zenodo.60550)
[![build status](https://travis-ci.org/soft-matter/trackpy.png?branch=master)](https://travis-ci.org/soft-matter/trackpy) [![Build status](https://ci.appveyor.com/api/projects/status/bc5umcboh3elm8oh?svg=true)](https://ci.appveyor.com/project/caspervdw/trackpy) [![DOI](https://zenodo.org/badge/doi/10.5281/zenodo.1213240.svg)](http://dx.doi.org/10.5281/zenodo.1213240)

What is it?
-----------

**trackpy** is a Python package for particle tracking in 2D, 3D, and higher dimensions.
**[Read the walkthrough](http://soft-matter.github.io/trackpy/dev/tutorial/walkthrough.html)** to skim or study an example project from start to finish.
[**Read the walkthrough**](http://soft-matter.github.io/trackpy/dev/tutorial/walkthrough.html) to skim or study an example project from start to finish.

Documentation
-------------
Expand All @@ -16,7 +16,7 @@ Documentation

- an introduction
- tutorials on the basics, 3D tracking, and much, much more
- easy installation instructions
- easy [installation instructions](http://soft-matter.github.io/trackpy/dev/installation.html)
- the reference guide

If you use trackpy for published research, please
Expand Down
34 changes: 34 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
environment:

matrix:

- PYTHON: "C:\\Miniconda"
PYTHON_VERSION: "2.7"
DEPS: "numpy=1.8.2 scipy=0.14.0 matplotlib=1.3 pillow=2.1 pandas=0.13.0 scikit-image=0.9 numba=0.13.4 pytables scikit-learn=0.14.1 pyyaml"

- PYTHON: "C:\\Miniconda36-x64"
PYTHON_VERSION: "3.6"
DEPS: "numpy scipy matplotlib pillow pandas scikit-image pyyaml pytables numba scikit-learn"

init:
- "ECHO %PYTHON% %PYTHON_VERSION%"

install:
# Prepend to the PATH of this build
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%CONDA_ROOT%\\Library\\bin;%PATH%"

# Install dependencies
- conda update --yes conda
- conda create -n testenv --yes %DEPS% nose python=%PYTHON_VERSION%
- activate testenv

# for debugging...
- "ECHO %PATH%"
- python --version
- conda info
- conda list

build: false

test_script:
- nosetests --nologcapture -A "not slow"
36 changes: 0 additions & 36 deletions conda-recipe/README.md

This file was deleted.

8 changes: 0 additions & 8 deletions conda-recipe/bld.bat

This file was deleted.

14 changes: 0 additions & 14 deletions conda-recipe/build-all-platforms-and-upload.sh

This file was deleted.

3 changes: 0 additions & 3 deletions conda-recipe/build.sh

This file was deleted.

46 changes: 0 additions & 46 deletions conda-recipe/meta.yaml

This file was deleted.

22 changes: 14 additions & 8 deletions doc/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Convenience functions for feature finding, refinement, and linking are readily a

locate
batch
link_df
link

For more control on your tracking "pipeline", the following core functions are provided:

Expand All @@ -44,14 +44,20 @@ Linking
.. autosummary::
:toctree: generated/

link_df
link
link_iter
link_df_iter


:func:`~trackpy.linking.link_df` and :func:`~trackpy.linking.link_df_iter` run
the same underlying code, but :func:`~trackpy.linking.link_df_iter` streams
through large data sets one frame at a time. See the tutorial on large data
sets for more.
:func:`~trackpy.linking.link` and :func:`~trackpy.linking.link_df_iter` run
the same underlying code. :func:`~trackpy.linking.link` operates on a single
DataFrame containing data for an entire movie.
:func:`~trackpy.linking.link_df_iter` streams through larger data sets,
in the form of one DataFrame for each video frame.
:func:`~trackpy.linking.link_iter` streams through a series of numpy
ndarrays.

See the tutorial on large data sets for more.

Static Analysis
---------------
Expand Down Expand Up @@ -194,9 +200,9 @@ Utility functions
.. autosummary::
:toctree: generated/

minmass_version_change
minmass_v03_change
minmass_v04_change
utils.fit_powerlaw
strip_diagnostics

Diagnostic functions
--------------------
Expand Down
3 changes: 3 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,12 @@
extlinks = {'issue': ('https://github.com/soft-matter/trackpy/issues/%s',
'GH')}

mathjax_path = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.3/MathJax.js'

# Generate the API documentation when building
autosummary_generate = True
numpydoc_show_class_members = False
autodoc_docstring_signature = True

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand Down
48 changes: 40 additions & 8 deletions doc/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Installation is simple on Windows, OSX, and Linux, even for Python novices.
""""""""""""""""""""""""

To get started with Python on any platform, download and install
`Anaconda <https://store.continuum.io/cshop/anaconda/>`_. It comes with the
`Anaconda <https://www.anaconda.com/distribution/>`_. It comes with the
common scientific Python packages built in.

2. Install trackpy
Expand All @@ -26,8 +26,11 @@ for Applications > Utilities > Terminal. Type these commands:
conda update conda
conda install -c conda-forge trackpy
conda install -c conda-forge pims
The above installs trackpy and all its requirements.
The above installs trackpy and all its requirements, plus the recommended
`PIMS <http://soft-matter.github.io/pims/>`_ package that simplifies image-reading,
and that is used in the trackpy tutorials.

3. Try it out!
""""""""""""""
Expand All @@ -44,7 +47,7 @@ This will automatically open a browser tab, ready to interpret Python code.
To get started, check out the links to tutorials at the top of this document.

Updating Your Installation
--------------------------
""""""""""""""""""""""""""

Before updating to a new version of trackpy, be sure to read the
:doc:`release notes<whatsnew>` for a list of new features and any changes
Expand Down Expand Up @@ -78,6 +81,30 @@ You can easily install a recent build by downloading the source from
If you plan to edit the code yourself, you should use git and pip as
explained below.

Using environments
""""""""""""""""""

Some users often like to separate Python instances into environments, so that
each project can have its own set of packages. Create a trackpy-dedicated
environment with the name softmatter as follows:

.. code-block:: bash
conda create --name softmatter python=3.6 trackpy nb_conda
The `nb_conda` is optional, but we added it to ensure that Jupyter sees this
environment as well. You can switch to the environment from within Jupyter in
the Kernels menu. To access the environment on the commandline, type the
following:

.. code-block:: bash
source activate softmatter
On Windows systems, leave out the `source`. You can go back to the root conda
environment by activating `root`.


More Information for Experienced Python Users
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand All @@ -92,7 +119,7 @@ Package for python 2 and python 3 are available for Archlinux on AUR:
pip
"""

We strongly recommend using conda install trackpy, as described above,
We strongly recommend using conda to install trackpy, as described above,
but pip is also supported.

Essential Dependencies:
Expand All @@ -106,10 +133,11 @@ Essential Dependencies:
* `pandas <http://pandas.pydata.org/pandas-docs/stable/overview.html>`__ >=0.13
* `pyyaml <http://pyyaml.org/>`__

You will also need the image- and video-reader PIMS, which is, like trackpy
itself, part of the github.com/soft-matter organization. The package is also
available at conda-forge and PyPI, so installation works the same as
with trackpy.
You will also want to install the `pims <http://soft-matter.github.io/pims/>`_
package that simplifies image-reading, and that is used in the trackpy tutorials.
The remaining optional dependencies, listed below, are strongly recommended but
can be challenging to install yourself, hence our recommendation that you
use `Anaconda <https://www.anaconda.com/distribution/>`_.

Manual installation
"""""""""""""""""""
Expand Down Expand Up @@ -156,6 +184,10 @@ started using git.
Optional Dependencies
"""""""""""""""""""""

These are strongly recommended to make using trackpy more convenient and faster:

* The `PIMS <http://soft-matter.github.io/pims/>`_ package simplifies image-reading,
and is used in the trackpy tutorials.
* `PyTables <http://www.pytables.org/moin>`__ for saving results in an HDF5 file.
This is included with Anaconda.
* `numba <http://numba.pydata.org/>`__ for accelerated feature-finding and linking.
Expand Down
Loading

0 comments on commit 120423d

Please sign in to comment.