Skip to content
Snippets Groups Projects
Commit 0ce14b51bba1 authored by Vincent Hatakeyama's avatar Vincent Hatakeyama
Browse files

:books: use package version in documentation

parent e9c737d098db
No related branches found
No related tags found
1 merge request!33📚 use package version in documentation
......@@ -11,6 +11,7 @@
import configparser
import os
import sys
from importlib.metadata import version
from odoo_scripts.config import Configuration
......@@ -29,6 +30,5 @@
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.doctest",
"sphinx.ext.intersphinx",
"sphinx.ext.todo",
"sphinx.ext.coverage",
......@@ -33,6 +33,5 @@
"sphinx.ext.todo",
"sphinx.ext.coverage",
"sphinx.ext.graphviz",
"sphinx.ext.viewcode",
"sphinxodoo.ext.autodoc",
]
......@@ -50,7 +49,12 @@
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The full version, including alpha/beta/rc tags.
release = version("odoo-addon-converter")
# The short X.Y version.
version = ".".join(release.split(".")[:2])
with open(os.path.join("..", "__manifest__.py"), "r") as f:
read_data = f.read()
d = ast.literal_eval(read_data)
......@@ -54,10 +58,6 @@
with open(os.path.join("..", "__manifest__.py"), "r") as f:
read_data = f.read()
d = ast.literal_eval(read_data)
# The full version, including alpha/beta/rc tags.
release = d["version"]
# The short X.Y version.
version = ".".join(release.split(".")[:4])
# General information about the project.
project = d["name"]
......@@ -61,7 +61,7 @@
# General information about the project.
project = d["name"]
copyright = "2020, 2022 XCG Consulting"
copyright = "2020, 2022, 2023 XCG Consulting"
author = d["author"]
module_nospace = project.replace(" ", "")
module_description = d.get("summary", "")
......@@ -141,8 +141,4 @@
)
]
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {"https://docs.python.org/3/": None}
#
......@@ -148,5 +144,5 @@
#
# odoo-sphinx-autodoc
# sphinx-odoo-autodoc
#
# sphinxodoo_addons : List of addons name to load (if empty, no addon will be loaded)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment