Skip to content

Commit 1673c9c

Browse files
authored
Merge pull request #16 from openalea/release2025
[WIP] Release2025
2 parents e5f6242 + b1c9f30 commit 1673c9c

31 files changed

+431
-315
lines changed

.github/workflows/conda-package-build.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,19 @@ name: build_publish_anaconda
22

33
on:
44
push:
5-
branches:
5+
branches:
66
- '**'
77
tags:
88
- 'v*'
99
pull_request:
10-
branches:
10+
branches:
1111
- '**'
1212

1313
jobs:
1414
build:
1515
uses: openalea/github-action-conda-build/.github/workflows/conda-package-build.yml@main
16-
secrets:
16+
secrets:
1717
anaconda_token: ${{ secrets.ANACONDA_TOKEN }}
18+
with:
19+
python-minor-version: '[10]'
20+
label: latest

README.md

Lines changed: 5 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,17 @@ The **rsml** python package provides:
2424

2525
#### Conda
2626

27-
The **rsml** package is an openalea package that can be installed using conda. After installing conda, enter the following command on your conda environment::
27+
The **rsml** package is an openalea package that can be installed using conda or mamba:
2828

29-
conda install rsml -c openalea/label/unstable -c openalea
29+
mamba create -n rsml -c conda-forge -c openalea3 rsml
30+
mamba activate rsml
3031

3132

3233
#### From the source
3334

34-
The **rsml** package is an openalea package and thus requires openalea.deploy to be installed. To install it, go to the rsml folder and enter the following command::
35+
To install it, go to the rsml folder and enter the following command::
3536

36-
python setup.py install
37+
pip install .
3738

3839

3940
### Use
@@ -59,30 +60,3 @@ The **rsml** package is an openalea package and thus requires openalea.deploy to
5960
### Tutorial
6061

