Skip to content

Commit

Permalink
Version 0.3.0 (#124)
Browse files Browse the repository at this point in the history
* bibliography

* updates README and INSTALL, bumps version number
  • Loading branch information
glyg authored Jan 14, 2019
1 parent 5ace162 commit bcffb1f
Show file tree
Hide file tree
Showing 7 changed files with 104 additions and 68 deletions.
40 changes: 30 additions & 10 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,53 @@
Since version 0.3, tyssue depends on CGAL for collision detection, and thus a c++ compiler toolchain. It is thus advised to use conda for a simple installation procedure.

## Installing tyssue with conda

If you already have a conda environment ready:
```
conda install -c conda-forge tyssue
```

## From the beginnig
This will install tyssue and all its dependencies, with the pre-compiled binary parts.


## Installing from source

Those are the instructions to install the package from source on a
debian-like linux distribution. If you allready have a basic
scientific python stack, use it, don't install anaconda.

### Install a C++ compiler

### Get and install Anaconda
With an Debian like system, this is achieved by:

Go to http://continuum.io/downloads and grab anaconda for your
architecture, and follow up to date instructions there.x
```bash
sudo apt install build-essential cmake g++
```


### Install CGAL

If you don't want the whole distrib, you can alternatively download
[miniconda](http://conda.pydata.org/miniconda.html)
You can use a pre-packaged version for your OS. For Debian:
```bash
sudo apt install libcgal-dev
```
Note that you need version 4.7 or higher.

### Create a virtual environment with `conda`
If you need to install CGAL from source, here is a `cmake` command sufficient to later compile tyssue:

```bash
conda env create -f environment.yml # installs the dependencies
## activate the new environment
source activate tyssue
cd CGAL # This is the directory where the CGAL archive was uncompressed
mkdir build && cd build

# needs qt5 for imageio
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH=${PREFIX} \
-DCMAKE_INSTALL_PREFIX=${PREFIX} \
-DCGAL_INSTALL_LIB_DIR=lib \
-DWITH_CGAL_ImageIO=OFF -DWITH_CGAL_Qt5=OFF \
..
make install -j${CPU_COUNT}
```


Expand Down
36 changes: 15 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,25 +76,28 @@ edges**.

```python
## Core object
from tyssue.core.sheet import Sheet
from tyssue import Sheet
## Simple 2D geometry
from tyssue.geometry.planar_geometry import PlanarGeometry
from tyssue import PlanarGeometry
## Visualisation (matplotlib based)
from tyssue.draw.plt_draw import sheet_view
from tyssue.draw import sheet_view

sheet = Sheet.planar_sheet_2d('basic2D', nx=6, ny=7,
distx=1, disty=1)
PlanarGeometry.update_all(sheet)
sheet.sanitize()
fig, ax = sheet_view(sheet)
```

### Features

* Easy data manipulation.
* Multiple geometries (Sheets in 2D and 3D, monolayers, bulk, cell
centered models...).
* Multiple geometries (Sheets in 2D and 3D, monolayers, bulk).
* Easy to extend.
* 2D (matplotlib) and 3D (vispy) customisable visualisation.
* 2D (matplotlib) and 3D (ipyvolume) customisable visualisation.
* Easy quasistatic model definition.
* Self collision detection. **new in 0.3**


### Documentation

Expand All @@ -114,10 +117,10 @@ Unsubscribe ➙ https://framalistes.org/sympa/sigrequest/tyssue
* Bertrand Caré - @bcare
* Cyprien Gay - @cypriengay
* Guillaume Gay (maintainer) - @glyg
* Hadrien Mary (build wizard) - @hadim
* Hadrien Mary - @hadim
* François Molino
* Magali Suzanne
* Sophie Theis @sophietheis
* Sophie Theis - @sophietheis

## Dependencies

Expand All @@ -127,7 +130,7 @@ it's time to move on...

### Core

- CGAL > 4.4
- CGAL > 4.7
- Python >= 3.6
- numpy
- scipy
Expand Down Expand Up @@ -159,13 +162,6 @@ conda install -c conda-forge tyssue

See [INSTALL.md](INSTALL.md) for a step by step install, including the necessary python environment.

In a nutshell, install from github goes like that:

```bash
git clone https://github.com/DamCB/tyssue.git
cd tyssue/
python setup.py install
```

## Licence

Expand All @@ -174,15 +170,13 @@ Since version 0.3, this project is distributed under the terms of the [General P

Versions 2.4 and earlier were distributed under the [Mozilla Public Licence](https://www.mozilla.org/en-US/MPL/2.0/).

If GPL licencing is too restrictive for your intended usage, please contact the authors.
If GPL licencing is too restrictive for your intended usage, please contact the maintainer.

## Bibliography

* Here is a [Mendeley group](https://www.mendeley.com/groups/7132031/tyssue/) for the project's
bibliography

* There is also a good old [Bibtex file here](bibliography/tyssue.bib)
* There is a [Bibtex file here](bibliography/tyssue.bib) with collected relevant publications.

The tyssue library stemed from a refactoring of the `leg-joint` code used in [monier2015apico].


[monier2015apico]: Monier, B. et al. Apico-basal forces exerted by
Expand Down
52 changes: 39 additions & 13 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,57 @@

# What's new in 0.3

The codebase now uses [black](https://github.com/ambv/black) to format all the code base.
## Solvers

The `solvers.quasistatic.QSSolver` class provides a refactored solver that includes automatic Type 1, Type 3 and collision detection solving after each function evaluation. Use it with:

## Licence
```
solver = QSSolver(with_t1=True, with_t3=True, with_t3=True)
solver.find_energy_min(sheet, **minimize_kwargs)
```

We switched to GPL to be able to use CGAL without worrying. If this is
a problem to you, we can offer accomodations.
The function signature is a bit different from the previous `sheet_vertex_solver.Solver` as key-word arguments are directly passed to scipy `minimize` function. You thus need to replace:

## Vizualisation
```python
solver_kw = {'minimize': {'method': 'L-BFGS-B',
'options': {'ftol': 1e-8,
'gtol': 1e-8}}}
solver.find_energy_min(sheet, **solver_kw)
```

The use of the top level `draw.sheet_view` function is encouraged. It is now possible to specify visibility at the single face level with a `"visible"` column in the face DataFrame.
by:

```python
solver_kw = {'method': 'L-BFGS-B',
'options': {'ftol': 1e-8,
'gtol': 1e-8}}}
solver.find_energy_min(sheet, **solver_kw)
```

to use the new solver.
Note that `sheet_vertex_solver.Solver` is still available.

## Behavior

### Event management refactoring

We refactored event management with a keyword arguments only design to make passing complex parameter dictionnaries easier.

Actions and events where added for monolayer objects

Actions and events where added for monolayer objects.

There is now an option in the manager `append` methods kwargs to add unique event or not.

## Licence

We switched to GPL to be able to use CGAL without worrying. If this is
a problem to you, we can offer accomodations.

## Vizualisation

The use of the top level `draw.sheet_view` function is encouraged. It is now possible to specify visibility at the single face level with a `"visible"` column in the face DataFrame.


## Core

* Added a `History` class to handle time series of sheet movements
Expand All @@ -35,12 +64,6 @@ There is now an option in the manager `append` methods kwargs to add unique even
* Change 'sagittal' key word by 'lateral' key word



## Solvers

* Collisions (#102) detection


## Dynamics

### New quasitatic solver class.
Expand All @@ -58,6 +81,9 @@ There is now an option in the manager `append` methods kwargs to add unique even
* fixes reset_specs warning formatting bug
* Correction of segment category for new faces create in IH transition

## Misc

The codebase now uses [black](https://github.com/ambv/black) to format all the code base.

## Pruning

Expand Down
6 changes: 3 additions & 3 deletions doc/bibliography/tyssue.bib
Original file line number Diff line number Diff line change
Expand Up @@ -1011,7 +1011,7 @@ @incollection{swat_chapter_2012
url = {http://www.sciencedirect.com/science/article/pii/B9780123884039000138},
abstract = {The study of how cells interact to produce tissue development, homeostasis, or diseases was, until recently, almost purely experimental. Now, multi-cell computer simulation methods, ranging from relatively simple cellular automata to complex immersed-boundary and finite-element mechanistic models, allow in silico study of multi-cell phenomena at the tissue scale based on biologically observed cell behaviors and interactions such as movement, adhesion, growth, death, mitosis, secretion of chemicals, chemotaxis, etc. This tutorial introduces the lattice-based Glazier\textendash{}Graner\textendash{}Hogeweg (GGH) Monte Carlo multi-cell modeling and the open-source GGH-based CompuCell3D simulation environment that allows rapid and intuitive modeling and simulation of cellular and multi-cellular behaviors in the context of tissue formation and subsequent dynamics. We also present a walkthrough of four biological models and their associated simulations that demonstrate the capabilities of the GGH and CompuCell3D.},
booktitle = {Methods in {{Cell Biology}}},
series = {Computational Methods in Cell Biology},
series = {Computational {{Methods}} in {{Cell Biology}}},
publisher = {{Academic Press}},
urldate = {2016-11-03},
date = {2012},
Expand Down Expand Up @@ -2566,7 +2566,7 @@ @article{KongForcesdirectinggermband2017
abstract = {Body axis elongation by convergent extension is a conserved developmental process found in all metazoans. Drosophila embryonic germ-band extension is an important morphogenetic process during embryogenesis, by which the length of the germ-band is more than doubled along the anterior-posterior axis. This lengthening is achieved by typical convergent extension, i.e. narrowing the lateral epidermis along the dorsal-ventral axis and simultaneous extension along the anterior-posterior axis. Germ-band extension is largely driven by cell intercalation, whose directionality is determined by the planar polarity of the tissue and ultimately by the anterior-posterior patterning system. In addition, extrinsic tensile forces originating from the invaginating endoderm induce cell shape changes, which transiently contribute to germ-band extension. Here, we review recent progress in understanding of the role of mechanical forces in germ-band extension.},
journaltitle = {Mechanisms of Development},
shortjournal = {Mechanisms of Development},
series = {Roles of physical forces in development},
series = {Roles of Physical Forces in Development},
urldate = {2017-04-04},
date = {2017-04},
pages = {11-22},
Expand Down Expand Up @@ -2969,7 +2969,7 @@ @article{Blanchardpulsatileapicomedialcontractility2018
abstract = {We review recent developments in the understanding of the biomechanics of apicomedial actomyosin and how its contractility can tense and deform tissue. Myosin pulses are driven by a biochemical oscillator but how they are modulated by the mechanical context remains unclear. On the other hand, the emergence of tissue behaviour is highly dependent on the material properties of actin, on how strongly components are connected and on the influence of neighbouring tissues. We further review the use of constitutive equations in exploring the mechanics of epithelial apices dominated by apicomedial Myosin contractility.},
journaltitle = {Current Opinion in Genetics \& Development},
shortjournal = {Current Opinion in Genetics \& Development},
series = {Developmental mechanisms, patterning and evolution},
series = {Developmental Mechanisms, Patterning and Evolution},
urldate = {2018-08-01},
date = {2018-08-01},
pages = {78-87},
Expand Down
2 changes: 2 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ channels:
- conda-forge

dependencies:
- boost-cpp 1.68
- mpfr
- python>=3.6
- numpy
- scipy
Expand Down
23 changes: 11 additions & 12 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
## Thanks to them!
MAJOR = 0
MINOR = 3
MICRO = "rc2"
MICRO = 0
ISRELEASED = True
VERSION = "%d.%d.%s" % (MAJOR, MINOR, MICRO)

Expand Down Expand Up @@ -64,18 +64,17 @@ def get_version_info():
FULLVERSION = VERSION
if os.path.exists(".git"):
GIT_REVISION = git_version()
elif os.path.exists("tyssue/version.py"):
if os.path.exists("tyssue/version.py"):
# must be a source distribution, use existing version file
try:
from tyssue.version import git_revision as GIT_REVISION
except (ImportError, ModuleNotFoundError):
warnings.warn(
"Unable to import git_revision. Try removing "
"tyssue/version.py and the build directory "
"before building."
)
GIT_REVISION = ""

# read from it instead of importing to avoid importing
# the whole package
with open("tyssue/version.py", "r") as fh:
for line in fh.readlines():
if line.startswith("git_revision"):
GIT_REVISION = line.split("=")[-1][2:-2]
break
else:
GIT_REVISION = "Unknown"
else:
GIT_REVISION = "Unknown"

Expand Down
13 changes: 4 additions & 9 deletions tyssue/behaviors/event_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,22 +66,17 @@ def append(self, behavior, **kwargs):
behavior is a function whose signature is
..code :
behavior(sheet, manager, elem_id,
*args, **kwargs)
behavior(sheet, manager, **kwargs)
this function itself might populate the managers next deque
Parameters
----------
behavior : function
elem_id : int, default -1
the id of the affected element, leave to
to -1 if the behavior is not element specific
args : tuple, defaults to ()
extra arguments to the behavior function
kwargs : dict defaults to {}
extra keywords arguments to the behavior function
keywords arguments to the behavior function
if `"face_id"` is in the kwargs dictionnary,
the face with this id is used.
"""
if "face_id" in kwargs:
elem_id = kwargs["face_id"]
Expand Down

0 comments on commit bcffb1f

Please sign in to comment.