Skip to content
Snippets Groups Projects
Commit af0d7a46 authored by florian's avatar florian
Browse files

Merge branch 'dev' into f-extern2

parents 59471ef2 98da8ac3
No related branches found
No related tags found
2 merge requests!22Release 0.3,!19MAINT: further tests and docs
Pipeline #15567 passed
...@@ -31,7 +31,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ...@@ -31,7 +31,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
h5py is now an optional dependency h5py is now an optional dependency
- table importer implementations for csv and tsv - table importer implementations for csv and tsv
- string-in-list check for table imports - string-in-list check for table imports
- Documentation and test for the `extern` keyword used by the YAML interface - AbtractCFood has new property, `update_flags`.
### Changed ### ### Changed ###
......
...@@ -170,6 +170,7 @@ class AbstractCFood(object, metaclass=ABCMeta): ...@@ -170,6 +170,7 @@ class AbstractCFood(object, metaclass=ABCMeta):
self.identifiables = db.Container() self.identifiables = db.Container()
self.item = item self.item = item
self.attached_items = [] self.attached_items = []
self.update_flags = {}
@abstractmethod @abstractmethod
def create_identifiables(self): def create_identifiables(self):
......
...@@ -549,7 +549,8 @@ carefully and if the changes are ok, click on the following link: ...@@ -549,7 +549,8 @@ carefully and if the changes are ok, click on the following link:
logger.info( logger.info(
"Updating {} Records...".format( "Updating {} Records...".format(
len(cfood.to_be_updated))) len(cfood.to_be_updated)))
guard.safe_update(cfood.to_be_updated, unique=False) guard.safe_update(cfood.to_be_updated, unique=False,
flags=cfood.update_flags)
except FileNotFoundError as e: except FileNotFoundError as e:
logger.info("Cannot access {}. However, it might be needed for" logger.info("Cannot access {}. However, it might be needed for"
" the correct execution".format(e.filename)) " the correct execution".format(e.filename))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment