Skip to content

Commit

Permalink
Merge branch 'release/1.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
wmayner committed May 30, 2018
2 parents 951d491 + 5e2d226 commit d29e93a
Show file tree
Hide file tree
Showing 85 changed files with 2,182 additions and 1,750 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ __pycache__
**/*.egg-info
**/*.log
**/*.BACKUP
.tox
pyphi/data/hamming_matrices/10.npy
__pyphi_cache__
dist
Expand Down
7 changes: 7 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[settings]
line_length=80
indent=' '
default_section=THIRDPARTY
known_first_party=pyphi
known_third_party=
sections=FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
8 changes: 4 additions & 4 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# PyLint config for PyPhi code.
#
#
# Based on the PyLint config for Google's apitools:
# https://github.com/google/apitools/blob/master/default.pylintrc

Expand Down Expand Up @@ -53,14 +53,13 @@ disable =
cyclic-import,
fixme,
import-error,
invalid-name,
locally-disabled,
locally-enabled,
no-member,
no-name-in-module,
no-self-use,
super-on-old-class,
too-many-arguments,
too-many-function-args,


[REPORTS]
Expand Down Expand Up @@ -330,6 +329,7 @@ max-branches=21

# Maximum number of parents for a class (see R0901).
# DEFAULT: max-parents=7
max-parents=10

# Maximum number of attributes for a class (see R0902).
# DEFAULT: max-attributes=7
Expand All @@ -344,7 +344,7 @@ min-public-methods=0
# Maximum number of public methods for a class (see R0904).
# DEFAULT: max-public-methods=20
# RATIONALE: API mapping
max-public-methods=40
max-public-methods=45

[ELIF]
max-nested-blocks=6
Expand Down
20 changes: 6 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ sudo: false

branches:
only:
- master
- develop
- master
- develop
- scratch

# Setup databases
services:
Expand All @@ -17,20 +18,11 @@ python:
- "3.5"
- "3.6"

# Setup miniconda
before_install:
- wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
- chmod +x miniconda.sh
- ./miniconda.sh -b
- export PATH=/home/travis/miniconda3/bin:$PATH
# Update conda itself
- conda update --yes conda

# Install packages
install:
- conda create --yes --name=$TRAVIS_PYTHON_VERSION python=$TRAVIS_PYTHON_VERSION numpy scipy
- source activate $TRAVIS_PYTHON_VERSION
- pip install -r requirements.txt
- pip install --upgrade pip setuptools wheel
- pip install --only-binary=numpy numpy==1.14
- pip install --only-binary=scipy -r requirements.txt
- pip install coveralls
- pip freeze

Expand Down
44 changes: 43 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,49 @@
Changelog
=========

1.1.0
-----

### Fixes

- Fixed a memory leaked when concepts returned by parallel CES computations
were returned with distinct subsystem objects. Now all objects in a CES share
the same subsystem reference.
- Fixed a race condition caused by newly introduced `tqdm` synchronization.
Removed the existing `ProgressBar` implementation and pinned `tqdm` to
version >= 4.20.0.
- Made model hashes deterministic (6b59061). This fixes an issue with the Redis
MICE cache in which cached values were not shared between processes and
program invokations.

### API additions

- Added a `NodeLabels` object for managing the labels of network elements. Most
models now carry a `NodeLabels` instance that is used for string formatting.
- Added the `cut_node_labels` property to `Subsystem` and `MacroSubsystem`.
- Added `utils.time_annotated` decorator to measure execution speed.

### API changes

- Specifying the nodes of a `Subsystem` is now optional. If not provided, the
subsystem will cover the entire network.
- Removed the `labels2indices`, `indices2labels` and `parse_node_indices`
methods from `Network`, and the `indices2labels` method from `Subsystem`.
- Renamed `config.load_config_file` to `config.load_file`, and
`config.load_config_dict` to `config.load_dict`
- Removed backwards-compatible `Direction` import from `constants` module.
- Renamed `macro.coarse_grain` to `coarse_graining`.
- Exposed `coarse_grain`, `blackbox`, `time_scale`, `network_state` and
`micro_node_indices` as attributes of `MacroSubsystem`.

### Config

- Removed the `LOG_CONFIG_ON_IMPORT` configuration option.


1.0.0 :tada:
------------
_2017-12-21_

### API changes

Expand Down Expand Up @@ -65,7 +106,7 @@ modules.
#### Constants

- Renamed `Direction.PAST` to `Direction.CAUSE`
- Renamed `Direction.CAUSE` to `Direction.EFFECT`
- Renamed `Direction.FUTURE` to `Direction.EFFECT`

### API additions

Expand Down Expand Up @@ -107,6 +148,7 @@ modules.

0.9.1
-----
_2017-12-21_

### Fixes
- Refactored parallel processing support to fix an intermittent deadlock.
Expand Down
2 changes: 1 addition & 1 deletion INSTALLATION.rst
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,6 @@ like tab-completion. Once you've installed it, you can start the IPython
interpreter with the command ``ipython``.

Next, please see the documentation for some `examples
<https://pyphi.readthedocs.io/page/examples>`__ of how to use PyPhi and
<https://pyphi.readthedocs.io/page/examples/>`__ of how to use PyPhi and
information on how to `configure
<https://pyphi.readthedocs.io/page/configuration.html>`__ it.
10 changes: 7 additions & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
include README.rst
include LICENSE.md
include pyphi_config.yml
include README.md
include INSTALLATION.rst
include CACHING.rst
include LICENSE.md
include CHANGELOG.md
include pyphi_config.yml
include redis.conf
recursive-include pyphi/data *
20 changes: 11 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

.PHONY: test docs dist

src = pyphi
Expand All @@ -17,6 +16,9 @@ coverage:
coverage html
open htmlcov/index.html

lint:
pylint $(src)

watch-tests:
watchmedo shell-command \
--command='make coverage' \
Expand Down Expand Up @@ -53,17 +55,17 @@ upload-docs: build-docs
benchmark:
cd $(benchmarks) && asv continuous develop

check-readme:
python setup.py check -r -s
check-dist:
python setup.py check --strict

dist: build-dist check-readme
twine upload dist/*
dist: build-dist check-dist
twine upload $(dist_dir)/*

test-dist: build-dist check-readme
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
test-dist: build-dist check-dist
twine upload --repository-url https://test.pypi.org/legacy/ $(dist_dir)/*

build-dist: clean-dist
python setup.py sdist bdist_wheel
python setup.py sdist bdist_wheel --dist-dir=$(dist_dir)

clean-dist:
rm -r $(dist_dir)
rm -rf $(dist_dir)
167 changes: 167 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
<p>
<a href="http://pyphi.readthedocs.io/">
<img alt="PyPhi logo" src="https://github.com/wmayner/pyphi/raw/develop/docs/_static/pyphi-logo-text-760x180.png" height="90px" width="380px" style="max-width:100%">
</a>
</p>

[![Documentation badge](https://readthedocs.org/projects/pyphi/badge/?style=flat-square&maxAge=600)](https://pyphi.readthedocs.io/)
[![Travis build badge](https://img.shields.io/travis/wmayner/pyphi.svg?style=flat-square&maxAge=600)](https://travis-ci.org/wmayner/pyphi)
[![Coveralls.io badge](https://img.shields.io/coveralls/wmayner/pyphi/develop.svg?style=flat-square&maxAge=600)](https://coveralls.io/github/wmayner/pyphi?branch=develop)
[![License badge](https://img.shields.io/github/license/wmayner/pyphi.svg?style=flat-square&maxAge=86400)](https://github.com/wmayner/pyphi/blob/master/LICENSE.md)
[![Python versions badge](https://img.shields.io/pypi/pyversions/pyphi.svg?style=flat-square&maxAge=86400)](https://wiki.python.org/moin/Python2orPython3)

PyPhi is a Python library for computing integrated information (𝚽), and the
associated quantities and objects.

**If you use this code, please cite the manuscript:**

---

Mayner WGP, Marshall W, Albantakis L, Findlay G, Marchman R, Tononi G (2017).
[PyPhi: A toolbox for integrated
information](https://arxiv.org/abs/1712.09644). arXiv:1712.09644 \[q-bio.NC\].

---

The manuscript is available at <https://arxiv.org/abs/1712.09644>.


## Usage, Examples, and API documentation

- [Documentation for the latest stable
release](http://pyphi.readthedocs.io/en/stable/)
- [Documentation for the latest (potentially unstable) development
version](http://pyphi.readthedocs.io/en/latest/).
- Documentation is also available within the Python interpreter with the `help`
function.


## Installation

Set up a Python 3 virtual environment and install with

```bash
pip install pyphi
```

To install the latest development version, which is a work in progress and may
have bugs, run:

```bash
pip install "git+https://github.com/wmayner/pyphi@develop#egg=pyphi"
```

**Note:** this software is only supported on Linux and macOS. However, if you
use Windows, you can run it by using the [Anaconda
Python](https://www.anaconda.com/what-is-anaconda/) distribution and
[installing PyPhi with conda](https://anaconda.org/wmayner/pyphi):

```bash
conda install -c wmayner pyphi
```

### Detailed installation guide for Mac OS X

[See here](https://github.com/wmayner/pyphi/blob/develop/INSTALLATION.rst).


## User group

For discussion about the software or integrated information theory in general,
you can join the [pyphi-users
group](https://groups.google.com/forum/#!forum/pyphi-users).

For technical issues with PyPhi or feature requests, please use the [issues
page](https://github.com/wmayner/pyphi/issues).


## Contributing

To help develop PyPhi, fork the project on GitHub and install the requirements
with

```bash
pip install -r requirements.txt
```

The `Makefile` defines some tasks to help with development:

```bash
make test
```

runs the unit tests every time you change the source code.

```bash
make benchmark
```

runs performance benchmarks.

```bash
make docs
```

builds the HTML documentation.

### Developing on Linux

Make sure you install the C headers for Python 3, SciPy, and NumPy
before installing the requirements:

```bash
sudo apt-get install python3-dev python3-scipy python3-numpy
```


## Credit

### Please cite these papers if you use this code:

Mayner WGP, Marshall W, Albantakis L, Findlay G, Marchman R, Tononi G (2017).
[PyPhi: A toolbox for integrated
information](https://arxiv.org/abs/1712.09644). arXiv:1712.09644 \[q-bio.NC\].

```
@article{mayner2017pyphi,
title={PyPhi: A toolbox for integrated information},
author={Mayner, William, Gerald Paul AND Marshall, William AND
Albantakis, Larissa AND Findlay, Graham AND
Marchman, Robert AND Tononi, Giulio},
journal={arXiv:1712.09644 [q-bio.NC]},
year={2017},
month={12},
url={https://arxiv.org/abs/1712.09644}
}
```

Albantakis L, Oizumi M, Tononi G (2014). [From the Phenomenology to the
Mechanisms of Consciousness: Integrated Information Theory
3.0](http://www.ploscompbiol.org/article/info%3Adoi%2F10.1371%2Fjournal.pcbi.1003588).
PLoS Comput Biol 10(5): e1003588. doi: 10.1371/journal.pcbi.1003588.

```
@article{iit3,
title={From the Phenomenology to the Mechanisms of Consciousness:
author={Albantakis, Larissa AND Oizumi, Masafumi AND Tononi, Giulio},
Integrated Information Theory 3.0},
journal={PLoS Comput Biol},
publisher={Public Library of Science},
year={2014},
month={05},
volume={10},
pages={e1003588},
number={5},
doi={10.1371/journal.pcbi.1003588},
url={http://dx.doi.org/10.1371%2Fjournal.pcbi.1003588}
}
```

This project is inspired by a [previous
project](https://github.com/albantakis/iit) written in Matlab by L. Albantakis,
M. Oizumi, A. Hashmi, A. Nere, U. Olces, P. Rana, and B. Shababo.

Correspondence regarding this code and the PyPhi paper should be directed to
Will Mayner, at [<[email protected]>](mailto:[email protected]). Correspondence
regarding the Matlab code and the IIT 3.0 paper should be directed to Larissa
Albantakis, PhD, at [<[email protected]>](mailto:[email protected]).
Loading

0 comments on commit d29e93a

Please sign in to comment.