Skip to content
Snippets Groups Projects
Verified Commit 45efa075 authored by Daniel Hornung's avatar Daniel Hornung
Browse files

MAINT: Cleaning up Sphinx documentation.

parent 08cc5e18
No related branches found
No related tags found
1 merge request!100WIP: Filling XLSX: Seems to be working.
......@@ -150,12 +150,17 @@ class AbstractCache(ABC):
finally:
conn.close()
def run_sql_commands(self, commands, fetchall=False):
"""
Run a list of SQL commands on self.db_file.
def run_sql_commands(self, commands, fetchall: bool = False):
"""Run a list of SQL commands on self.db_file.
Parameters
----------
commands:
List of sql commands (tuples) to execute
commands: list of sql commands (tuples) to execute
fetchall: When True, run fetchall as last command and return the results.
fetchall: bool, optional
When True, run fetchall as last command and return the results.
Otherwise nothing is returned.
"""
conn = sqlite3.connect(self.db_file)
......
......@@ -88,7 +88,7 @@ class JsonSchemaExporter:
If True, do not attempt to connect to a LinkAhead server at all. Default is False. Note
that the exporter may fail if this option is activated and the data model is not
self-sufficient.
use_rt_pool : DataModel, optional
use_rt_pool : models.data_model.DataModel, optional
If given, do not attempt to retrieve RecordType information remotely but from this parameter
instead.
multiple_choice : list[str], optional
......@@ -562,7 +562,7 @@ def recordtype_to_json_schema(rt: db.RecordType, additional_properties: bool = T
parameter, the behavior is undefined.
no_remote : bool, optional
If True, do not attempt to connect to a LinkAhead server at all. Default is False.
use_rt_pool : DataModel, optional
use_rt_pool : models.data_model.DataModel, optional
If given, do not attempt to retrieve RecordType information remotely but from this parameter
instead.
multiple_choice : list[str], optional
......
......@@ -248,7 +248,7 @@ debug : bool, optional
Returns
-------
out : DataModel
out : data_model.DataModel
The created DataModel
"""
with open(filename, 'r') as outfile:
......@@ -269,7 +269,7 @@ debug : bool, optional
Returns
-------
out : DataModel
out : data_model.DataModel
The created DataModel
"""
ymlmodel = yaml.load(string, Loader=SafeLineLoader)
......@@ -289,7 +289,7 @@ debug : bool, optional
Returns
-------
out : DataModel
out : data_model.DataModel
The created DataModel
"""
......@@ -706,7 +706,7 @@ class JsonSchemaParser(Parser):
Returns
-------
out : DataModel
out : data_model.DataModel
The created DataModel
"""
# @author Florian Spreckelsen
......@@ -732,7 +732,7 @@ class JsonSchemaParser(Parser):
Returns
-------
our : DataModel
our : data_model.DataModel
The datamodel defined in `model_dict`
"""
# @review Timm Fitschen 2023-05-25
......
......@@ -282,7 +282,7 @@ class XLSXTemplateGenerator(TableTemplateGenerator):
foreign_keys: dict
A configuration that defines which attributes shall be used to create
additional columns when a list of references exists. See ``foreign_keys``
argument of :ref:`TableTemplateGenerator.generate` .
argument of :meth:`TableTemplateGenerator.generate` .
filepath: str
The XLSX file will be stored under this path.
"""
......
......@@ -64,7 +64,7 @@ master_doc = 'index'
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = "en"
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
......@@ -190,7 +190,7 @@ epub_exclude_files = ['search.html']
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
"python": ("https://docs.python.org/", None),
"caosdb-pylib": ("https://caosdb.gitlab.io/caosdb-pylib/", None),
"linkahead-pylib": ("https://docs.indiscale.com/caosdb-pylib/", None),
}
......
......@@ -77,8 +77,8 @@ problems. The exact behavior depends on your setup. However, you can
have a look at the example in the
`tests <https://gitlab.indiscale.com/caosdb/src/caosdb-advanced-user-tools/-/blob/main/integrationtests/crawl.py>`__.
.. Note:: The crawler depends on the CaosDB Python client, so make sure to install :doc:`pycaosdb
<caosdb-pylib:getting_started>`.
.. Note:: The crawler depends on the LinkAhead Python client, so make sure to install :doc:`pylinkahead
<linkahead-pylib:README_SETUP>`.
Call ``python3 crawl.py --help`` to see what parameters can be provided.
......
......@@ -4,8 +4,8 @@ Welcome to caosadvancedtools' documentation!
Welcome to the advanced Python tools for CaosDB!
This documentation helps you to :doc:`get started<getting_started>`, explains the most important
:doc:`concepts<concepts>` and offers a range of :doc:`tutorials<tutorials>`.
This documentation helps you to :doc:`get started<README_SETUP>`, explains the most important
:doc:`concepts<concepts>` and offers a range of deep dives into specific sub-topics.
.. toctree::
:maxdepth: 2
......@@ -16,6 +16,7 @@ This documentation helps you to :doc:`get started<getting_started>`, explains th
The Caosdb Crawler <crawler>
YAML data model specification <yaml_interface>
Specifying a datamodel with JSON schema <json_schema_interface>
Conversion between XLSX, JSON and LinkAhead Entities <table-json-conversion/specs>
_apidoc/modules
Related Projects <related_projects/index>
Back to overview <https://docs.indiscale.com/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment