Skip to content

Commit

Permalink
Merge branch 'release/0.99.9'
Browse files Browse the repository at this point in the history
  • Loading branch information
KristoforMaynard committed Aug 20, 2018
2 parents 62ce8c6 + 4ebeff1 commit dd921a6
Show file tree
Hide file tree
Showing 144 changed files with 19,008 additions and 11,508 deletions.
218 changes: 118 additions & 100 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,27 +34,29 @@ before_install:

# before we build, check to see if we're in a release branch, and if
# so, then do some 0th order validation on the viscid.__version__
- 'if [[ ($TRAVIS_BRANCH =~ ^(.*release.*|master)$) ]]; then
if [ "$(grep -E "__version__\s*=" viscid/__init__.py | grep -E "(dev|travis)")" != "" ]; then
echo "Oops, you are preparing a release, but you still have either";
echo "dev or travis in the version number";
false;
fi
elif [[ $TRAVIS_BRANCH =~ ${deployable} ]]; then
if [ "$(grep -E "__version__\s*=" viscid/__init__.py | grep ${TRAVIS_BRANCH} )" == "" ]; then
echo "Oops, You are on a deployable branch (that is not master), ";
echo "but the branch name is not in the version number";
false;
fi
fi'
- |
if [[ ($TRAVIS_BRANCH =~ ^(.*release.*|master)$) ]]; then
if [ "$(grep -E "__version__\s*=" viscid/__init__.py | grep -E "(dev|travis)")" != "" ]; then
echo "Oops, you are preparing a release, but you still have either"
echo "dev or travis in the version number"
false
fi
elif [[ $TRAVIS_BRANCH =~ ${deployable} ]]; then
if [ "$(grep -E "__version__\s*=" viscid/__init__.py | grep ${TRAVIS_BRANCH} )" == "" ]; then
echo "Oops, You are on a deployable branch (that is not master), "
echo "but the branch name is not in the version number"
false
fi
fi
# make sure the version string appears in CHANGES.md
- 'ver_re="__version__.*[\"'']+([^\"'']+)[\"'']+"'
- 'version=$([[ "$(grep -E "__version__\s*=" viscid/__init__.py)" =~ ${ver_re} ]]; echo "${BASH_REMATCH[1]}")'
- 'if [ "$(grep -E "${version}\s*$" CHANGES.md)" == "" ]; then
echo "Oops, the version ${version} does not appear in CHANGES.md";
false;
fi'
- |
ver_re="__version__.*[\"'']+([^\"'']+)[\"'']+"
version=$([[ "$(grep -E "__version__\s*=" viscid/__init__.py)" =~ ${ver_re} ]]; echo "${BASH_REMATCH[1]}")
if [ "$(grep -E "${version}\s*$" CHANGES.md)" == "" ]; then
echo "Oops, the version ${version} does not appear in CHANGES.md"
false
fi
# setup deployment key
# make the encrypted archives with the following...
Expand Down Expand Up @@ -84,56 +86,66 @@ before_install:
# then...
# Add the public key to the github project ${HG_USER}/Viscid-docs
# as a "Deploy key" with write access
- 'mkdir -p ${HOME}/.ssh'
- 'chmod 700 ${HOME}/.ssh'
- 'if [ "${TRAVIS_REPO_SLUG}" == "viscid-hub/Viscid" ]; then
openssl aes-256-cbc -K $encrypted_0b3ef9041727_key -iv $encrypted_0b3ef9041727_iv -in resources/.archive.viscid-hub.tar.gz.enc -out ./.archive.tar.gz -d;
export DEPLOY_SLUG="${TRAVIS_REPO_SLUG}-docs";
export DEPLOY_DOCS="true";
export DEPLOY_TESTS="true";
elif [ "${TRAVIS_REPO_SLUG}" == "KristoforMaynard/Viscid" ]; then
openssl aes-256-cbc -K $encrypted_0b3ef9041727_key -iv $encrypted_0b3ef9041727_iv -in resources/.archive.KristoforMaynard.tar.gz.enc -out ./.archive.tar.gz -d;
export DEPLOY_SLUG="${TRAVIS_REPO_SLUG}-docs";
export DEPLOY_DOCS="false";
export DEPLOY_TESTS="true";
else
export DEPLOY_SLUG="";
export DEPLOY_DOCS="false";
export DEPLOY_TESTS="false";
fi'
- 'if [ -f ./.archive.tar.gz ]; then
mkdir .archive;
tar -xf .archive.tar.gz -C .archive;
mkdir -p ${HOME}/.ssh;
chmod 700 ${HOME}/.ssh;
mv .archive/id_rsa ${HOME}/.ssh/id_rsa;
chmod 600 ${HOME}/.ssh/id_rsa;
fi'
- 'echo "Deployment info: DEPLOY_SLUG: ${DEPLOY_SLUG}";
echo "Deployment info: DEPLOY_DOCS: ${DEPLOY_DOCS}";
echo "Deployment info: DEPLOY_TESTS: ${DEPLOY_TESTS}";
ls -la ${HOME}/.ssh;'
- |
mkdir -p ${HOME}/.ssh
chmod 700 ${HOME}/.ssh
- |
if [ "${TRAVIS_REPO_SLUG}" == "viscid-hub/Viscid" ]; then
openssl aes-256-cbc -K $encrypted_0b3ef9041727_key -iv $encrypted_0b3ef9041727_iv -in resources/.archive.viscid-hub.tar.gz.enc -out ./.archive.tar.gz -d
export DEPLOY_SLUG="${TRAVIS_REPO_SLUG}-docs"
export DEPLOY_DOCS="true"
export DEPLOY_TESTS="true"
elif [ "${TRAVIS_REPO_SLUG}" == "KristoforMaynard/Viscid" ]; then
openssl aes-256-cbc -K $encrypted_0b3ef9041727_key -iv $encrypted_0b3ef9041727_iv -in resources/.archive.KristoforMaynard.tar.gz.enc -out ./.archive.tar.gz -d
export DEPLOY_SLUG="${TRAVIS_REPO_SLUG}-docs"
export DEPLOY_DOCS="false"
export DEPLOY_TESTS="true"
else
export DEPLOY_SLUG=""
export DEPLOY_DOCS="false"
export DEPLOY_TESTS="false"
fi
- |
if [ -f ./.archive.tar.gz ]; then
mkdir .archive
tar -xf .archive.tar.gz -C .archive
mkdir -p ${HOME}/.ssh
chmod 700 ${HOME}/.ssh
mv .archive/id_rsa ${HOME}/.ssh/id_rsa
chmod 600 ${HOME}/.ssh/id_rsa
fi
- |
echo "Deployment info: DEPLOY_SLUG: ${DEPLOY_SLUG}"
echo "Deployment info: DEPLOY_DOCS: ${DEPLOY_DOCS}"
echo "Deployment info: DEPLOY_TESTS: ${DEPLOY_TESTS}"
ls -la ${HOME}/.ssh
## Now setup the Anaconda tools
# it saves some download time to use the same python iff 2.7
- 'if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
export CONDA_URL="https://repo.anaconda.com/miniconda/Miniconda2-latest-Linux-x86_64.sh";
else
export CONDA_URL="https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh";
fi'
- |
if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
export CONDA_URL="https://repo.anaconda.com/miniconda/Miniconda2-latest-Linux-x86_64.sh"
else
export CONDA_URL="https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh"
fi
# linux has wget, OS X has curl... such is life
- 'if [[ "$(which wget &>/dev/null && echo $?)" == "0" ]]; then
wget "${CONDA_URL}" -O miniconda.sh;
else
curl "${CONDA_URL}" > miniconda.sh;
fi'
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
# updating conda always causes weird bugs
# - conda update -q conda
# Useful for debugging any issues with conda
- |
if [[ "$(which wget &>/dev/null && echo $?)" == "0" ]]; then
wget "${CONDA_URL}" -O miniconda.sh
else
curl "${CONDA_URL}" > miniconda.sh
fi
- |
bash miniconda.sh -b -p $HOME/miniconda
export PATH="$HOME/miniconda/bin:$PATH"
hash -r
conda config --set always_yes yes --set changeps1 no
- conda info -a

