Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions .github/workflows/draft-pdf.yml

This file was deleted.

33 changes: 33 additions & 0 deletions .github/workflows/openalea_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: OpenAlea CI

on:
push:
branches:
- main
- master
tags:
- 'v*'
pull_request:
types:
- opened
- synchronize
- reopened
release:
types:
- published
workflow_dispatch:
inputs:
check_before_tag:
description: "Run OpenAlea CI pre-tag build"
required: false
default: "true"
type: boolean

run-name: >
${{ github.event_name == 'workflow_dispatch' && 'OpenAlea CI pre-tag build' || 'OpenAlea CI' }}

jobs:
build:
uses: openalea/action-build-publish-anaconda/.github/workflows/openalea_ci.yml@main
secrets:
anaconda_token: ${{ secrets.ANACONDA_TOKEN }}
35 changes: 0 additions & 35 deletions .github/workflows/test.yml

This file was deleted.

64 changes: 48 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@

A refactored and enhanced implementation of MAppleT/StocaTree. Original sources copied and modified from [openalea/incubator](https://github.com/openalea-incubator/MAppleT).

[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/jvail/vmapplet/master?urlpath=lab/tree/notebooks/simple_simulation.ipynb)


[![Docs](https://readthedocs.org/projects/vmapplet/badge/?version=latest)](https://vmapplet.readthedocs.io/en/latest/?badge=latest)
[![Build Status](https://github.com/openalea/vmapplet/actions/workflows/openalea_ci.yml/badge.svg)](https://github.com/openalea/vmapplet/actions/workflows/openalea_ci.yml)
[![Python Version](https://img.shields.io/badge/3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13-blue)](https://www.python.org/downloads/)
[![Anaconda-Server Badge](https://anaconda.org/openalea3/openalea.vmapplet/badges/version.svg)](https://anaconda.org/openalea3/openalea.vmapplet)
[![License](https://img.shields.io/badge/License--CeCILL-C-blue)](https://www.cecill.info/licences/Licence_CeCILL-C_V1-en.html)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/jvail/vmapplet/master?urlpath=lab/tree/notebooks/simple_simulation.ipynb)

## Major changes compared to MAppleT/StocaTree

* Build system and dependencies: All outdated and unmaintained dependencies have been removed or replaced
Expand All @@ -13,35 +19,61 @@ A refactored and enhanced implementation of MAppleT/StocaTree. Original sources
* Configuration: An extended simulation and a Markov model configuration file in toml format
* Jupyter integration: Run and visualize simulations in Jupyter lab notebooks

### Authors

> - Thomas Cokelaer
> - Colin Smith
> - Jan Vaillant
> - Frederic Boudon

### Institutes

CIRAD / inria / INRAE

### Status

Python package

### License

CecILL-C

## Install

A local conda/miniconda installation is required.
First clone/download the repository. The `mamba` install is optional but recommended.

#### Install mamba
### Installation

```sh
conda install mamba -n base -c conda-forge
#### for user
Creating a new conda environment with vmapplet and its dependencies installed
```bash
mamba create -n vmapplet -c openalea3 -c conda-forge openalea.vmapplet
```
In an existing conda environment:
```bash
mamba install -c openalea3 -c conda-forge openalea.vmapplet
```

#### Create environment - with a development install of VMappleT

```sh
mamba env create -f binder/environment.yml
# or
# conda env create -f binder/environment.yml
#### for developer
```bash
mamba env create -f ./conda/environment.yml
```

## Jupyter

```sh
conda activate vmapplet
jupyter lab --notebook-dir=notebooks
jupyter-lab --notebook-dir=notebooks
```

## Script
[//]: # (## Script)

```sh
activate vmapplet
python -m vmapplet vmapplet/data/simulation.toml out_folder
```
[//]: # ()
[//]: # (```sh)

[//]: # (activate vmapplet)

[//]: # (python -m vmapplet vmapplet/data/simulation.toml out_folder)

[//]: # (```)
23 changes: 23 additions & 0 deletions conda/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: vmapplet_dev
channels:
- openalea3
- conda-forge
dependencies:
- python
- jupyterlab
- jupyterlab_widgets
- ipywidgets
- toml
- matplotlib-base
- scipy
- openalea.lpy
- openalea.plantgl
- openalea.mtg
- xlrd
- pip
- numpy
- flake8
- mypy
- black
- pip:
- -e .."[doc, test]"
55 changes: 55 additions & 0 deletions conda/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{% set pyproject = load_file_data('../pyproject.toml', from_recipe_dir=True) %}
{% set name = pyproject.get('project').get('name') %}
{% set description = pyproject.get('project').get('description') %}
{% set version = environ.get('SETUPTOOLS_SCM_PRETEND_VERSION', "0.1.0.dev0") %}
{% set license = pyproject.get('project').get('license') %}
{% set home = pyproject.get('project', {}).get('urls', {}).get('Homepage', '') %}
{% set build_deps = pyproject.get("build-system", {}).get("requires", []) %}
{% set deps = pyproject.get('project', {}).get('dependencies', []) %}
{% set conda_deps = pyproject.get('tool', {}).get('conda', {}).get('environment', {}).get('dependencies',[]) %}
{% set test_deps = pyproject.get('project', {}).get('optional-dependencies', {}).get('test',[]) %}

package:
name: {{ name }}
version: {{ version }}

source:
path: ..

build:
noarch: python
number: 0
preserve_egg_dir: True
script:
- {{ PYTHON }} -m pip install . --no-deps --ignore-installed --no-build-isolation -vv

requirements:
host:
- python
{% for dep in build_deps %}
- {{ dep }}
{% endfor %}

run:
- python
{% for dep in deps + conda_deps %}
- {{ dep }}
{% endfor %}

test:
requires:
{% for dep in test_deps %}
- {{ dep }}
{% endfor %}
imports:
- openalea.vmapplet
source_files:
- test/**
commands:
- cd test
- pytest -v

about:
home: {{ home }}
summary: {{ description }}
license: {{ license }}
Loading
Loading