Skip to content

Commit 74e3e01

Browse files
authored
Merge pull request #58 from openalea/doc
Updating doc
2 parents 99cbef0 + b9805a0 commit 74e3e01

9 files changed

Lines changed: 195 additions & 204 deletions

File tree

.readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: 2
22

33
build:
4-
os: "ubuntu-22.04"
4+
os: "ubuntu-24.04"
55
tools:
66
python: "mambaforge-22.9"
77

README.md

Lines changed: 44 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,60 @@
1-
# OpenAlea.Visualea
1+
# Visualea
2+
[![Docs](https://readthedocs.org/projects/visualea/badge/?version=latest)](https://visualea.readthedocs.io/)
3+
[![Build Status](https://github.com/openalea/visualea/actions/workflows/conda-package-build.yml/badge.svg?branch=master)](https://github.com/openalea/visualea/actions/workflows/conda-package-build.yml?query=branch%3Amaster)
4+
[![Python Version](https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13-blue)](https://www.python.org/downloads/)
5+
[![License](https://img.shields.io/badge/License--CeCILL-C-blue)](https://www.cecill.info/licences/Licence_CeCILL-C_V1-en.html)
6+
[![Anaconda-Server Badge](https://anaconda.org/openalea3/visualea/badges/version.svg)](https://anaconda.org/openalea3/visualea)
27

3-
OpenAlea.Visualea is the Visual Programming Environment of OpenAlea. It allows using OpenAlea packages
4-
without programming language knowledge and to build dataflow graphically.
8+
![visualea main window](https://github.com/openalea/visualea/blob/master/doc/_static/visualea.png?raw=true "visualea main window")
9+
10+
## Software
11+
12+
### Authors
13+
14+
> - Christophe Pradal
15+
16+
### Institutes
17+
18+
CIRAD / INRAE / inria
19+
20+
### Status
21+
22+
Python package
523

24+
### License
625

7-
## License
26+
CecILL-C
827

9-
OpenAlea.Visualea is released under a Cecill v2 license.
28+
**URL** : <https://visualea.rtfd.io>
1029

11-
See LICENSE.txt
12-
Nota : Cecill v2 license is a GPL compatible license.
30+
## About
1331

14-
## Installation user mode
32+
OpenAlea.Visualea is the Visual Programming Environment of OpenAlea. It allows using OpenAlea packages
33+
without programming language knowledge and to build dataflow graphically.
34+
35+
## Installation
36+
37+
### user mode
1538

1639
```bash
1740
mamba create -n visualea -c openalea3 -c conda-forge openalea.visualea
1841
mamba activate visualea
1942
```
2043

21-
## Installation dev mode
44+
### for developer, in an existing environment
2245

23-
- Clone the repository
24-
- Use the following command
25-
2646
```bash
27-
mamba create -f conda/environment.yml
28-
mamba activate visualea
47+
git clone 'https://github.com/openalea/visualea.git'
48+
cd visualea
49+
mamba install --only-deps -c openalea3 -c conda-forge openalea.visualea
50+
pip install -e .[options]
2951
```
52+
`[options]` is optional, and allows to install additional dependencies
53+
defined in the `[project.optional-dependencies]` section of your
54+
pyproject.toml file (usually "dev", or "doc", ...)
3055

31-
The first command will create the *visualea* environment with the dependencies and install
32-
**openalea.visualea** in it with `pip install . -e`. The second will activate the environment.
33-
56+
### for developer, in a new clean isolated environment
57+
```bash
58+
mamba env create -f conda/environment.yml
59+
mamba activate visualea
60+
```

conda/environment.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ dependencies:
88
- pip
99
- qtconsole
1010
- QtPy
11-
- scipy
1211
- openalea.core
1312
- openalea.scipack
1413
- openalea.oalab

doc/_static/ipython.png

7.02 KB
Loading

doc/_static/visualea.png

130 KB
Loading

doc/conf.py

Lines changed: 60 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,96 +1,90 @@
11
# -*- coding: utf-8 -*-
2-
import os
32
import sys
4-
from importlib.metadata import metadata
3+
import os
4+
5+
import pydata_sphinx_theme # Pydata theme: https://pydata-sphinx-theme.readthedocs.io/en/stable/index.html
56

6-
pkg_name='visualea'
7-
meta = metadata('openalea.' + pkg_name)
7+
from importlib.metadata import metadata
8+
project='visualea'
9+
meta = metadata('openalea.' + project)
810
release = meta.get("version")
911
# for example take major/minor
1012
version = ".".join(release.split('.')[:3])
11-
author = meta['Author'].split(',')[0] + "et al."
13+
author = meta['Author'].split(' <')[0]
1214
desc = meta['Summary']
15+
urls = {k:v for k,v in [item.split(',') for item in meta.get_all('Project-URL')]}
16+
1317

1418
# If extensions (or modules to document with autodoc) are in another directory,
1519
# add these directories to sys.path here. If the directory is relative to the
1620
# documentation root, use os.path.abspath to make it absolute, like shown here.
1721
# sys.path.insert(0, os.path.abspath('.'))
18-
sys.path.insert(0, os.path.abspath("..")) # to include the root of the package
22+
sys.path.insert(0, os.path.abspath('..')) # to include the root of the package
1923

2024
# -- General configuration ------------------------------------------------
2125
# Add any Sphinx extension module names here, as strings. They can be
2226
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
2327
# ones.
2428
extensions = [
25-
"sphinx.ext.autodoc", # support for automatic inclusion of docstring
26-
"sphinx.ext.autosummary", # generates autodoc summaries
27-
"sphinx.ext.doctest", # inclusion and testing of doctest code snippets
28-
"sphinx.ext.intersphinx", # support for linking to other projects
29-
"sphinx.ext.imgmath", # support for math equations
30-
"sphinx.ext.ifconfig", # support for conditional content
31-
"sphinx.ext.viewcode", # support for links to source code
32-
"sphinx.ext.coverage", # includes doc coverage stats in the documentation
33-
"sphinx.ext.todo", # support for todo items
34-
"sphinx.ext.napoleon", # support for numpy and google style docstrings
35-
"sphinx_favicon", # support for favicon
36-
"nbsphinx", # for integrating jupyter notebooks
37-
"myst_parser", # for parsing .md files
29+
'sphinx.ext.autodoc', # support for automatic inclusion of docstring
30+
'sphinx.ext.autosummary', # generates autodoc summaries
31+
'sphinx.ext.doctest', # inclusion and testing of doctest code snippets
32+
'sphinx.ext.intersphinx', # support for linking to other projects
33+
'sphinx.ext.mathjax', # support for math equations
34+
'sphinx.ext.ifconfig', # support for conditional content
35+
'sphinx.ext.viewcode', # support for links to source code
36+
'sphinx.ext.coverage', # includes doc coverage stats in the documentation
37+
'sphinx.ext.todo', # support for todo items
38+
'sphinx.ext.napoleon', # support for numpy and google style docstrings
39+
"sphinx_favicon", # support for favicon
40+
"sphinx_copybutton", # support for copybutton in code blocks
41+
"nbsphinx", # for integrating jupyter notebooks
42+
"myst_parser" # for parsing .md files
3843
]
39-
40-
41-
nbsphinx_thumbnails = {
42-
'examples/Segmentation': '_static/segmentation_thumb.png',
43-
}
44-
45-
nbsphinx_allow_errors = True
4644
# Add any paths that contain templates here, relative to this directory.
47-
templates_path = ["_templates"]
45+
templates_path = ['_templates']
4846
autosummary_generate = True
49-
exclude_patterns = ["_build", "_templates"]
47+
exclude_patterns = ['build', '_build', '_templates']
5048
# The suffix(es) of source filenames.
5149
# You can specify multiple suffix as a list of string:
5250
source_suffix = {
53-
".rst": "restructuredtext",
54-
".md": "markdown",
51+
'.rst': 'restructuredtext',
52+
'.md': 'markdown',
5553
}
5654
# The master toctree document.
57-
master_doc = "index"
55+
master_doc = 'index'
5856
# General information about the project.
59-
project = pkg_name
60-
copyright = "Cecill-C INRAE / INRIA / CIRAD"
61-
author = author
62-
# The version info for the project you're documenting, acts as replacement for
63-
# |version| and |release|, also used in various other places throughout the
64-
# built documents.
65-
#
57+
copyright = u'Cecill-C INRAE / INRIA / CIRAD'
6658
# The language for content autogenerated by Sphinx. Refer to documentation
6759
# for a list of supported languages.
6860
#
6961
# This is also used if you do content translation via gettext catalogs.
7062
# Usually you set "language" from the command line for these cases.
7163
language = "en"
7264
# The name of the Pygments (syntax highlighting) style to use.
73-
pygments_style = "sphinx"
65+
pygments_style = 'sphinx'
7466
# If true, `todo` and `todoList` produce output, else they produce nothing.
7567
todo_include_todos = False
7668

7769
# -- Options for HTML output ----------------------------------------------
7870
# The theme to use for HTML and HTML Help pages. See the documentation for
7971
# a list of builtin themes.
80-
html_theme = "pydata_sphinx_theme"
72+
html_theme = 'pydata_sphinx_theme'
8173
# Theme options are theme-specific and customize the look and feel of a theme
8274
# further. For a list of options available for each theme, see the
8375
# documentation.
8476
html_theme_options = {
85-
"header_links_before_dropdown": 6,
86-
"sidebarwidth": 200,
87-
"collapse_navigation": "false",
88-
"icon_links": [
89-
{
90-
"name": "GitHub",
91-
"url": "https://github.com/openalea/visualea",
92-
"icon": "fa-brands fa-github",
93-
},
77+
"header_links_before_dropdown": 6,
78+
"sidebarwidth": 200,
79+
"sticky_navigation": "false",
80+
"collapse_navigation": "false",
81+
"display_version": "true",
82+
"icon_links": [
83+
{
84+
"name": "GitHub",
85+
"url": "https://github.com/openalea/visualea", # do not want urls['Repository']
86+
"icon": "fa-brands fa-github",
87+
},
9488
],
9589
"show_version_warning_banner": True,
9690
"footer_start": ["copyright"],
@@ -99,11 +93,12 @@
9993
"**/*": ["page-toc", "edit-this-page", "sourcelink"],
10094
"examples/no-sidebar": [],
10195
},
102-
}
96+
"use_edit_page_button": True,
97+
}
10398
# Add any paths that contain custom static files (such as style sheets) here,
10499
# relative to this directory. They are copied after the builtin static files,
105100
# so a file named "default.css" will overwrite the builtin "default.css".
106-
html_static_path = ["_static"]
101+
html_static_path = ['_static']
107102
html_logo = "_static/openalea_web.svg"
108103
html_favicon = "_static/openalea_web.svg"
109104
# If false, no module index is generated.
@@ -119,48 +114,40 @@
119114
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
120115
html_show_copyright = True
121116
# Output file base name for HTML help builder.
122-
htmlhelp_basename = "visualea_documentation"
123-
117+
htmlhelp_basename = project + '_documentation'
124118
# Add infomation about github repository
125119
html_context = {
126120
# "github_url": "https://github.com", # or your GitHub Enterprise site
127121
"github_user": "openalea",
128122
"github_repo": "visualea",
129-
"github_version": "main",
123+
"github_version": "master",
130124
"doc_path": "doc",
131125
}
132126

133127
# -- Options for LaTeX output ---------------------------------------------
134-
latex_elements = {}
128+
latex_elements = {
129+
}
135130
latex_documents = [
136-
(
137-
master_doc,
138-
"visualea.tex",
139-
"visualea Documentation",
140-
"INRA / INRIA / CIRAD",
141-
"manual",
142-
),
131+
(master_doc, 'visualea.tex', u'visualea Documentation',
132+
u'INRA / INRIA / CIRAD', 'manual'),
143133
]
144134

145135
# -- Options for manual page output ---------------------------------------
146136
# One entry per manual page. List of tuples
147137
# (source start file, name, description, authors, manual section).
148-
man_pages = [(master_doc, "openalea.visualea", "visualea Documentation", [author], 1)]
138+
man_pages = [
139+
(master_doc, project, project + ' Documentation',
140+
[author], 1)
141+
]
149142

150143
# -- Options for Texinfo output -------------------------------------------
151144
# Grouping the document tree into Texinfo files. List of tuples
152145
# (source start file, target name, title, author,
153146
# dir menu entry, description, category)
154147
texinfo_documents = [
155-
(
156-
master_doc,
157-
"visualea",
158-
"visualea Documentation",
159-
author,
160-
"visualea",
161-
"this is an example",
162-
"Miscellaneous",
163-
),
148+
(master_doc, project, project + ' Documentation',
149+
author, project, desc,
150+
'Miscellaneous'),
164151
]
165152
# Example configuration for intersphinx: refer to the Python standard library.
166-
intersphinx_mapping = {"python": ("https://docs.python.org/", None)}
153+
intersphinx_mapping = {'python': ('https://docs.python.org/', None)}

doc/index.rst

Lines changed: 21 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,36 @@
1-
OpenAlea Visualea documentation
2-
###############################
1+
Welcome to Visualea's documentation!
2+
=====================================
33

4-
Module description
5-
==================
4+
.. include:: ../README.md
5+
:parser: myst_parser.sphinx_
66

7-
.. sidebar:: Summary
7+
Contact & Contributing
8+
----------------------
89

9-
:Version: |version|
10-
:Release: |release|
11-
:Date: |today|
12-
:Author: See `Authors`_ section
13-
:ChangeLog: See `ChangeLog`_ section
10+
For any question, please submit to https://github.com/openalea/visualea/issues.
1411

15-
.. topic:: Overview
1612

17-
.. include:: user/overview.txt
13+
Versioning
14+
----------
15+
16+
Sources are versioned on an Git repository hosted by platform GitHub: https://github.com/openalea/visualea.
17+
If you want to make your own development of the model, please fork the repository.
1818

1919
Documentation
20-
=============
20+
-------------
2121

2222
.. toctree::
2323
:maxdepth: 1
24+
:caption: Contents:
2425

25-
User Guide<user/index.rst>
26-
Reference Guide<user/autosum.rst>
27-
28-
- A `PDF <../latex/main.pdf>`_ version of |visualea| documentation is
29-
available.
30-
31-
Authors
32-
=======
33-
34-
.. include:: ../AUTHORS.txt
35-
36-
ChangeLog
37-
=========
38-
39-
.. include:: ../ChangeLog.txt
26+
user/manual.rst
27+
user/autosum.rst
4028

41-
License
42-
=======
4329

44-
|visualea| is released under a Cecill-C License.
30+
Indices and tables
31+
------------------
4532

46-
.. note:: `Cecill-C <http://www.cecill.info/licences/Licence_CeCILL-C_V1-en.html>`_
47-
license is a LGPL compatible license.
33+
* :ref:`genindex`
34+
* :ref:`modindex`
35+
* :ref:`search`
4836

49-
.. |visualea| replace:: OpenAlea.Visualea

0 commit comments

Comments
 (0)