add datatype, unit and description to properties that are part of Records
Summary
This fixes the first problem mentioned in #130 (moved) . The second one is going to be mended in caosdb-pylib!155 (merged) .
This fix essentially adds data types (and additional attributes) to properties that are part of record types. Otherwise comparisons of loaded data models with existing data models fail, because the lack of a data type is detected as a difference.
Focus
Please check:
- Does have the addition of these attributes have an unwanted side effect?
- Have all relevant attributes been added?
- Is test coverage complete?
Test Environment
There is a comprehensive unit test.
You can test whether it actually fixes the problem by:
- Commenting out lines 346-373 in
parser.py
(caosdb-advanced-user-tools/src/caosadvancedtools/models/parser.py
) - Running
pytest unittests/test_yaml_model_parser.py -k test_comparison
Check List for the Author
Please, prepare your MR for a review. Be sure to write a summary and a focus and create gitlab comments for the reviewer. They should guide the reviewer through the changes, explain your changes and also point out open questions. For further good practices have a look at our review guidelines
-
All automated tests pass -
Reference related issues -
Up-to-date CHANGELOG.md (or not necessary) -
Up-to-date JSON schema (or not necessary) -
Appropriate user and developer documentation (or not necessary) - How do I use the software? Assume "stupid" users.
- How do I develop or debug the software? Assume novice developers.
-
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 (or not necessary) -
Appropriate user and developer documentation (or not necessary) -
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 specifications? Are they satisfied?
For further good practices have a look at our review guidelines.