Skip to content

Commit

Permalink
Merge pull request #95 from rochefort-lab/rel_0.6.2
Browse files Browse the repository at this point in the history
REL: Release version 0.6.2
  • Loading branch information
scottclowe authored Mar 11, 2020
2 parents 317335d + eb02e7e commit c2f6aa7
Show file tree
Hide file tree
Showing 14 changed files with 136 additions and 52 deletions.
File renamed without changes.
File renamed without changes.
60 changes: 36 additions & 24 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ cache:
directories:
# Cache files downloaded by pip
- $HOME/.cache/pip
# Cache our miniconda download.
- $HOME/Downloads

###############################################################################
# version numbers
Expand All @@ -31,30 +33,33 @@ python:
# environment variables
env:
- TEST_NOTEBOOKS="false"
USE_OLDEST_DEPENDENCIES="false"
USE_OLDEST_DEPS="false"
- TEST_NOTEBOOKS="false"
USE_OLDEST_DEPENDENCIES="true"
USE_OLDEST_DEPS="true"
- TEST_NOTEBOOKS="true"
USE_OLDEST_DEPENDENCIES="false"
USE_OLDEST_DEPS="false"
- TEST_NOTEBOOKS="true"
USE_OLDEST_DEPENDENCIES="true"
USE_OLDEST_DEPS="true"

matrix:
exclude:
# Currently, SIMA cannot be installed on Python 3.7
- python: "3.7"
env: TEST_NOTEBOOKS="true" USE_OLDEST_DEPENDENCIES="false"
env: TEST_NOTEBOOKS="true" USE_OLDEST_DEPS="false"
- python: "3.7"
env: TEST_NOTEBOOKS="true" USE_OLDEST_DEPENDENCIES="true"
env: TEST_NOTEBOOKS="true" USE_OLDEST_DEPS="true"
# Currently, can't use our conda min numpy/scipy version detector on Travis
# with weird Python 3.7
- python: "3.7"
env: TEST_NOTEBOOKS="false" USE_OLDEST_DEPENDENCIES="true"
env: TEST_NOTEBOOKS="false" USE_OLDEST_DEPS="true"
allow_failures:
- env: TEST_NOTEBOOKS="true" USE_OLDEST_DEPENDENCIES="true"
- env: TEST_NOTEBOOKS="true" USE_OLDEST_DEPS="true"
# Currently, 'SIMA example.ipynb' is failing with Python 2.7.
- python: "2.7"
env: TEST_NOTEBOOKS="true" USE_OLDEST_DEPENDENCIES="false"
env: TEST_NOTEBOOKS="true" USE_OLDEST_DEPS="false"
# Mark as failure as soon as a required job fails. Otherwise, mark as success
# as soon the only remaining jobs are allowed to fail.
fast_finish: true

###############################################################################
# Setup the environment before installing
Expand All @@ -68,11 +73,11 @@ before_install:
# Check which versions of numpy and scipy we are using, then remove these
# lines from requirements.txt
- if [ -f requirements.txt ]; then
NUMPY_REQUIREMENT="$(grep '^numpy\([<>=!]\|$\)' requirements.txt)";
NUMPY_REQUIREMENT="$(grep '^numpy\([!<>=~ ]\|$\)' requirements.txt)";
echo "NumPy requirement is '$NUMPY_REQUIREMENT'";
SCIPY_REQUIREMENT="$(grep '^scipy\([<>=!]\|$\)' requirements.txt)";
SCIPY_REQUIREMENT="$(grep '^scipy\([!<>=~ ]\|$\)' requirements.txt)";
echo "SciPy requirement is '$SCIPY_REQUIREMENT'";
sed '/^\(num\|sci\)py\([<>=!]\|$\)/d' requirements.txt >
sed '/^\(num\|sci\)py\([!<>=~ ]\|$\)/d' requirements.txt >
requirements.txt.tmp &&
mv requirements.txt.tmp requirements.txt;
fi;
Expand All @@ -88,20 +93,21 @@ before_install:
# ---------------------------------------------------------------------------
# If we want to run the tests using the oldest set of dependencies we
# support, modify any *requirements*.txt files every '>=' becomes '=='.
- if [[ "$USE_OLDEST_DEPENDENCIES" == "true" ]]; then
# Undo swapping any requirements which say version>=, since they are for
# our environment markers.
- if [[ "$USE_OLDEST_DEPS" == "true" ]]; then
for FILE in *requirements*.txt; do
sed -e 's/>=/~=/g' $FILE > $FILE.tmp && mv $FILE.tmp $FILE;
sed -e 's/version\s*~=/version>=/g' $FILE > $FILE.tmp && mv $FILE.tmp $FILE;
done;
fi;
# ---------------------------------------------------------------------------
# The following is based on Minicoda's how-to Travis page
# http://conda.pydata.org/docs/travis.html
# ---------------------------------------------------------------------------
# Download miniconda. Only do this if the cached file isn't present.
# Download miniconda. No need to redownload if we already have the latest version cached.
- mkdir -p $HOME/Downloads;
if [ ! -f $HOME/Downloads/miniconda.sh ]; then
travis_retry wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O "$HOME/Downloads/miniconda.sh";
fi;
travis_retry wget -c https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O "$HOME/Downloads/miniconda.sh";
# Install miniconda to the home directory, if it isn't there already.
- if [ ! -d "$HOME/miniconda/bin" ]; then
if [ -d "$HOME/miniconda" ]; then rm -r "$HOME/miniconda"; fi;
Expand All @@ -127,15 +133,21 @@ before_install:
# possible requirement when scipy is being installed. The version of numpy
# we end up must still satisfy the original requirement.txt setting, and
# be from around the time of the oldest supported scipy release.
- if [[ "$USE_OLDEST_DEPENDENCIES" == "true" ]]; then
- if [[ "$USE_OLDEST_DEPS" == "true" ]]; then
if [[ "$SCIPY_REQUIREMENT" != "" ]]; then
SCIPY_REQUIREMENT="scipy==$(bash
./continuous_integration/conda_min_version.sh
SCIPY_VERSION="$(bash
./.ci/conda_min_version.sh
"$SCIPY_REQUIREMENT" "$TRAVIS_PYTHON_VERSION")";
if [[ "$SCIPY_VERSION" != "" ]]; then
SCIPY_REQUIREMENT="scipy==$SCIPY_VERSION";
fi;
elif [[ "$NUMPY_REQUIREMENT" != "" ]]; then
NUMPY_REQUIREMENT="numpy==$(bash
./continuous_integration/conda_min_version.sh
NUMPY_VERSION="$(bash
./.ci/conda_min_version.sh
"$NUMPY_REQUIREMENT" "$TRAVIS_PYTHON_VERSION")";
if [[ "$NUMPY_VERSION" != "" ]]; then
NUMPY_REQUIREMENT="numpy==$NUMPY_VERSION";
fi;
fi;
fi;
# Create the conda environment with pip, numpy and scipy installed (if they
Expand All @@ -152,7 +164,7 @@ before_install:
#
# This is because you have constrained the numpy version in requirements.txt
# to a more recent set of values (e.g. numpy>=1.9.0) than the scipy
# constraint (e.g. scipy>=0.12.0). The USE_OLDEST_DEPENDENCIES code has
# constraint (e.g. scipy>=0.12.0). The USE_OLDEST_DEPS code has
# looked up the oldest compatible version available on conda (scipy==0.12.0)
# but there is no numpy version for this which matches your constraint.
#
Expand Down Expand Up @@ -240,7 +252,7 @@ script:
fi;
# Test the notebooks
- if [[ "$TEST_NOTEBOOKS" == "true" ]]; then
./continuous_integration/test_notebooks.sh -i ./examples;
./.ci/test_notebooks.sh -i ./examples;
fi;

