Skip to content

F retrieve substructure

Alexander Schlemmer requested to merge f-retrieve-substructure into dev

Summary

This adds a new function in pylib that allows for retrieving connected parts of a data model. This function is needed for feasible conversion of parts of the data model into UML.

This MR also adds some missing docstrings to old functions.

Focus

There is only one function to check that recursively adds substructure starting from a few given entities.

Test Environment

Check out the branch and try this on an instance of your choice:

import caosdb as db
from caosdb.utils.plantuml import to_graphics, retrieve_substructure
rts = retrieve_substructure(db.execute_query("Find RecordType SomeRecordtype"), 2)

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 Alexander Kreft

Merge request reports