F extend yaml model
Summary
See #68 (closed). Introduce a new keyword for yaml-models that allows insertion of Records and File objects.
In the course, setting (default) values of properties has been implemented and, more importantly, setting values of properties of records directly.
Note that this breaks one of the existing tests: values of properties can be different from dicts now.
Maybe related: #35
Focus
I added annotations in the commits.
Test Environment
There are new unit tests showing how to test the new keywords.
Check List for the Author
-
All automated tests pass -
Reference related Issues -
Up-to-date CHANGELOG.md -
Annotations in code (Gitlab comments) - Intent of new code
- Problems with old code
- Why this implementation?
Check List for the Reviewer
-
I understand the intent of this MR -
All automated tests pass -
Up-to-date CHANGELOG.md -
The test environment setup works and the intended behavior is reproducible in the test environment -
In-code documentation and comments are up-to-date. -
Check: Are there spezifications? Are they satisfied?
For further good practices have a look at our review guidelines.
Edited by Florian Spreckelsen
Merge request reports
Activity
assigned to @salexan
added 1 commit
- 7d0f66d2 - ENH: refactored checking of extern and allow other entity types
added 1 commit
- a37c5d80 - DOC: added a new keyword role and some missing documentation
added 1 commit
- d99f94e6 - TST: added note and xfail to one test that is incompatible with role keyword now
requested review from @florian
- Resolved by Florian Spreckelsen
- Resolved by Florian Spreckelsen
177 184 ymlmodel["extern"] = [] 178 185 179 186 for name in ymlmodel["extern"]: 180 if db.execute_query("COUNT Property {}".format(name)) > 0: 181 self.model[name] = db.execute_query( 182 "FIND Property WITH name={}".format(name), unique=True) 183 184 elif db.execute_query("COUNT RecordType {}".format(name)) > 0: 185 self.model[name] = db.execute_query( 186 "FIND RecordType WITH name={}".format(name), unique=True) 187 for role in ("Property", "RecordType", "Record", "File"): - Resolved by Florian Spreckelsen
- Resolved by Florian Spreckelsen
- Resolved by Florian Spreckelsen
- Resolved by Florian Spreckelsen
Please register or sign in to reply