## Now setup some Viscid specific things, like rc files and make sure
Expand All @@ -158,52 +170,58 @@ install:

# if conda package list doesn't match the cached one, just blast
# the cached conda environment
- 'if [ -f ${cached_env_spec} ]; then
if [ "$(diff -qw ${env_spec} ${cached_env_spec})" != "" ]; then
echo "Package Lists Differed, killing current venv";
echo "$(diff -w ${env_spec} ${cached_env_spec})";
rm ${cached_env_spec};
rm -rf ${envpath};
fi
fi'
- |
if [ -f ${cached_env_spec} ]; then
if [ "$(diff -qw ${env_spec} ${cached_env_spec})" != "" ]; then
echo "Package Lists Differed, killing current venv";
echo "$(diff -w ${env_spec} ${cached_env_spec})";
rm ${cached_env_spec};
rm -rf ${envpath};
fi
fi
# if the conda envronment we need isn't cached, create it, otherwise
# do an update
- 'if [ ! -d "${envpath}" ]; then
conda env create -qf ${env_spec};
source activate ${env_name};
cp ${env_spec} ${cached_env_spec};
else
source activate ${env_name};
conda update --all --yes;
fi'
- |
if [ ! -d "${envpath}" ]; then
conda env create -qf ${env_spec};
source activate ${env_name};
cp ${env_spec} ${cached_env_spec};
else
source activate ${env_name};
conda update --all --yes;
fi
# if deplying docs, run tests inplace, this makes preparing the docs
# faster since cython's fused types makes 8 times too much code, ug!
- 'if [ "${PREPARE_DOCS}" == "1" ]; then
make inplace;
export PATH="${PWD}/scripts:${PATH}";
export PYTHONPATH="${PWD}:${PYTHONPATH}";
else
rm -rf ${prefix};
export PATH="${prefix}/bin:${PATH}";
export PYTHONPATH="${prefix}:${PYTHONPATH}";
mkdir -p "${prefix}";
python setup.py install --prefix=${prefix} --install-lib=${prefix};
fi'
- |
if [ "${PREPARE_DOCS}" == "1" ]; then
make inplace;
export PATH="${PWD}/scripts:${PATH}";
export PYTHONPATH="${PWD}:${PYTHONPATH}";
else
rm -rf ${prefix};
export PATH="${prefix}/bin:${PATH}";
export PYTHONPATH="${prefix}:${PYTHONPATH}";
mkdir -p "${prefix}";
python setup.py install --prefix=${prefix} --install-lib=${prefix};
fi
before_script:
- 'if [ "${FLAKE}" == "1" ]; then make flake8; fi'

