Skip to content

Commit

Permalink
Merge branch 'release-v1.3': kafe release 1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dsavoiu committed Jun 14, 2017
2 parents f973b08 + 50f1853 commit 7f850cd
Show file tree
Hide file tree
Showing 197 changed files with 3,354 additions and 31,615 deletions.
58 changes: 34 additions & 24 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
sudo: false

# only one TRAVIS_PYTHON_VERSION
language: python
python:
- 2.7

# use cache for pip (especially for scipy)
cache:
pip: true
custom_install: true

virtualenv:
system_site_packages: true
# matrix of several CONDA_PYTHON_VERSIONs
env:
matrix:
- CONDA_PYTHON_VERSION=2.7.9
- CONDA_PYTHON_VERSION=2.7.12
- CONDA_PYTHON_VERSION=3.5
- CONDA_PYTHON_VERSION=3.4

addons:
apt:
Expand All @@ -22,32 +23,41 @@ addons:
#- texlive-extra-utils
#- texlive-latex-extra
- dvipng
#- libfreetype6
- python-qt4
#don't install ROOT yet
#- root-system

before_install:
# create cache directory if none exists
- mkdir -p $HOME/.cache/pip/wheels
# upgrade pip to latest version
# get miniconda
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O $HOME/miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O $HOME/miniconda.sh;
fi
# install miniconda in batch mode and add to PATH
- bash $HOME/miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"

# configure conda for batch mode
- conda config --set always_yes yes --set changeps1 no
# update conda and show package/environment information
- conda update -q conda
- conda info -a

# install some dependencies with conda and activate environment
- conda create -q -n kafe_env python=$CONDA_PYTHON_VERSION numpy scipy tk matplotlib
- source activate kafe_env

# upgrade pip to latest version and install iminuit with pip
- pip install --upgrade pip
# get and build scipy, if not already cached
- travis_wait pip wheel --find-links=$HOME/.cache/pip/wheels --use-wheel --wheel-dir=$HOME/.cache/pip/wheels scipy
# install from cache
- pip install --no-index --find-links=$HOME/.cache/pip/wheels scipy
# install other dependencies
- pip install pytest
- pip install numpy
- pip install matplotlib
- pip install --upgrade iminuit
# check success
- python -c "import numpy"
- python -c "import scipy"
- python -c "import matplotlib"

# output python version to log
- python --version

install:
# install kafe from current directory using pip
- pip install -e .

script:
# run unittests with setup.py
- python setup.py test
26 changes: 21 additions & 5 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
master
v1.3.0
======
% [TODO] add unit test for input file parser

v1.3.0
% [NEW] make code compatible with both Python 2 and 3
% [NEW] add support for fits with correlated constraints
(example 11 added)
% [NEW] add support for multi-model fits with shared parameters
(example 13 added)
% [NEW] matplotlib 2.0 is now supported

% [REQ] require numpy version 1.11.2
% [REQ] require scipy version 0.17.0
% [REQ] require iminuit version 1.2
% [REQ] drop requirement for Qt (difficulty with conda):
make Tk the default backend

% [BUG] fixed bugs related to output stream redirection
% [FIX] running kafe in Jupyter Notebooks should now work
% [DOC] update documentation of examples

v1.2.0
======

% [FIX] make code Python 3 compatible.
Imports solved with try: Python2 variant; except ImportError: Python3 variant
% [NEW] add support for fits with correlated constraints
% several bugfixes

v1.1.0
======
Expand Down
28 changes: 15 additions & 13 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,26 +36,26 @@ or on `ReadTheDocs <http://kafe.readthedocs.org/en/latest/>`_.
Requirements
============

*kafe* needs some additional Python packages. The recommended versions of these are
*kafe* runs under both Python 2 (`>=2.7.9`) and Python 3 (tested with `3.5.2`).

Some additional Python packages are required. The recommended versions of these are
as follows. Please note that more recent versions of these packages should work
as well:

* `SciPy <http://www.scipy.org>`_ >= 0.12.0
* `NumPy <http://www.numpy.org>`_ >= 1.6.1
* `SciPy <http://www.scipy.org>`_ >= 0.17.0
* `NumPy <http://www.numpy.org>`_ >= 1.11.2
* `matplotlib <http://matplotlib.org>`_ >= 1.5.0


Additionally, a function minimizer is needed. *kafe* implements interfaces to two
function minimizers and requires at least one of them to be installed:

* *MINUIT*, which is included in *CERN*'s data analysis package `ROOT <http://root.cern.ch>`_ (>= 5.34), or
* `iminuit <https://github.com/iminuit/iminuit>`_ (>= 1.1.1), which is independent of ROOT
* `iminuit <https://github.com/iminuit/iminuit>`_ (>= 1.2), which is independent of ROOT


Finally, *kafe* requires a number of external programs:

* Qt4 (>= 4.8.5) and the Python bindings PyQt4 (>= 3.18.1) are needed because *Qt* is the supported
interactive frontend for matplotlib. Other frontends are not supported and may cause unexpected behavior.
* A *LaTeX* distribution (tested with `TeX Live <https://www.tug.org/texlive/>`_), since *LaTeX* is
used by matplotlib for typesetting labels and mathematical expressions.
* `dvipng <http://www.nongnu.org/dvipng/>`_ for converting DVI files to PNG graphics
Expand Down Expand Up @@ -94,6 +94,13 @@ In Fedora/RHEL/CentOS:
Install *ROOT*
--------------

**Note**: This section is written with ROOT version 5.34 in mind.
When using this version, take care that the Python bindings (PyROOT)
are compiled for the version of Python you intend to use (either 2.x or 3.x),
as it is not possible to use both. For newer versions of ROOT (i.e. 6 and
above), this should no longer be an issue.


ROOT and its Python bindings can be obtained via the package manager in
Ubuntu/Mint/Debian:

Expand All @@ -110,7 +117,7 @@ Or, in Fedora/RHEL/CentOS:
This setup is usually sufficient. However, you may decide to build ROOT yourself. In this case,
be sure to compile with *PyROOT* support. Additionally, for Python to see the *PyROOT* bindings,
the following environment variables have to be set correctly (:
the following environment variables have to be set correctly:

.. code:: bash
Expand All @@ -121,7 +128,6 @@ the following environment variables have to be set correctly (:
For more info, refer to `<http://root.cern.ch/drupal/content/pyroot>`_.


-----------------
Install `iminuit`
-----------------
Expand Down Expand Up @@ -210,11 +216,7 @@ Installation notes (Windows)
The recommended Python distribution for working with *kafe* under Windows is
`WinPython <https://winpython.github.io/>`_, which has the advantage that it is
portable and comes with a number of useful pre-installed packages. Particularly,
*NumPy*, *SciPy* and *matplotlib* are all pre-installed in *WinPython*, as are
all *Qt*-related dependencies.

Be sure to install *WinPython* version **2.7**, since *kafe* does not currently
run under Python 3.
*NumPy*, *SciPy* and *matplotlib* are all pre-installed in *WinPython*.

-----------------
Install `iminuit`
Expand Down
Binary file added doc/build/_static/img/kafe_example11_IU.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/build/_static/img/kafe_example11_TU.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/build/_static/img/kafe_example12_IU.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/build/_static/img/kafe_example12_TU.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 7f850cd

Please sign in to comment.