Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
e820ed8
WIP getting a working meson build
baugetfa Jun 3, 2025
7bff1df
a very simple example with 2 f90 that works
baugetfa Jun 4, 2025
7eee995
WIP working meson.build build-compil
baugetfa Jun 4, 2025
110434e
move alinea namespace to openalea
pradal Jun 4, 2025
e968e5b
remove backup files
pradal Jun 4, 2025
018e9cb
move alinea namespace to openalea
pradal Jun 4, 2025
676a17b
Update the meson strategy
pradal Jun 4, 2025
10f7a2a
update
pradal Jun 4, 2025
2b4e4b9
move alinea to openalea namespace
pradal Jun 4, 2025
3981c16
Fix error in the build
pradal Jun 4, 2025
7baeb07
Remove uneeded files
pradal Jun 4, 2025
f0d98ee
Update the conda stuff
pradal Jun 5, 2025
45472f8
Try to solve errors with pip and conda
pradal Jun 5, 2025
12861df
pip install working
baugetfa Jun 10, 2025
54a7497
conda build working
baugetfa Jun 10, 2025
b97db2f
First add packaging of python package
pradal Jun 10, 2025
5befca6
Add sub package interface
pradal Jun 10, 2025
35b98eb
Add python packaging
pradal Jun 10, 2025
9296b17
Remove no arch
pradal Jun 10, 2025
5feeb84
Fix error
pradal Jun 10, 2025
7eef715
Fix error in src names
pradal Jun 10, 2025
24a0e36
had to set a minimum numpy version
baugetfa Jun 10, 2025
7eef19d
Merge branch 'meson_baugetfa' of https://github.com/openalea-incubato…
baugetfa Jun 10, 2025
0844dde
local build and test ok
baugetfa Jun 12, 2025
e672ea6
local build + test working on py312
baugetfa Jun 12, 2025
ab69f16
Update conda-package-build.yml
baugetfa Jun 13, 2025
1abcddb
Update conda-package-build.yml
baugetfa Jun 13, 2025
7ffce88
version hardcoded in meta.yaml just for test
baugetfa Jun 13, 2025
62a42dc
Update conda-package-build.yml
baugetfa Jun 13, 2025
a8c56df
hardcoded version error
baugetfa Jun 13, 2025
c250fdf
Merge branch 'meson_baugetfa' of https://github.com/openalea-incubato…
baugetfa Jun 13, 2025
bfdad54
error, I put a comment at the end of a line of meta.yaml
baugetfa Jun 13, 2025
4e51cc5
fixed numpy version causes pb on gh action
baugetfa Jun 13, 2025
e80c89b
WIP gh action
baugetfa Jun 13, 2025
572ae6b
Update conda-package-build.yml
pradal Jun 13, 2025
c26c720
Update test_grid.py
pradal Jun 16, 2025
1e9ddec
correction test
baugetfa Jun 16, 2025
b2a2e65
Remove travis conf file
pradal Jun 16, 2025
0071772
Remove example of meson usage and f2py
pradal Jun 16, 2025
3c37288
test linux 312
baugetfa Jun 16, 2025
a3e2516
up
pradal Jun 16, 2025
d4efe5b
Update with doc
pradal Jun 16, 2025
3e936a4
Merge branch 'meson_baugetfa' of https://github.com/openalea-incubato…
pradal Jun 16, 2025
bae2a21
remove a test with a plot that failed
baugetfa Jun 16, 2025
a3cf59b
Merge branch 'meson_baugetfa' of https://github.com/openalea-incubato…
baugetfa Jun 16, 2025
17de3e8
remove a test with a display that failed
baugetfa Jun 16, 2025
e522fea
remove a test that failed
baugetfa Jun 16, 2025
f1b05f2
remove a test that failed
baugetfa Jun 16, 2025
f7e815c
remove the last test file
baugetfa Jun 16, 2025
d61bd26
remove a test
baugetfa Jun 16, 2025
e52071b
test windows CI 3.12
baugetfa Jun 16, 2025
f017f8b
test windows CI 3.12 added compiler(cxx)
baugetfa Jun 16, 2025
66937bb
test windows CI 3.12 removing compiler(c)
baugetfa Jun 16, 2025
ad13cf8
test CI 312 on the 3 os
baugetfa Jun 16, 2025
4844e65
fixed minimum numpy to 1.23 for 3.11 and 3.12
baugetfa Jun 17, 2025
549d94e
fixed minimum numpy to 1.22 for 3.10 to 3.12
baugetfa Jun 17, 2025
0246d67
correction according to review before merging
baugetfa Jun 18, 2025
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
36 changes: 27 additions & 9 deletions .github/workflows/conda-package-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,34 @@ name: build_publish_anaconda

on:
push:
branches:
- '**'
tags:
- 'v*'
branches:
- meson_baugetfa
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change it to main before merging

pull_request:
branches:
branches:
- '**'

jobs:
build:
uses: openalea/github-action-conda-build/.github/workflows/conda-package-build.yml@main
secrets:
anaconda_token: ${{ secrets.ANACONDA_TOKEN }}
build-and-publish:
name: ${{ matrix.os }}, Python 3.${{ matrix.python-minor-version }} for conda deployment
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
max-parallel: 6
matrix:
os: [ ubuntu-latest , macos-13 , windows-latest]
python-minor-version: [10, 11, 12]


steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build and Publish
uses: openalea/action-build-publish-anaconda@main
with:
conda: conda
python: ${{ matrix.python-minor-version }}
channels: openalea3, conda-forge
token: ${{ secrets.ANACONDA_TOKEN }}
publish: 'false'
label: main
build-options: ""
13 changes: 13 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2

build:
os: "ubuntu-22.04"
tools:
python: "mambaforge-22.9"

conda:
environment: conda/environment.yml

sphinx:
# Path to your Sphinx configuration file.
configuration: doc/conf.py
1 change: 0 additions & 1 deletion .travis.yml

This file was deleted.

25 changes: 0 additions & 25 deletions SConstruct

This file was deleted.

3 changes: 0 additions & 3 deletions TODO.txt

This file was deleted.

43 changes: 0 additions & 43 deletions conda/bld.bat

This file was deleted.

39 changes: 0 additions & 39 deletions conda/build.sh

This file was deleted.

16 changes: 16 additions & 0 deletions conda/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: ratp_dev
channels:
- openalea3
- conda-forge
dependencies:
- python
- pip
- pandoc
# list here manually conda-only deps (listed in [tool.conda.environment] section of pyproject)
- openalea.plantgl
- openalea.mtg
- pandas
- numpy
# let pip install the rest using pyproject.toml (if you are okay with conda/pip mix)
- pip:
- -e ..[doc,test]
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add blank line

99 changes: 61 additions & 38 deletions conda/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,49 +1,72 @@
{% 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 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 native = 'm2w64-' if win else '' %}

package:
name: alinea.pyratp
version: 2.0.1
name: {{ name }}
version: 1.0.0

source:
path: ..
path: ..

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

requirements:
host:
- python x.x
- setuptools
- numpy >=1.25 # [osx]
- numpy x.x # [not osx]
build:
- python {{PY_VER}}
- numpy x.x # [not osx]
- numpy >=1.25 # [osx]
- meson # Maybe deprecated for current version
- make
- {{ compiler('fortran') }} # [not win]
- {{ compiler('c') }}
#- compilers
- {{ native }}toolchain # [win]
- charset-normalizer
run:
- python x.x
- path.py
- {{ native }}toolchain # [win]
- {{ pin_compatible('numpy') }}
- scipy
- pandas
- meson # Maybe deprecated for current version
- charset-normalizer
host:
- python
{% for dep in build_deps %}
- {{ dep }}
{% endfor %}
build:
- python
{% for dep in build_deps %}
- {{ dep }}
{% endfor %}
- {{ compiler('fortran') }} # [not win]
- m2w64-gcc-fortran # [win]
# - {{ compiler('c') }}
#- compilers
- {{ native }}toolchain # [win]
- charset-normalizer
run:
- python
{% for dep in deps + conda_deps %}
- {{ dep }}
{% endfor %}
- {{ native }}toolchain # [win]
# - {{ pin_compatible('numpy') }}
- charset-normalizer

#- openalea.mtg
#- openalea.visualea
test:
imports:
- alinea.pyratp
- alinea.pyratp.pyratp
requires:
- pytest
{% for dep in deps + conda_deps %}
- {{ dep }}
{% endfor %}
imports:
- {{ name }}
source_files:
- test/test_*.py
- test/data/**
commands:
- cd test
- pytest -v --ignore=test_complet.py

about:
home: http://github.com/openalea-incubator/PyRATP
license: Cecill-C
summary: RATP is a model to compute Radiation Absorption, Transpiration and Photosynthesis.
home: {{ home }}
license: {{ license }}
summary: {{ description }}

extra:
recipe-maintainers:
- pradal
recipe-maintainers:
- pradal
- baugetfa
2 changes: 1 addition & 1 deletion example/ratp/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# TEST RATP module
###################
import os
from alinea.pyratp import pyratp
from openalea.ratp.pyratp import ratp
from numpy import *

njx = 2
Expand Down
10 changes: 5 additions & 5 deletions example/ratp_script.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import numpy as np
from alinea.pyratp.skyvault import Skyvault
from alinea.pyratp.grid import Grid
from alinea.pyratp.vegetation import Vegetation
from alinea.pyratp.micrometeo import MicroMeteo
from alinea.pyratp.runratp import runRATP
from openalea.ratp.pyratp.skyvault import Skyvault
from openalea.ratp.pyratp.grid import Grid
from openalea.ratp.pyratp.vegetation import Vegetation
from openalea.ratp.pyratp.micrometeo import MicroMeteo
from openalea.ratp.pyratp.runratp import runRATP

import sys

Expand Down
10 changes: 10 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
project('PyRATP', 'c',
version : '1.0.0',
license: 'CeCILL-C',
meson_version: '>=0.64.0',
default_options : ['warning_level=0'],
)

add_languages('fortran')

subdir('src/openalea/ratp')
18 changes: 0 additions & 18 deletions metainfo.ini

This file was deleted.

Loading
Loading