Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Packaging - Moving to pyproject.toml #38

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 8 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
18 changes: 13 additions & 5 deletions conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@ build:
noarch: python
preserve_egg_dir: True
number: 2
script: {{PYTHON}} setup.py install #--single-version-externally-managed --record=record.txt
#script: {{PYTHON}} setup.py install #--single-version-externally-managed --record=record.txt
script: {{ PYTHON }} -m pip install .
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need other options to pip install?

Copy link
Author

Choose a reason for hiding this comment

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

I would sugger to use:

--no-deps Don't install package dependencies.


requirements:
build:
- python {{PY_VER}}
- setuptools
- openalea.deploy
run:
- python >=3.6
- python >=3.10
Copy link
Contributor

Choose a reason for hiding this comment

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

Is Python 3.10 mandatory? Or can we have Python 3.7 or 3.8 as a minimal version?

- openalea.plantgl
- matplotlib
- pandas
Expand All @@ -33,14 +34,21 @@ test:
- openalea.mtg
source_files:
- share/data/**
- test/**
- test/data/**
- tests/**
- tests/data/**
commands:
- cd test
- cd tests
- pytest -v --ignore=test_aml.py --ignore=test_stat.py

about:
home: {{ data.get('url') }}
license: CeCILL-C
#license_family:
summary: {{ data.get('description') }}
#description: {{ data.get('long_description') }}
doc_url: http://github.com/openalea/mtg
dev_url: http://github.com/openalea/mtg

extra:
recipe-maintainers:
- pradal
32 changes: 32 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "openalea.mtg"
version = "0.1.0"
description = "Multiscale Tree Graph datastructure and interfaces"
readme = "README.rst"
authors = [
{ name = "Christophe Pradal", email = "[email protected]" }
]
license = { text = "CeCILL-C" }
keywords = ["OpenAlea", "MTG", "Plant Architecture", "Tree Graph"]
dependencies = []
Copy link
Contributor

Choose a reason for hiding this comment

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

Add the dependencies.
Document needed vs optional dependencies


[project.urls]
homepage = "http://github.com/openalea/mtg"

[tool.setuptools.packages.find]
where = ["src"]

#[tool.setuptools]
#packages = ["find_namespace:src"]
#namespace_packages = ["openalea"]
#package_dir = {"" = "src"}

#[tool.setuptools.dynamic]
#version = {file = "src/openalea/mtg/version.py"}
pellem marked this conversation as resolved.
Show resolved Hide resolved

#[tool.setuptools.entry-points.wralea]
#mtg = "openalea.mtg_wralea"
Copy link
Contributor

Choose a reason for hiding this comment

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

entry-point are also important both in pyproject.toml and conda/meta.yaml

File renamed without changes.
108 changes: 54 additions & 54 deletions test/data/agraf.drf → tests/data/agraf.drf
Original file line number Diff line number Diff line change
@@ -1,54 +1,54 @@
# Dressing file for apple trees
#SMBPath = D:/Documents/pradal/devlp/vplants/aml/databases/SMBFiles
SMBPath = ../../../databases/SMBFiles
SMBModel entrenoeud = nentn105
SMBModel entrenoeud2 = nentn104
SMBModel Feuille = feui146 #feui113
SMBModel Fruit = pommecyl
Class U = entrenoeud
Class B = entrenoeud
Class E = entrenoeud
Class Z = Feuille
Class A = Fruit
LeafClass = Z
FruitClass = A
LeafAlpha = 45
LeafBeta = 120
LeafLength = 100
LeafTopDiameter = 1000
LeafBottomDiameter = 1000
Phyllotaxy = 150
MinTopDiameter I = 50
MinBottomDiameter I = 50
MinTopDiameter U = 500
MinBottomDiameter U = 500
MinTopDiameter E = 500
MinBottomDiameter E = 500
MinTopDiameter B = 1
MinBottomDiameter B = 1
MinLength C = 5
MinLength E = 1
MinLength F = 0
MinLength B = 5
MinLength I = 5
MinLength U = 5
DiameterUnit = 10
LengthUnit = 1
Alpha = Relative
# Dressing file for apple trees

#SMBPath = D:/Documents/pradal/devlp/vplants/aml/databases/SMBFiles
SMBPath = ../../../databases/SMBFiles

SMBModel entrenoeud = nentn105
SMBModel entrenoeud2 = nentn104
SMBModel Feuille = feui146 #feui113
SMBModel Fruit = pommecyl

Class U = entrenoeud
Class B = entrenoeud
Class E = entrenoeud

Class Z = Feuille
Class A = Fruit

LeafClass = Z
FruitClass = A

LeafAlpha = 45
LeafBeta = 120
LeafLength = 100
LeafTopDiameter = 1000
LeafBottomDiameter = 1000


Phyllotaxy = 150

MinTopDiameter I = 50
MinBottomDiameter I = 50

MinTopDiameter U = 500
MinBottomDiameter U = 500

MinTopDiameter E = 500
MinBottomDiameter E = 500

MinTopDiameter B = 1
MinBottomDiameter B = 1

MinLength C = 5
MinLength E = 1
MinLength F = 0
MinLength B = 5
MinLength I = 5
MinLength U = 5


DiameterUnit = 10
LengthUnit = 1

Alpha = Relative

18 changes: 9 additions & 9 deletions test/data/leaf_axis.drf → tests/data/leaf_axis.drf
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
SMBPath = D:/Documents/pradal/devlp/vplants/aml/databases/SMBFiles
#SMBPath = ../../../databases/SMBFiles
SMBModel feuille = feui136 #feui113
# Geometry = ../../../databases/GEOMFiles/leaf.geom
# contains symbol a_leaf
Class F = feuille
SMBPath = D:/Documents/pradal/devlp/vplants/aml/databases/SMBFiles
#SMBPath = ../../../databases/SMBFiles
Copy link
Contributor

Choose a reason for hiding this comment

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

PATh are only valid on windows on a specific computer. Make this system independent

Copy link
Author

Choose a reason for hiding this comment

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

Where should be located this folder (SMBFiles) ? It does not appear to be in the git repo


SMBModel feuille = feui136 #feui113

# Geometry = ../../../databases/GEOMFiles/leaf.geom
# contains symbol a_leaf

Class F = feuille
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 9 additions & 9 deletions test/data/noyer.drf → tests/data/noyer.drf
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Dressing file for WalnuTree trees
#SMBPath = D:/Documents/pradal/devlp/vplants/aml/databases/SMBFiles
#SMBPath = ../../databases/SMBFiles
#SMBModel entrenoeud = nentn105
DiameterUnit = 10
# Dressing file for WalnuTree trees

#SMBPath = D:/Documents/pradal/devlp/vplants/aml/databases/SMBFiles
#SMBPath = ../../databases/SMBFiles

#SMBModel entrenoeud = nentn105

DiameterUnit = 10

44 changes: 22 additions & 22 deletions test/data/oaktree.drf → tests/data/oaktree.drf
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# Dressing file for oak trees
SMBPath = D:/Documents/pradal/devlp/vplants/aml/databases/SMBFiles
#SMBPath = ../../databases/SMBFiles
SMBModel node = nentn105
SMBModel leaf = fchene
Class Z = leaf
LeafClass = Z
MinTopDiameter E = 1
MinBottomDiameter E = 1
MinLength E = 10
DiameterUnit = 10
LengthUnit = 1
# Dressing file for oak trees

SMBPath = D:/Documents/pradal/devlp/vplants/aml/databases/SMBFiles
#SMBPath = ../../databases/SMBFiles

SMBModel node = nentn105
SMBModel leaf = fchene

Class Z = leaf

LeafClass = Z

MinTopDiameter E = 1
MinBottomDiameter E = 1

MinLength E = 10

DiameterUnit = 10
LengthUnit = 1



14 changes: 7 additions & 7 deletions test/data/origin.drf → tests/data/origin.drf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
MinTopDiameter E = 10
MinBottomDiameter E = 10
MinLength E = 10
MinTopDiameter E = 10
MinBottomDiameter E = 10
MinLength E = 10




Loading
Loading