diff --git a/src/caosadvancedtools/cache.py b/src/caosadvancedtools/cache.py index cf74e330d3efb754d8e79d84ba816877c295c784..bf1287ba35d9c0af28d440db56e38173d38fcacf 100644 --- a/src/caosadvancedtools/cache.py +++ b/src/caosadvancedtools/cache.py @@ -150,13 +150,18 @@ 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. - Otherwise nothing is returned. +fetchall: bool, optional + When True, run fetchall as last command and return the results. + Otherwise nothing is returned. """ conn = sqlite3.connect(self.db_file) c = conn.cursor() diff --git a/src/caosadvancedtools/json_schema_exporter.py b/src/caosadvancedtools/json_schema_exporter.py index 11e74369f9a9733895fa0709bf6024e2ef5cceb3..3ac5247d85e3e3d5bca3f74d2033b7f258654d84 100644 --- a/src/caosadvancedtools/json_schema_exporter.py +++ b/src/caosadvancedtools/json_schema_exporter.py @@ -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 diff --git a/src/caosadvancedtools/models/parser.py b/src/caosadvancedtools/models/parser.py index fa21aa13b1ee666a36d94280865835b922d6c721..f9bea92455e948eb40e337a43ad87b6d79156fce 100644 --- a/src/caosadvancedtools/models/parser.py +++ b/src/caosadvancedtools/models/parser.py @@ -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 diff --git a/src/caosadvancedtools/table_json_conversion/table_generator.py b/src/caosadvancedtools/table_json_conversion/table_generator.py index 5caefc8d4ef63801473c9f8ccdb92f5a1e04dbce..8ca026a8758361b658e98cabbcff42b849bb07fe 100644 --- a/src/caosadvancedtools/table_json_conversion/table_generator.py +++ b/src/caosadvancedtools/table_json_conversion/table_generator.py @@ -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. """ diff --git a/src/doc/conf.py b/src/doc/conf.py index 590feca405444032b0cdaa5fefc3aff09538bff0..37397f244ab05d4ad002569e2af2082530dab89f 100644 --- a/src/doc/conf.py +++ b/src/doc/conf.py @@ -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), } diff --git a/src/doc/crawler.rst b/src/doc/crawler.rst index aea023192c0b95c784d5ac91ade12d0c30591d42..d7b351bb3132cefed8920f977b345dc32e4db819 100644 --- a/src/doc/crawler.rst +++ b/src/doc/crawler.rst @@ -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. diff --git a/src/doc/index.rst b/src/doc/index.rst index 15a7b7ab7773f00149a58d948e3086775a059214..aa5cedca8b8528c94abe183378f44369dea495fb 100644 --- a/src/doc/index.rst +++ b/src/doc/index.rst @@ -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/>