script:
- 'if [ "${PREPARE_DOCS}" == "1" ]; then
make check;
else
make instcheck;
fi'
- 'if [[ $TRAVIS_BRANCH =~ ${deployable}$ && "${DEPLOY_TESTS}" == "true" ]]; then
make deploy-summary;
fi'
- |
if [ "${PREPARE_DOCS}" == "1" ]; then
make check;
else
make instcheck;
fi
- |
if [[ $TRAVIS_BRANCH =~ ${deployable}$ && "${DEPLOY_TESTS}" == "true" ]]; then
make deploy-summary;
fi
deploy:
provider: "script"
Expand Down
10 changes: 10 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
Changes
-------

0.99.9
======

- add `viscid.mfield` that mimics `numpy.mgrid`
- slice-by-value should now be done with imaginary numbers instead of strings encoded like '0.0f'. The string-'f' format will continue to be supported, but imaginary numbers are cleaner for this purpose.
- slice-by-array and slice-by-mask (bool array) are now allowed
- indexing rules got their own page in the docs
- add `viscid.rotation` module for rotation matrix <-> euler angle <-> quaternion conversions
- add `viscid.to_dataframe` and `viscid.from_dataframe` to go between datasets and Pandas DataFrame objects

0.99.8
======

Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include viscid/calculator/*.c
include viscid/plot/images/*.jpg
include viscid/plot/styles/*.mplstyle
include sample/*
include viscid/sample/*
5 changes: 1 addition & 4 deletions doc/_bstemplates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,5 @@
<link rel="apple-touch-icon-precomposed" href="{{ pathto('_static/Vicon_128.png', 1) }}">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="stylesheet" href="{{ pathto('_static/my-css.css', 1) }}" type="text/css" />
{% endblock %}

{% if not bootswatch_css_custom %}
{% set bootswatch_css_custom = ['_static/my-css.css'] %}
{% endif %}
7 changes: 7 additions & 0 deletions doc/api/viscid.rotation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
viscid.rotation module
======================

.. automodule:: viscid.rotation
:members:
:undoc-members:
:show-inheritance:
1 change: 1 addition & 0 deletions doc/api/viscid.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Submodules
viscid.npdatetime
viscid.parallel
viscid.pyeval
viscid.rotation
viscid.seed
viscid.sliceutil
viscid.tree
Expand Down
2 changes: 1 addition & 1 deletion doc/functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ Function Description
Mayavi Wrappers
~~~~~~~~~~~~~~~

Chances are that you want to use these functions. They let you make most Mayavi objects from Viscid data structures (i.e., Fields and SeedGens). In addition, all of these functions allow you to specify a Matplotlib colormap for the data, and it picks up the default colormaps from Matplotlib's rcParams and viscidrc files. How cool is that?
Chances are that you want to use these functions. They let you make most Mayavi objects from Viscid data structures (i.e., Fields and SeedGens). In addition, all of these functions allow you to specify a Matplotlib colormap for the data, and it picks up the default colormaps from Matplotlib's rcParams and viscidrc files. How cool is that

.. cssclass:: table-striped

Expand Down
Binary file modified doc/images/3d_cropped.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ Contents

installation
philosophy
indexing
tutorial/index
tips_and_tricks
functions
Expand Down
Loading

0 comments on commit dd921a6

Please sign in to comment.