diff --git a/src/caosdb/common/models.py b/src/caosdb/common/models.py index cf54983e5a5232d9186d01f2bc4d03d562d05411..6d30e64b124e43b0bda779e0206aef5ba3080a92 100644 --- a/src/caosdb/common/models.py +++ b/src/caosdb/common/models.py @@ -434,27 +434,23 @@ class Entity(object): parent : Entity or int or str or None The parent entity, either specified by the Entity object itself, or its id or its name. Default is None. - **kwargs : dict, optional - Additional keyword arguments for specifying the parent by - name or id, and for specifying the mode of inheritance. - - id : int - Integer id of the parent entity. Ignored if `parent` - is not None. - name : str - Name of the parent entity. Ignored if `parent is not - none`. - inheritance : str - One of ``obligatory``, ``recommended``, ``suggested``, or ``fix``. Specifies the - minimum importance which parent properties need to have to be inherited by this - entity. If no `inheritance` is given, no properties will be inherited by the child. - This parameter is case-insensitive. - - Note that the behaviour is currently not yet specified when assigning parents to - Records, it only works for inheritance of RecordTypes (and Properties). - - For more information, it is recommended to look into the - :ref:`data insertion tutorial<tutorial-inheritance-properties>`. + id : int + Integer id of the parent entity. Ignored if `parent` + is not None. + name : str + Name of the parent entity. Ignored if `parent is not + none`. + inheritance : str + One of ``obligatory``, ``recommended``, ``suggested``, or ``fix``. Specifies the + minimum importance which parent properties need to have to be inherited by this + entity. If no `inheritance` is given, no properties will be inherited by the child. + This parameter is case-insensitive. + + Note that the behaviour is currently not yet specified when assigning parents to + Records, it only works for inheritance of RecordTypes (and Properties). + + For more information, it is recommended to look into the + :ref:`data insertion tutorial<tutorial-inheritance-properties>`. Raises ------ @@ -1469,13 +1465,22 @@ class Property(Entity): Parameters ---------- - parent : Entity or int or str or None, optional - The parent entity - **kwargs : dict, optional - Additional keyword arguments specifying the parent Entity - by id or name, and specifying the inheritance level. See - :py:meth:`Entity.add_parent` for more information. Note - that by default, `inheritance` is set to ``fix``. + Parameters + ---------- + parent : Entity or int or str or None + The parent entity, either specified by the Entity object + itself, or its id or its name. Default is None. + id : int + Integer id of the parent entity. Ignored if `parent` + is not None. + name : str + Name of the parent entity. Ignored if `parent is not + none`. + inheritance : str, default: FIX + One of ``obligatory``, ``recommended``, ``suggested``, or ``fix``. Specifies the + minimum importance which parent properties need to have to be inherited by this + entity. If no `inheritance` is given, no properties will be inherited by the child. + This parameter is case-insensitive. See Also -------- @@ -1598,11 +1603,22 @@ class RecordType(Entity): parent : Entity or int or str or None, optional The parent entity, either specified by the Entity object itself, or its id or its name. Default is None. - **kwargs : dict, optional - Additional keyword arguments specifying the parent Entity by id or - name, and specifying the inheritance level. See - :py:meth:`Entity.add_parent` for more information. Note - that by default, `inheritance` is set to ``obligatory``. + Parameters + ---------- + parent : Entity or int or str or None + The parent entity, either specified by the Entity object + itself, or its id or its name. Default is None. + id : int + Integer id of the parent entity. Ignored if `parent` + is not None. + name : str + Name of the parent entity. Ignored if `parent is not + none`. + inheritance : str, default OBLIGATORY + One of ``obligatory``, ``recommended``, ``suggested``, or ``fix``. Specifies the + minimum importance which parent properties need to have to be inherited by this + entity. If no `inheritance` is given, no properties will be inherited by the child. + This parameter is case-insensitive. See Also --------