###############################################################################
Expand Down
25 changes: 25 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,31 @@ Categories for changes are: Added, Changed, Deprecated, Removed, Fixed,
Security.


Version `0.6.2 <https://github.com/rochefort-lab/fissa/tree/0.6.2>`__
---------------------------------------------------------------------

Release date: 2020-03-11.
Full commit changelog
`on github <https://github.com/rochefort-lab/fissa/compare/0.6.1...0.6.2>`__.

Fixed
~~~~~

- Specify a maximum version for tifffile dependency on Python <3.6, which
allows us to continue supporting Python 2.7 and 3.5, which otherwise
fail to import dependencies correctly.
(`#87 <https://github.com/rochefort-lab/fissa/pull/87>`__)
- Documentation fixes and updates.
(`#64 <https://github.com/rochefort-lab/fissa/pull/64>`__,
`#65 <https://github.com/rochefort-lab/fissa/pull/65>`__,
`#67 <https://github.com/rochefort-lab/fissa/pull/67>`__,
`#76 <https://github.com/rochefort-lab/fissa/pull/76>`__,
`#77 <https://github.com/rochefort-lab/fissa/pull/77>`__,
`#78 <https://github.com/rochefort-lab/fissa/pull/78>`__,
`#79 <https://github.com/rochefort-lab/fissa/pull/79>`__,
`#92 <https://github.com/rochefort-lab/fissa/pull/92>`__)


Version `0.6.1 <https://github.com/rochefort-lab/fissa/tree/0.6.1>`__
---------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion HOWTO_RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ Follow the instructions in the [PyPI tutorial](https://packaging.python.org/tuto
rm -rf dist
python -m pip install --upgrade setuptools wheel
python -m pip install --upgrade twine
python setup.py sdist bdist_wheel
python setup.py sdist bdist_wheel --universal
```

## 6. Test the submission
Expand Down
14 changes: 7 additions & 7 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007

Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

Expand Down Expand Up @@ -631,8 +631,8 @@ to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

{one line to give the program's name and a brief idea of what it does.}
Copyright (C) {year} {name of author}
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand All @@ -645,14 +645,14 @@ the "copyright" line and a pointer to where the full notice is found.
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
along with this program. If not, see <https://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

{project} Copyright (C) {year} {fullname}
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
Expand All @@ -664,11 +664,11 @@ might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
<https://www.gnu.org/licenses/>.

The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
<https://www.gnu.org/licenses/why-not-lgpl.html>.
34 changes: 26 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
|Gitter| |Travis| |Documentation| |Codecov| |Coveralls|
|Gitter| |PyPI badge| |Travis| |Documentation| |Codecov| |Coveralls|


FISSA
Expand All @@ -12,7 +12,9 @@ importing files stored in other formats.

For details of the algorithm, please see our `companion
paper <https://www.doi.org/10.1038/s41598-018-21640-2>`__ published in
Scientific Reports.
Scientific Reports. For the code used to generate the simulated data
in the companion paper, see the
`SimCalc repository <https://github.com/rochefort-lab/SimCalc/>`__.

FISSA is compatible with both Python 2.7 and Python 3.5+. Using Python 3
is strongly encouraged, as Python 2 will no longer be `maintained
Expand Down Expand Up @@ -181,11 +183,18 @@ interactive python session with the ``exit()`` command, or CTRL+D.
Folder Structure
----------------

continuous_integration/
~~~~~~~~~~~~~~~~~~~~~~~
A clone of this repository will contain directories detailed below.

Contains files necessary for deploying tests on continuous integration
servers. Users should ignore this directory.
docs/
~~~~~

Contains the source for the documentation, which is available online at
`<https://fissa.readthedocs.io>`_.
You can build a local copy of the documentation by running the command

::

make -C docs html

examples/
~~~~~~~~~
Expand Down Expand Up @@ -213,6 +222,12 @@ fissa/tests/
Contains tests for the toolbox, which are run to ensure it will work as
expected.

.ci/
~~~~

Contains files necessary for deploying tests on continuous integration
servers. Users should ignore this directory.

Citing FISSA
------------

Expand All @@ -223,7 +238,7 @@ S. W. Keemink, S. C. Lowe, J. M. P. Pakan, E. Dylda, M. C. W. van
Rossum, and N. L. Rochefort. FISSA: A neuropil decontamination toolbox
for calcium imaging signals, *Scientific Reports*, **8**\ (1):3493,
2018.
`DOI:10.1038/s41598-018-21640-2 <https://www.doi.org/10.1038/s41598-018-21640-2>`__.
`doi: 10.1038/s41598-018-21640-2 <https://www.doi.org/10.1038/s41598-018-21640-2>`__.

For your convenience, the FISSA package ships with a copy of this
citation in bibtex format, available at
Expand All @@ -238,7 +253,7 @@ reserved.

This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
Free Software Foundation; either version 3 of the License, or (at your
option) any later version.

This program is distributed in the hope that it will be useful, but
Expand All @@ -252,6 +267,9 @@ with this program. If not, see http://www.gnu.org/licenses/.
.. |Gitter| image:: https://badges.gitter.im/Join%20Chat.svg
:target: https://gitter.im/rochefort-lab/fissa
:alt: Join the FISSA chat
.. |PyPI badge| image:: https://badge.fury.io/py/fissa.svg
:target: https://badge.fury.io/py/fissa
:alt: Latest PyPI release
.. |Travis| image:: https://travis-ci.org/rochefort-lab/fissa.svg?branch=master
:target: https://travis-ci.org/rochefort-lab/fissa
:alt: Travis Build Status
Expand Down
2 changes: 1 addition & 1 deletion citation.bib
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ @article{fissa
and Dylda, Evelyn
and van Rossum, Mark C. W.
and Rochefort, Nathalie L.},
title={{FISSA}: A neuropil decontamination toolbox for calcium imaging signals},
title={{FISSA}: {A} neuropil decontamination toolbox for calcium imaging signals},
journal={Scientific Reports},
year={2018},
volume={8},
Expand Down
17 changes: 11 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,22 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import datetime
import os
import sys
sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath('../'))

