Skip to content
Merged
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
2 changes: 1 addition & 1 deletion image/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
# tell setup not to create a zip file but install the egg as a directory (recomended to be set to False)
zip_safe=False,
# Dependencies
setup_requires=['openalea.deploy'],
#setup_requires=['openalea.deploy'],
#install_requires=[],
#dependency_links=['http://openalea.gforge.inria.fr/pi'],

Expand Down
3 changes: 2 additions & 1 deletion pylab/src/openalea/oapylab/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,8 @@ def get_axes(self):
axes = [axes]
for axe in axes:
import matplotlib
assert axe.__module__ in [matplotlib.axes._axes.__name__,matplotlib.axes._subplots.__name__,matplotlib.projections.polar.__name__], 'input must be a valid axes from matplotlib.axes %s given for %s' % (type(axes), axes)
print('DEBUG : ', axe.__module__)
assert axe.__module__ in [matplotlib.axes._axes.__name__,matplotlib.projections.polar.__name__], 'input must be a valid axes from matplotlib.axes %s given for %s' % (type(axes), axes)
return axes


Expand Down
4 changes: 2 additions & 2 deletions pylab/src/openalea/pylab_decorators_wralea/py_pylab.py
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@ def __init__(self):
CustomizeAxes.__init__(self)

self.add_input(name='axes')
self.add_input(name='b', interface=IBool, value=True)
#self.add_input(name='b', interface=IBool, value=True)
self.add_input(name='which', interface=IEnumStr(list(tools.which.keys())), value='major')
self.add_input(name='linestyle', interface=IEnumStr(list(tools.linestyles.keys())), value='dotted')
self.add_input(name='color', interface=IEnumStr(list(tools.colors.keys())), value='black')
Expand All @@ -973,7 +973,7 @@ def __call__(self, inputs):
kwds['linestyle']=tools.linestyles[self.get_input("linestyle")]
kwds['color']=tools.colors[self.get_input("color")]
kwds['linewidth']=self.get_input("linewidth")
kwds['b']=self.get_input("b")
#kwds['b']=self.get_input("b")
kwds['which']=self.get_input("which")