6162
[RSML tutorial in Python](http://nbviewer.ipython.org/github/RootSystemML/RSML-conversion-tools/blob/master/python/rsml/example/RSML%20tutorial%20in%20Python.ipynb)
62-
63-
64-
# Limit order 1(primary) order 2 (secondary)
65-
## 4/5 different array with key : plant
66-
- Total Length,
67-
- nb racine (t absolute) (P1),
68-
- primary length
69-
- nude tip length
70-
- frequency vs IBD (P2)
71-
72-
# Axis : time in raw
73-
## time is known
74-
75-
Plant Lateral lenght
76-
- Length by root (t) (question unit?)
77-
- time as col
78-
- name : Ln nth root along primary from base
79-
80-
Tab Position
81-
- col : L1 ... Ln
82-
- position on primary
83-
84-
85-
- # root , position lateral (from base , distance)
86-
87-
script : rsmlanalysis rsmls.txt| *.rsml
88-
TODO: define options to group all the analysis in a same file (csv) or in several files.

conda/meta.yaml

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,52 @@
1-
{% set data = load_setup_py_data() %}
1+
{% set pyproject = load_file_data('../pyproject.toml', from_recipe_dir=True) %}
2+
{% set name = pyproject.get('project').get('name') %}
3+
#{% set version = GIT_DESCRIBE_TAG | replace("v", "") %}
4+
{% set version = "1.4.0" %}
25

36
package:
4-
name: rsml
5-
version: {{ data.get('version') }}
7+
name: {{ name }}
8+
version: {{ version }}
69

710
source:
811
path: ..
912

1013
build:
1114
noarch: python
12-
preserve_egg_dir: True
1315
number: 0
14-
script: {{PYTHON}} setup.py install #--single-version-externally-managed --record=record.txt
16+
script_env:
17+
- SETUPTOOLS_SCM_PRETEND_VERSION={{version}}
18+
script: {{ PYTHON }} -m pip install . --no-deps --ignore-installed --no-build-isolation -vv
1519

1620
requirements:
1721
build:
18-
- python {{PY_VER}}
19-
- openalea.deploy
22+
- python {{ pyproject["project"]["requires-python"] }}
23+
{% for dep in pyproject["build-system"]["requires"] %}
24+
- {{ dep.lower() }}
25+
{% endfor %}
26+
2027
run:
21-
- python >=3.6
22-
- openalea.mtg
23-
- matplotlib
24-
- pandas
25-
- xlsxwriter
26-
- path
27-
- numpy
28+
- python {{ pyproject["project"]["requires-python"] }}
29+
{% for dep in pyproject["project"]["dependencies"] %}
30+
- {{ dep.lower() }}
31+
{% endfor %}
32+
{% for dep in pyproject["tool"]["conda"]["environment"]["dependencies"] %}
33+
- {{ dep.lower() }}
34+
{% endfor %}
2835

2936
test:
3037
requires:
31-
- pytest
32-
- openalea.deploy
38+
- pytest
3339
imports:
3440
- rsml
3541
source_files:
36-
- share/data/**
3742
- test/**
43+
- test/data/**
3844
commands:
3945
- cd test
4046
- pytest -v
4147

4248
about:
43-
home: http://github.com/openalea/RSML
44-
license: Cecill-c License
45-
summary: RSML - The language of root architecture
49+
summary: {{ pyproject["project"]["description"] }}
50+
license: {{ pyproject["project"]["license"] }}
51+
home: {{ pyproject["project"]["urls"]["Homepage"] }}
4652

doc/_static/openalea_web.svg

Lines changed: 24 additions & 0 deletions
Loading

example/RSML tutorial in Python.ipynb

Lines changed: 0 additions & 171 deletions
This file was deleted.

example/RSML_tutorial_in_Python.ipynb

Lines changed: 267 additions & 0 deletions
Large diffs are not rendered by default.

example/demo_plot_rsml.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
1-
from openalea.deploy.shared_data import shared_data
21

32
import rsml
43
from rsml import misc
54
from rsml import measurements
5+
from rsml.data import data_dir as rsml_dir
66

77
import numpy as np
88
from matplotlib import pyplot as plt
99
from glob import glob
1010
import os
1111

1212
# load rsml
13-
rsml_dir = shared_data(rsml.__path__)#,'AR570/2012_11_25_09h00_chl110_1_1.rsml')
14-
rsml_files = sorted(glob(rsml_dir/"AR570/*.rsml"))
15-
# rsml_file = "/home/fabrice/Documents/RSML/example/data/arabidopsis-simple.rsml"
13+
rsml_files = sorted(rsml_dir.glob("AR570/*.rsml"))
1614
def plot(x,y, label):
1715
l = plt.plot(x,y, '+')[0]
1816

@@ -62,14 +60,7 @@ def plot_from_file(rsml_file, ax, split_plant, label=""):
6260

6361
plt.ion()
6462
plt.clf()
65-
6663

67-
# plot last time step, for each plant
68-
#ax = plt.subplot(1,1,1)
69-
#filename = os.path.split(rsml_files[-1])[-1]
70-
#plot_from_file(rsml_files[-1], ax, split_plant=True)
71-
#ax.set_title("Individual plants at day 12")
72-
7364
# plot for each time step, no plant distinction
7465
ax = plt.subplot(1,1,1)#, sharex=ax, sharey=ax)
7566
days = [6,7,8,10,11,12]

example/testing_rsml.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import rsml
1010
from rsml.continuous import *
1111
from openalea.mtg import MTG, traversal
12-
from shared_functions import *
12+
1313

1414
def my_toporder(g, scale):
1515
# F. Bauget 2020-03-18 : testing RSML continuous from rsml2mtg() to hydroroot disctrete copied from rsml.continuous

pyproject.toml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
[build-system]
2+
requires = ["setuptools",
3+
"setuptools_scm",
4+
]
5+
build-backend = "setuptools.build_meta"
6+
7+
# enable dynamic versioning based on git tags
8+
[tool.setuptools_scm]
9+
10+
[project]
11+
name = "rsml"
12+
dynamic = ["version"]
13+
description = "RootSystemML (RSML) is a file format to represent root architectural data. This package is an openalea pckage to manage it, import/export between .rsml files and MTG, etc."
14+
readme = "README.md"
15+
authors = [
16+
{ name = "Christophe Pradal", email = "christophe.pradal@cirad.fr" }
17+
]
18+
license = "CECILL-C"
19+
license-files = ["LICEN[CS]E*"]
20+
keywords = ["OpenAlea", "RSML", "Plant Architecture"]
21+
requires-python = ">=3.9"
22+
classifiers = [
23+
"Intended Audience :: Science/Research",
24+
"Intended Audience :: Developers",
25+
"Programming Language :: Python :: 3 :: Only",
26+
"Programming Language :: Python :: 3.9",
27+
"Programming Language :: Python :: 3.10",
28+
"Programming Language :: Python :: 3.11",
29+
"Programming Language :: Python :: 3.12",
30+
"Topic :: Scientific/Engineering",
31+
]
32+
33+
dependencies = [
34+
"matplotlib",
35+
"pandas",
36+
"xlsxwriter",
37+
"path",
38+
"numpy",
39+
]
40+
41+
[project.urls]
42+
Homepage = "http://github.com/openalea/rsml"
43+
"Bug Tracker" = "https://github.com/openalea/rsml/issues"
44+
Discussions = "https://github.com/openalea/rsml/discussions"
45+
46+
[project.entry-points."wralea"]
47+
mtg = "rsml_wralea"
48+
49+
[project.optional-dependencies]
50+
test = [
51+
"pytest",
52+
]
53+
doc = [
54+
"sphinx-favicon",
55+
"sphinx-rtd-theme",
56+
"pydata-sphinx-theme",
57+
"myst-parser",
58+
"sphinx-favicon",
59+
"nbsphinx",
60+
]
61+
62+
# section specific to conda-only distributed package (not used by pip yet)
63+
# based on astk, used in hydroroot with a meta.yaml that only use metadata from
64+
# pyproject => only pyproject.toml must be modified
65+
[tool.conda.environment]
66+
channels = [
67+
"openalea3",
68+
"conda-forge"
69+
]
70+
dependencies = [
71+
"openalea.mtg",
72+
]
73+
74+
[tool.setuptools.packages.find]
75+
where = ["src"]
76+
namespaces = true
77+

0 commit comments

Comments
 (0)