intermediate commit
This commit is contained in:
+11
-8
@@ -45,7 +45,8 @@ def get_concept(name=None, body=None,
|
||||
is_builtin=False,
|
||||
is_unique=False,
|
||||
autouse=False,
|
||||
sequence=None) -> Concept:
|
||||
sequence=None,
|
||||
init_parameters=True) -> Concept:
|
||||
"""
|
||||
Create a Concept objet
|
||||
Caution : 'id' and 'key' are not initialized
|
||||
@@ -115,6 +116,10 @@ def get_concept(name=None, body=None,
|
||||
else:
|
||||
metadata.digest = ConceptManager.compute_metadata_digest(metadata)
|
||||
metadata.all_attrs = ConceptManager.compute_all_attrs(metadata.variables)
|
||||
|
||||
if init_parameters and metadata.variables:
|
||||
metadata.parameters = [v[0] if isinstance(v, tuple) else v for v in metadata.variables]
|
||||
|
||||
return Concept(metadata)
|
||||
|
||||
|
||||
@@ -355,13 +360,11 @@ def get_concepts(context: ExecutionContext, *concepts, **kwargs) -> list[Concept
|
||||
"""
|
||||
Simple and quick way to get initialize concepts for a test
|
||||
:param context:
|
||||
:type context:
|
||||
:param concepts:
|
||||
:type concepts:
|
||||
:param kwargs:
|
||||
:type kwargs:
|
||||
:return:
|
||||
:rtype:
|
||||
:param concepts: Concepts to create
|
||||
:param kwargs: named parameters to tweak the creation of the concepts
|
||||
use_sheerka : Adds the new concepts to Sheerka. If not simply creates concepts that do not affect Sheerka
|
||||
sequence : Sequence Manager, to give a correct id to the created concepts
|
||||
:return: the concepts
|
||||
"""
|
||||
res = []
|
||||
use_sheerka = kwargs.pop("use_sheerka", False)
|
||||
|
||||
Reference in New Issue
Block a user