def test_to_uml(self):
     doc = self.registry.Documentation()
     doc.auto_doc()
     format_ = Configuration.get('schema_format')
     dot = ModelSchema('test', format=format_)
     doc.toUML(dot)
     dot.save()
Exemple #2
0
 def test_one_model_with_class_which_associate_label(self):
     dot = ModelSchema('My UML model')
     label = dot.add_label('My label')
     cls = dot.add_class('My class')
     cls.associate(label)
     cls.associate(cls, label_from='test')
     dot.render()
Exemple #3
0
 def test_one_model_with_class_which_extend_label(self):
     dot = ModelSchema('My UML model')
     label = dot.add_label('My label')
     cls = dot.add_class('My class')
     cls.add_method('One method')
     cls.extend(label)
     dot.render()
Exemple #4
0
 def test_to_uml(self):
     doc = self.registry.Documentation()
     doc.auto_doc()
     format_ = Configuration.get('schema_format')
     dot = ModelSchema('test', format=format_)
     doc.toUML(dot)
     dot.save()
Exemple #5
0
 def test_one_model_with_class_which_associate_label(self):
     dot = ModelSchema('My UML model')
     label = dot.add_label('My label')
     cls = dot.add_class('My class')
     cls.associate(label)
     cls.associate(cls, label_from='test')
     dot.render()
Exemple #6
0
 def test_one_model_with_class_which_extend_label(self):
     dot = ModelSchema('My UML model')
     label = dot.add_label('My label')
     cls = dot.add_class('My class')
     cls.add_method('One method')
     cls.extend(label)
     dot.render()
Exemple #7
0
def registry2doc(application, configuration_groups, **kwargs):
    """Return auto documentation for the registry

    :param application: name of the application
    :param configuration_groups: list configuration groupe to load
    :param \**kwargs: ArgumentParser named arguments
    """
    format_configuration(configuration_groups, 'doc', 'schema')
    registry = anyblok.start(application,
                             configuration_groups=configuration_groups,
                             **kwargs)
    if registry:
        registry.commit()
        doc = registry.Documentation()
        doc.auto_doc()
        if Configuration.get('doc_format') == 'RST':
            with open(Configuration.get('doc_output'), 'w') as fp:
                doc.toRST(fp)
        elif Configuration.get('doc_format') == 'UML':
            format_ = Configuration.get('schema_format')
            name_ = Configuration.get('schema_output')
            dot = ModelSchema(name_, format=format_)
            doc.toUML(dot)
            dot.save()
        elif Configuration.get('doc_format') == 'SQL':
            format_ = Configuration.get('schema_format')
            name_ = Configuration.get('schema_output')
            dot = SQLSchema(name_, format=format_)
            doc.toSQL(dot)
            dot.save()
Exemple #8
0
def anyblok2doc():
    """Return auto documentation for the registry
    """
    anyblok_registry = anyblok.start('autodoc')
    if anyblok_registry:
        anyblok_registry.commit()
        doc = anyblok_registry.Documentation()
        doc.auto_doc()
        if Configuration.get('doc_format') == 'RST':
            with open(Configuration.get('doc_output'), 'w') as fp:
                doc.toRST(fp)
        elif Configuration.get('doc_format') == 'UML':
            format_ = Configuration.get('schema_format')
            name_ = Configuration.get('schema_output')
            dot = ModelSchema(name_, format=format_)
            doc.toUML(dot)
            dot.save()
        elif Configuration.get('doc_format') == 'SQL':
            format_ = Configuration.get('schema_format')
            name_ = Configuration.get('schema_output')
            dot = SQLSchema(name_, format=format_)
            doc.toSQL(dot)
            dot.save()
Exemple #9
0
def anyblok2doc():
    """Return auto documentation for the registry
    """
    registry = anyblok.start('autodoc')
    if registry:
        registry.commit()
        doc = registry.Documentation()
        doc.auto_doc()
        if Configuration.get('doc_format') == 'RST':
            with open(Configuration.get('doc_output'), 'w') as fp:
                doc.toRST(fp)
        elif Configuration.get('doc_format') == 'UML':
            format_ = Configuration.get('schema_format')
            name_ = Configuration.get('schema_output')
            dot = ModelSchema(name_, format=format_)
            doc.toUML(dot)
            dot.save()
        elif Configuration.get('doc_format') == 'SQL':
            format_ = Configuration.get('schema_format')
            name_ = Configuration.get('schema_output')
            dot = SQLSchema(name_, format=format_)
            doc.toSQL(dot)
            dot.save()
Exemple #10
0
 def test_one_model_with_class(self):
     dot = ModelSchema('My UML model')
     dot.add_class('My class')
     dot.render()
Exemple #11
0
 def test_one_model_with_label(self):
     dot = ModelSchema('My UML model')
     dot.add_label('My label')
     dot.render()
Exemple #12
0
 def test_one_model_with_class(self):
     dot = ModelSchema('My UML model')
     dot.add_class('My class')
     dot.render()
Exemple #13
0
 def test_get_class(self):
     dot = ModelSchema('My UML model')
     cls = dot.add_class('My class')
     assert dot.get_class('My class') == cls
Exemple #14
0
 def test_get_class(self):
     dot = ModelSchema('My UML model')
     cls = dot.add_class('My class')
     self.assertEqual(dot.get_class('My class'), cls)
Exemple #15
0
 def test_one_model_with_class_which_strong_agregate_label(self):
     dot = ModelSchema('My UML model')
     label = dot.add_label('My label')
     cls = dot.add_class('My class')
     cls.strong_agregate(label, multiplicity_from='test')
     dot.render()
Exemple #16
0
 def test_one_model_with_class_which_strong_agregate_label(self):
     dot = ModelSchema('My UML model')
     label = dot.add_label('My label')
     cls = dot.add_class('My class')
     cls.strong_agregate(label, multiplicity_from='test')
     dot.render()
Exemple #17
0
 def test_get_class(self):
     dot = ModelSchema('My UML model')
     cls = dot.add_class('My class')
     self.assertEqual(dot.get_class('My class'), cls)
Exemple #18
0
 def test_one_model_with_label(self):
     dot = ModelSchema('My UML model')
     dot.add_label('My label')
     dot.render()