from fissa import __meta__ as meta

from fissa import __meta__ as meta # noqa: E402


# -- Project information -----------------------------------------------------

import datetime
now = datetime.datetime.now()

project = meta.name.upper()
project_path = meta.path
author = meta.author
copyright = '{}, {}'.format(now.year, author)

Expand All @@ -40,7 +42,7 @@

def run_apidoc(_):
ignore_paths = [
os.path.join('..', project.lower(), 'tests'),
os.path.join('..', project_path, 'tests'),
]

argv = [
Expand All @@ -49,7 +51,7 @@ def run_apidoc(_):
"--separate", # Put each module file in its own page
"--module-first", # Put module documentation before submodule
"-o", "source/packages", # Output path
os.path.join("..", project.lower()),
os.path.join("..", project_path),
] + ignore_paths

try:
Expand All @@ -62,13 +64,16 @@ def run_apidoc(_):
argv.insert(0, apidoc.__file__)
apidoc.main(argv)


def retitle_modules(_):
pth = 'source/packages/modules.rst'
lines = open(pth).read().splitlines()
lines[0] = 'API'
lines[1] = '==='
# Overwrite the junk in the first two lines with a better title
lines[0] = 'API Reference'
lines[1] = '============='
open(pth, 'w').write('\n'.join(lines))


def setup(app):
app.connect('builder-inited', run_apidoc)
app.connect('builder-inited', retitle_modules)
Expand Down
2 changes: 1 addition & 1 deletion fissa/__meta__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = 'fissa'
path = name
version = '0.6.1'
version = '0.6.2'
author = "Sander Keemink & Scott Lowe"
author_email = "swkeemink@scimail.eu"
description = "A Python Library estimating somatic signals in 2-photon data"
Expand Down
Loading

0 comments on commit c2f6aa7

Please sign in to comment.