axes = self.get_axes()
Expand Down
5 changes: 4 additions & 1 deletion pylab/src/openalea/pylab_plotting_wralea/py_pylab.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,10 @@ def call(self, plottype, kwds):
print('warning more x inputs than y inputs. correct the connectors')
for x,y in zip(xinputs, yinputs):
try:
output = plot(x, y, **kwds)
linestyle=kwds.get('linestyle', '-')
if 'linestyle' in kwds:
del kwds['linestyle']
output = plot(x, y, linestyle=linestyle, **kwds)
except:
#print kwds
raise ValueError("plot failed")
Expand Down
63 changes: 39 additions & 24 deletions stdlib/conda/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,44 +1,59 @@
{% set data = load_setup_py_data() %}
{% 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 = 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', {}).get('environment', {}).get('dependencies',[]) %}


package:
name: openalea.stdlib
version: {{ data.get('version') }}
name: {{ name }}
version: {{ version }}

source:
path: ..

build:
noarch: python
string: py{{ PY_VER }}
preserve_egg_dir: True
number: 0
script: {{PYTHON}} setup.py install
# 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:
build:
- python {{PY_VER}}
- setuptools
- openalea.deploy
host:
- python
{% for dep in build_deps %}
- {{ dep }}
{% endfor %}

run:
- python <3.11
- ipykernel
- configobj
- openalea.core
- python
{% for dep in deps + conda_deps %}
- {{ dep }}
{% endfor %}

test:
imports:
- openalea.core
requires:
- pytest
- nbmake
- setuptools
imports:
- openalea.core
- {{ name }}
source_files:
- test/
- test/*.py

- test/test_*.py
commands:
- cd test
- pytest -v test_*.py
- pytest -v
- pytest --nbmake

about:
home: {{ data.get('url') }}
license: Cecill-c License
summary: {{ data.get('description') }}

home: {{ home }}
license: {{ license }}
summary: {{ description }}
161 changes: 149 additions & 12 deletions stdlib/doc/conf.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,153 @@
import os,sys
# -*- coding: utf-8 -*-
import sys
import os

# read sphinx conf.py file
from openalea.misc.sphinx_configuration import *
from openalea.misc.sphinx_tools import sphinx_check_version
from openalea.deploy.metainfo import read_metainfo
import pydata_sphinx_theme # Pydata theme: https://pydata-sphinx-theme.readthedocs.io/en/stable/index.html

sphinx_check_version() # check that sphinx version is recent
metadata = read_metainfo('../metainfo.ini') # read metainfo from common file with setup.py
for key in ['version','project','release','authors', 'name', 'package']:
exec("%s = '%s'" % (key, metadata[key]))
from importlib.metadata import metadata
project='stdlib'
meta = metadata('openalea.' + project)
release = meta.get("version")
# for example take major/minor
version = ".".join(release.split('.')[:3])
author = meta['Author'].split(' <')[0]
desc = meta['Summary']
urls = {k:v for k,v in [item.split(',') for item in meta.get_all('Project-URL')]}

# by product that need to be updated:
latex_documents = [('contents', 'main.tex', project + ' documentation', authors, 'manual')]

project = project + '.' + package
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
# sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath('..')) # to include the root of the package

# -- General configuration ------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc', # support for automatic inclusion of docstring
'sphinx.ext.autosummary', # generates autodoc summaries
'sphinx.ext.doctest', # inclusion and testing of doctest code snippets
'sphinx.ext.intersphinx', # support for linking to other projects
'sphinx.ext.mathjax', # support for math equations
'sphinx.ext.ifconfig', # support for conditional content
'sphinx.ext.viewcode', # support for links to source code
'sphinx.ext.coverage', # includes doc coverage stats in the documentation
'sphinx.ext.todo', # support for todo items
'sphinx.ext.napoleon', # support for numpy and google style docstrings
"sphinx_favicon", # support for favicon
"sphinx_copybutton", # support for copybutton in code blocks
"nbsphinx", # for integrating jupyter notebooks
"myst_parser" # for parsing .md files
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
autosummary_generate = True
exclude_patterns = ['build', '_build', '_templates']
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
source_suffix = {
'.rst': 'restructuredtext',
'.md': 'markdown',
}
# The master toctree document.
master_doc = 'index'
# General information about the project.
copyright = u'Cecill-C INRAE / INRIA / CIRAD'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = "en"
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False

# -- Options for HTML output ----------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'pydata_sphinx_theme'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
html_theme_options = {
"header_links_before_dropdown": 6,
"sidebarwidth": 200,
"sticky_navigation": "false",
"collapse_navigation": "false",
"display_version": "true",
"icon_links": [
{
"name": "GitHub",
"url": urls['Repository'],
"icon": "fa-brands fa-github",
},
],
"show_version_warning_banner": True,
"footer_start": ["copyright"],
"footer_center": ["sphinx-version"],
"secondary_sidebar_items": {
"**/*": ["page-toc", "edit-this-page", "sourcelink"],
"examples/no-sidebar": [],
},
"use_edit_page_button": True,
}
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_logo = "_static/openalea_web.svg"
html_favicon = "_static/openalea_web.svg"
# If false, no module index is generated.
html_domain_indices = True
# If false, no index is generated.
html_use_index = True
# If true, the index is split into individual pages for each letter.
html_split_index = False
# If true, links to the reST sources are added to the pages.
html_show_sourcelink = True
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
html_show_copyright = True
# Output file base name for HTML help builder.
htmlhelp_basename = project + '_documentation'
# Add infomation about github repository
html_context = {
# "github_url": "https://github.com", # or your GitHub Enterprise site
"github_user": "openalea",
"github_repo": "openalea-components",
"github_version": "main",
"doc_path": "doc",
}

# -- Options for LaTeX output ---------------------------------------------
latex_elements = {
}
latex_documents = [
(master_doc, 'stdlib.tex', u'stdlib Documentation',
u'INRA / INRIA / CIRAD', 'manual'),
]

# -- Options for manual page output ---------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, project, project + ' Documentation',
[author], 1)
]

# -- Options for Texinfo output -------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, project, project + ' Documentation',
author, project, desc,
'Miscellaneous'),
]
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'python': ('https://docs.python.org/', None)}
Loading
Loading