Skip to content
Snippets Groups Projects
Commit 1437e4cd authored by Daniel Hornung's avatar Daniel Hornung
Browse files

DOC ENH: Using local sources for documentation instead of installed.

Also added some dummy version for uninstalled sources.
parent 2f449605
No related branches found
No related tags found
1 merge request!12DOC: Fix and extend documentation on inheritance
Pipeline #9012 passed with warnings
...@@ -49,6 +49,10 @@ from caosdb.common.models import (ACL, ALL, FIX, NONE, OBLIGATORY, RECOMMENDED, ...@@ -49,6 +49,10 @@ from caosdb.common.models import (ACL, ALL, FIX, NONE, OBLIGATORY, RECOMMENDED,
from caosdb.configuration import _read_config_files, configure, get_config from caosdb.configuration import _read_config_files, configure, get_config
from caosdb.connection.connection import configure_connection, get_connection from caosdb.connection.connection import configure_connection, get_connection
from caosdb.exceptions import * from caosdb.exceptions import *
from caosdb.version import version as __version__ try:
from caosdb.version import version as __version__
except:
version = "uninstalled"
__version__ = version
_read_config_files() _read_config_files()
...@@ -41,7 +41,11 @@ from caosdb.exceptions import (CaosDBException, HTTPClientError, ...@@ -41,7 +41,11 @@ from caosdb.exceptions import (CaosDBException, HTTPClientError,
HTTPResourceNotFoundError, HTTPResourceNotFoundError,
HTTPServerError, HTTPServerError,
HTTPURITooLongError) HTTPURITooLongError)
from caosdb.version import version try:
from caosdb.version import version
except:
version = "uninstalled"
from pkg_resources import resource_filename from pkg_resources import resource_filename
from .interface import CaosDBHTTPResponse, CaosDBServerConnection from .interface import CaosDBHTTPResponse, CaosDBServerConnection
......
...@@ -45,4 +45,4 @@ doc-help: ...@@ -45,4 +45,4 @@ doc-help:
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
apidoc: apidoc:
@$(SPHINXAPIDOC) -o _apidoc $(PY_BASEDIR) --separate @$(SPHINXAPIDOC) -o _apidoc --separate $(PY_BASEDIR)
...@@ -8,13 +8,16 @@ ...@@ -8,13 +8,16 @@
# -- Path setup -------------------------------------------------------------- # -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory, # If extensions (or modules to document with autodoc) are in another directory, add these
# add these directories to sys.path here. If the directory is relative to the # directories to sys.path here. This is particularly necessary if this package is installed at a
# documentation root, use os.path.abspath to make it absolute, like shown here. # different version, for example via `pip install`.
# #
# import os # If the directory is relative to the documentation root, use os.path.abspath to make it absolute,
# import sys # like shown here.
# sys.path.insert(0, os.path.abspath('../caosdb')) #
import os
import sys
sys.path.insert(0, os.path.abspath('..'))
import sphinx_rtd_theme import sphinx_rtd_theme
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment