diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a89918a16f7137d15c7656c063d8ae94a55eeea..83dbfbbd250d75eacbc590afc3b76d5e4728cb1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added ### +### Changed ### + +### Deprecated ### + +### Removed ### + +### Fixed ### + +### Security ### + +### Documentation ### + +## [0.4.0] - 2023-03-22 ## +(Florian Spreckelsen) + +### Added ### + - DateElementConverter: allows to interpret text as a date object - the restricted_path argument allows to crawl only a subtree - logging that provides a summary of what is inserted and updated @@ -51,10 +68,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 queries for identifiables since it would contain "WITH name=''" otherwise which is an impossible condition. If your cfoods contained this case, they are ill defined. -### Security ### - -### Documentation ### - ## [0.3.0] - 2022-01-30 ## (Florian Spreckelsen) diff --git a/CITATION.cff b/CITATION.cff index ad00d0edb29ecfe2edf4b1aeb621ff35f8304f90..9c8bf551c41a6a3447b076914741b349a8c72b9c 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -20,6 +20,6 @@ authors: given-names: Stefan orcid: https://orcid.org/0000-0001-7214-8125 title: CaosDB - Crawler -version: 0.3.0 +version: 0.4.0 doi: 10.3390/data4020083 -date-released: 2023-01-30 \ No newline at end of file +date-released: 2023-03-22 \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index f24bd13cb064d8abc7881ac472575636adbd67e4..81ed897770552e389f70efe4e166dcacba232c95 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = caoscrawler -version = 0.3.1 +version = 0.4.1 author = Alexander Schlemmer author_email = alexander.schlemmer@ds.mpg.de description = A new crawler for caosdb diff --git a/src/caoscrawler/crawl.py b/src/caoscrawler/crawl.py index e3b8c92a6c66fc270fcde4490403daa2b8c95b67..150a555124ee4266fb417e815ab149e5678a3474 100644 --- a/src/caoscrawler/crawl.py +++ b/src/caoscrawler/crawl.py @@ -516,7 +516,7 @@ class Crawler(object): # TODO: can the following be removed at some point for ent in flat: if ent.role == "Record" and len(ent.parents) == 0: - raise RuntimeError("Records must have a parent.") + raise RuntimeError(f"Records must have a parent.\n{ent}") resolved_references = True # flat contains Entities which could not yet be checked against the remote server @@ -831,7 +831,7 @@ class Crawler(object): to_be_updated = self.remove_unnecessary_updates(to_be_updated, identified_records) logger.info(f"Going to insert {len(to_be_inserted)} Entities and update " - f"{len(to_be_inserted)} Entities.") + f"{len(to_be_updated)} Entities.") if commit_changes: self.execute_parent_updates_in_list(to_be_updated, securityMode=self.securityMode, run_id=self.run_id, unique_names=unique_names) diff --git a/src/caoscrawler/identifiable_adapters.py b/src/caoscrawler/identifiable_adapters.py index 6ddc533021f2abb87040f0f90173f9435a7423db..c410159de4364e9b0299a84a4cbc687f773d35c0 100644 --- a/src/caoscrawler/identifiable_adapters.py +++ b/src/caoscrawler/identifiable_adapters.py @@ -448,7 +448,7 @@ class CaosDBIdentifiableAdapter(IdentifiableAdapter): def get_file(self, identifiable: Identifiable): if identifiable.path is None: raise RuntimeError("Path must not be None for File retrieval.") - candidates = db.execute_query("FIND File which is stored at {}".format( + candidates = db.execute_query("FIND File which is stored at '{}'".format( identifiable.path)) if len(candidates) > 1: raise RuntimeError("Identifiable was not defined unambigiously.") diff --git a/src/doc/conf.py b/src/doc/conf.py index 7d06ea9ac9597873ec9b4d7c389ee893530fdd2d..110b37d6d6d8d6b57d38850a6f62589d5710879f 100644 --- a/src/doc/conf.py +++ b/src/doc/conf.py @@ -33,10 +33,10 @@ copyright = '2021, MPIDS' author = 'Alexander Schlemmer' # The short X.Y version -version = '0.3.1' +version = '0.4.1' # The full version, including alpha/beta/rc tags # release = '0.5.2-rc2' -release = '0.3.1-dev' +release = '0.4.1-dev' # -- General configuration ---------------------------------------------------