Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
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
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build:
python: "mambaforge-22.9"

conda:
environment: doc/environment.yml
environment: conda/environment.yml

sphinx:
# Path to your Sphinx configuration file.
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# MetaFSPM
(Not yet)
[![Docs](https://readthedocs.org/projects/mtg/badge/?version=latest)](https://metafspm.readthedocs.io/)
(Not yet)
[![Build Status](https://github.com/openalea/mtg/actions/workflows/conda-package-build.yml/badge.svg?branch=master)](https://github.com/openalea/mtg/actions/workflows/conda-package-build.yml?query=branch%3Amaster)
Expand Down
7 changes: 0 additions & 7 deletions conda/environment.yaml

This file was deleted.

15 changes: 15 additions & 0 deletions conda/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: metafspm
channels:
- openalea3
- conda-forge
dependencies:
- python
- pyyaml
- numpy
- numba
- openalea.mtg
- pandas
- pip
# let pip install the rest using pyproject.toml (if you are okay with conda/pip mix)
- pip:
- -e .."[doc]"
36 changes: 24 additions & 12 deletions conda/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{% 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 = GIT_DESCRIBE_TAG | replace("v", "") %}
{% set version = environ.get('SETUPTOOLS_SCM_PRETEND_VERSION', "0.0.0.dev") %}
{% 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-environment', {}).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 }}
Expand All @@ -18,15 +18,17 @@ source:

build:
noarch: python
number: 0
preserve_egg_dir: True
string: py{{ PY_VER }}
# pip install options mainly ensure that dependencies are handled by conda (and not pip)
# --no-deps ensure pip will not install deps not declared in meta.yaml (but declared in pyproject.toml)
# --no-build-isolation ensure pip will not replace build deps declared in meta.yaml (and declared in pyproject.toml)
# --ignore-installed ensure that compiled files (accidentally present in sources or uncleaned locally) will be overwritten
script: {{ PYTHON }} -m pip install . --no-deps --ignore-installed --no-build-isolation -vv

requirements:
host:
build:
- python
{% for dep in build_deps %}
- {{ dep }}
Expand All @@ -38,20 +40,30 @@ requirements:
- {{ dep }}
{% endfor %}


test:
requires:
- pytest
- nbmake
{% for dep in test_deps %}
- {{ dep }}
{% endfor %}

imports:
- {{ name }}
- {{ pyproject["project"]["name"] }}

source_files:
- test/test_*.py
- doc/notebooks/*.ipynb
- test/**


commands:
- pytest -v
- pytest --nbmake
- cd test
- pytest -v

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

extra:
recipe-maintainers:
- GeraultTr
- pradal
File renamed without changes.
108 changes: 108 additions & 0 deletions doc/_static/openalea_web.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
html_context = {
# "github_url": "https://github.com", # or your GitHub Enterprise site
"github_user": "openalea",
"github_repo": "my_pkg",
"github_repo": "metafspm",
"github_version": "main",
"doc_path": "doc",
}
Expand All @@ -128,8 +128,8 @@
latex_elements = {
}
latex_documents = [
(master_doc, 'pkg_name.tex', u'pkg_name Documentation',
u'INRA / INRIA / CIRAD', 'manual'),
(master_doc, 'metafspm.tex', u'metafspm Documentation',
u'INRAE / inria / CIRAD', 'manual'),
]

# -- Options for manual page output ---------------------------------------
Expand Down
Empty file added doc/notebooks/nonempty.txt
Empty file.
23 changes: 15 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ include-package-data = false # force explicit declaration of data (disable autom
name = "openalea.metafspm"
authors = [
{ name = "Tristan Gérault", email = "tristan.gerault@inrae.fr" },
{ name = "Christophe Pradal", email = "christophe.pradal@fnria.fr" }
{ name = "Christophe Pradal", email = "christophe.pradal@cirad.fr" }
]
description = "FSPM modelling toolkit for OpenAlea"
description = "Generic Management of FSPM dynamic processes and scheduling for OpenAlea"
readme = "README.md"
license = "CECILL-C"
license-files = ["LICEN[CS]E*"]
requires-python = ">=3.8"
dynamic = ["version"]
classifiers = [
"Development Status :: 1 - Planning",
"Development Status :: 3 - Alpha Copy",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
#"License :: OSI Approved :: CeCILL-C License",
Expand All @@ -41,6 +41,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering",
"Framework :: OpenAlea",
]
Expand All @@ -50,17 +51,20 @@ classifiers = [
dependencies = []

# section specific to conda-only distributed package (not used by pip yet)
[tool.conda-environment]

[tool.conda.environment]

dependencies = [
"pyyaml"
"pyyaml",
"numpy",
"numba"
]

[project.optional-dependencies]
test = [
"pytest",
"nbmake"
"nbmake",
"pandas",
"openalea.mtg",
]
dev = [
"pytest >=6",
Expand All @@ -78,6 +82,9 @@ doc = [

[project.urls]
Repository = "https://github.com/openalea/metafpsm"
Homepage = "https://metafspm.readthedocs.io/"
"Bug Tracker" = "https://github.com/openalea/metafspm/issues"
Discussions = "https://github.com/openalea/metafspm/discussions"

[project.entry-points."wralea"]
"my_pkg" = "openalea.metafspm_wralea"
"metafspm" = "openalea.metafspm_wralea"
Loading
Loading