diff --git a/CHANGELOG.md b/CHANGELOG.md index 7abd6a59ffd4687a54a6a586706e100755f61e61..5efe3e6466af177c3c6654d72d1153a9144657d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,10 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ## ### Added ### -- `check_reference_field` function to check whether entities with provided ids - exits (for example when importing data from a table) -- added the `datatypes` argument to `TableImporter` for columns that do not - need a special conversion function + - `generic_analysis.py` allows to easily call scripts to perform analyses in server side scripting @@ -24,6 +21,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Security ### +## [0.3.1] - 2021-12-06 ## + +### Added ### +- `check_reference_field` function to check whether entities with provided ids + exits (for example when importing data from a table) +- added the `datatypes` argument to `TableImporter` for columns that do not + need a special conversion function + ## [0.3.0] - 2021-11-02 ## ### Added ### diff --git a/setup.py b/setup.py index 81695d77156a2225b12cb67b4c9d8a4677de5bb5..8a2dcee8d0f4fb80986efa99d91176e653993c45 100755 --- a/setup.py +++ b/setup.py @@ -47,7 +47,7 @@ from setuptools import find_packages, setup MAJOR = 0 MINOR = 3 -MICRO = 1 +MICRO = 2 PRE = "" # e.g. rc0, alpha.1, 0.beta-23 ISRELEASED = False diff --git a/src/caosadvancedtools/crawler.py b/src/caosadvancedtools/crawler.py index ea7527bbd746334baa337926c6074e82c6610949..5d91d85cbbbff5b6f64ce9a9de1f29ca603d3b8a 100644 --- a/src/caosadvancedtools/crawler.py +++ b/src/caosadvancedtools/crawler.py @@ -66,10 +66,25 @@ def separated(text): return "-"*60 + "\n" + text -def apply_list_of_updates(to_be_updated, update_flags, +def apply_list_of_updates(to_be_updated, update_flags={}, update_cache=None, run_id=None): - """ - Updates the to_be_updated Container, i.e. pushes the changes to CaosDB + """Updates the `to_be_updated` Container, i.e., pushes the changes to CaosDB + after removing possible duplicates. If a chace is provided, uauthorized + updates can be cached for further authorization. + + Parameters: + ----------- + to_be_updated : db.Container + Container with the entities that will be updated. + update_flags : dict, optional + Dictionary of CaosDB server flags that will be used for the + update. Default is an empty dict. + update_cache : UpdateCache or None, optional + Cache in which the intended updates will be stored so they can be + authorized afterwards. Default is None. + run_id : String or None, optional + Id with which the pending updates are cached. Only meaningful if + `update_cache` is provided. Default is None. """ if len(to_be_updated) == 0: @@ -90,9 +105,10 @@ def apply_list_of_updates(to_be_updated, update_flags, baseurl = db.configuration.get_config()["Connection"]["url"] + def make_clickable(txt, id): + return "<a href='{}/Entity/{}'>{}</a>".format(baseurl, id, txt) + for el in to_be_updated: - def make_clickable(txt, id): - return "<a href='{}/Entity/{}'>{}</a>".format(baseurl, id, txt) info += str("\t" + make_clickable(el.name, el.id) if el.name is not None else "\t" + make_clickable(str(el.id), el.id))