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 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
12 changes: 10 additions & 2 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 . --no-deps

requirements:
build:
- python {{PY_VER}}
- setuptools
- openalea.deploy
run:
- python >=3.6
- python
- openalea.plantgl
- matplotlib
- pandas
Expand All @@ -42,5 +43,12 @@ test:
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
45 changes: 45 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "openalea.mtg"
dynamic = ["version"]
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 = [
"openalea.plantgl",
Copy link
Contributor

Choose a reason for hiding this comment

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

openalea.plantgl is not pip installable. Is it a problem?

"matplotlib",
"pandas"
]

[project.optional-dependencies]
test = [
"pytest",
"path",
"openalea.lpy"
]

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

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

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

#[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


#[tool.setuptools.dynamic]
#version = {file = "src/openalea/mtg/version.py"}
4 changes: 2 additions & 2 deletions src/openalea/mtg/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
major = 2
"""(int) Version major component."""

minor = 2
minor = 3
"""(int) Version minor component."""

post = 0
post = 1
Copy link
Contributor

Choose a reason for hiding this comment

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

2.3.0 is better

"""(int) Version post or bugfix component."""

__version__ = ".".join([str(s) for s in (major, minor, post)])
Expand Down
108 changes: 54 additions & 54 deletions test/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
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

SMBModel feuille = feui136 #feui113

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

Class F = feuille
18 changes: 9 additions & 9 deletions test/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
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
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