diff --git a/.readthedocs.yml b/.readthedocs.yml new file mode 100644 index 0000000..134b6ac --- /dev/null +++ b/.readthedocs.yml @@ -0,0 +1,13 @@ +version: 2 + +build: + os: "ubuntu-22.04" + tools: + python: "mambaforge-22.9" + +conda: + environment: doc/environment.yml + +sphinx: + # Path to your Sphinx configuration file. + configuration: doc/conf.py \ No newline at end of file diff --git a/README.md b/README.md index 141e9dd..a6e917c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -## Deepberry : segmentation and time-lapse tracking of grapevine berries +# Deepberry : segmentation and time-lapse tracking of grapevine berries -### Installation from source +## Installation from source # for prediction mamba create -n grapevine -c conda-forge python=3.12 (3.9>=version<3.13) @@ -20,7 +20,7 @@ # (optional) for model validation metrics: pip install .[validation] -### Maintainers +## Maintainers * Benoit Daviet (b.daviet@hotmail.com) * Fournier Christian (christian.fournier@inrae.fr) diff --git a/doc/conf.py b/doc/conf.py index 1e1ade9..71f0dee 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -2,6 +2,14 @@ import os import sys +from importlib.metadata import metadata + +pkg_name='deepberry' +meta = metadata('openalea.' + pkg_name) +release = meta.get("version") +# for example take major/minor +version = ".".join(release.split('.')[:3]) + # 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. @@ -24,6 +32,7 @@ "sphinx.ext.todo", # support for todo items "sphinx.ext.napoleon", # support for numpy and google style docstrings "sphinx_favicon", # support for favicon + "sphinx_copybutton", "nbsphinx", # for integrating jupyter notebooks "myst_parser", # for parsing .md files ] @@ -32,7 +41,7 @@ # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] autosummary_generate = True -exclude_patterns = ["_build", "_templates"] +exclude_patterns = ["build", "_templates"] # The suffix(es) of source filenames. # You can specify multiple suffix as a list of string: source_suffix = { @@ -49,14 +58,6 @@ # |version| and |release|, also used in various other places throughout the # built documents. # -# find version number in /src/$pkg_pth/version.py -pkgver = {} -with open("../src/openalea/deepberry/version.py") as fp: - exec(fp.read(), pkgver) -# The short X.Y version. -version = pkgver["__version__"] -# The full version, including alpha/beta/rc tags. -release = pkgver["__version__"] # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # @@ -81,9 +82,9 @@ "collapse_navigation": "false", "icon_links": [ { - "name": "GitLab", - "url": "https://forgemia.inra.fr/phenome/deepberry", - "icon": "fa-brands fa-gitlab", + "name": "GitHub", + "url": "https://github.com/openalea/deepberry", + "icon": "fa-brands fa-github", }, ], "show_version_warning_banner": True, diff --git a/doc/environment.yml b/doc/environment.yml index c71e204..735df0d 100644 --- a/doc/environment.yml +++ b/doc/environment.yml @@ -1,4 +1,4 @@ -name: phenomenal +name: deepberry channels: - conda-forge dependencies: diff --git a/pyproject.toml b/pyproject.toml index 3f8aa60..5054671 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,8 +44,8 @@ doc = [ "pydata-sphinx-theme", "myst-parser", "sphinx-favicon", + "sphinx-copybutton", "ipykernel", - "ipyvolume", "ipython_genutils", "nbsphinx", ]