Yann Weber
10379c6a95
Fieldgroups are deleted
9 anos atrás
Yann Weber
cb7a37e7a2
Add checks in EmField, add tests for EmField + bugfix in check in Model.create_component
Checks for EmField :
- checks that the name is uniq in an EmClass
- checks that a relation EmClass <- rel2type -> EmType is uniq
9 anos atrás
Yann Weber
36ffdfdf0c
Some bugfix in components.max_rank model.create_component in the random em generator and in the file fieldtype
9 anos atrás
Yann Weber
1c4e2ddba8
Some Doxygen comments fix
9 anos atrás
Yann Weber
384ffb006b
Default fields processing changes + updated the me.json
Now on load default fields for EmClass are created. The EmClass.check method create them if they are not present.
9 anos atrás
Yann Weber
94d4967642
Add common_fields and make the differences between common fields and default fields
9 anos atrás
Yann Weber
ad1beff75d
Added default fields for EmClass + fixing some tests and EmClass function that were broken
Added default fields for EmClass, they are listed by classtype in EmClassType
Fixing some tests (testing that a new EmClass has no fieldgroups)
Fixing the delete_check of EmClass. Now an EmClass can be deleted if it contains only default fieldgroup and default fields
9 anos atrás
Yann Weber
b521c2c7b6
Modified EmField and Model to fit with the new fieldtypes
9 anos atrás
Yann Weber
ebad5fae54
Moving random EM generation methods in a dedicated file
Creating a class RandomEm in EditorialModel/randomem.py
9 anos atrás
Yann Weber
06bd3b141d
Model construct enhancement with backend and MH inheritance
Every backend and MH are now subclasses of dummy ones. This allow to check the type with issubclass.
9 anos atrás
Yann Weber
a502965103
Bugfix on model
Make most of the model tests pass (except the tests about the backend calls and set)
9 anos atrás
Yann Weber
f2027275e3
Addapt graphviz backend and random EM generator to changes on master branch
Mostly about the changes on types hierarchy
9 anos atrás
Yann Weber
32975049d1
Use the kwargs parameter to tune generation
9 anos atrás
Yann Weber
d405f0b41e
Added a random methods to EmModel to generate a random EM
9 anos atrás
Yann Weber
a987b5b672
Added a method to create a random EM
9 anos atrás
ArnAud
5f0f5dd3bf
EmComponent: convert attr_dump attribut to a method
9 anos atrás
ArnAud
8b55bc54ed
EmModel : delete_component() return False if deletion is not possible
Also do not send change to MH if deletion is not done
9 anos atrás
ArnAud
644f76b14d
Emtype: superiors_list should be a dict with list of int
=> a type can have multiple superiors (only instance of LeObject can have one)
9 anos atrás
ArnAud
5fabf34ddb
EmType: bugfix, maybe we should learn python :p
9 anos atrás
ArnAud
d7b59df745
EmModel: attr_dump does not use attribut 'model' anymore
9 anos atrás
ArnAud
cdf31218f6
EmModel: _initiated attribut does not exist anymore in attr_dump
9 anos atrás
ArnAud
63787bc969
EmModel: bug fix create component: do not use positional argument
9 anos atrás
ArnAud
9131f7bcd2
EmField: type attribute is now called fieldtype
9 anos atrás
ArnAud
49b78fe37d
EmType: implement add_superior() & del_superior()
9 anos atrás
ArnAud
a89cfa4429
EmType: use superiors_list instead of subordinates_list to save type hierarchy
9 anos atrás
ArnAud
e5d6caa6cf
EmModel : new method migrate_handler()
use it to re-run ME creation in a new Migration Handler
9 anos atrás
ArnAud
ea302bb469
EmModel : create_component() can take an optional uid
9 anos atrás
Yann Weber
18695e3a72
Implement the BackendJson save method
9 anos atrás
Yann Weber
d35fa8c56e
Cleaning and commenting
9 anos atrás
Yann Weber
773afc5b2c
New version (again) of the fieldtypes
9 anos atrás
Yann Weber
4c0b8d3279
New graphviz backend + some methods added to some components
9 anos atrás
Yann Weber
aa6e01bff0
Dirty comit of a djago MH that "works"
Code cleaning, commenting etc needed...
9 anos atrás
Yann Weber
17c1eba918
Solved a bug about checking ranks and getting max rank
9 anos atrás
ArnAud
5fb9c8b7b6
EmComponent: get_max_rank() should return an int
9 anos atrás
Roland Haroutiounian
f1d819c254
[EmFieldGroup] Changed the assertions for the init tests with bad arguments
9 anos atrás
Roland Haroutiounian
03113ae8bf
Changes in the tests for the fieldgroups
9 anos atrás
Roland Haroutiounian
bf5704d361
[Model] pep8+pylint
9 anos atrás
Yann Weber
6aa32322a0
SHA512 hash for Model
9 anos atrás
Roland Haroutiounian
0bf24b6c48
[#45 ] Changed the return of the hash methods, we get integer instead of string
9 anos atrás
Yann Weber
4dfb751bb3
Removing a debug print
9 anos atrás
Yann Weber
084b8af6c1
MigrationHandler enhancement (now records Model's hash for each changes). Better beaviour of Model.create_component if MigrationHandler raises
9 anos atrás
Roland Haroutiounian
873edf19a6
[#45 ] Reimplemented the __eq__ method of the Model class so that it uses the newly defined __hash__ method
9 anos atrás
Roland Haroutiounian
8a6fdd4c6a
[#45 ] Added the __hash__ method implementation for the Model class
9 anos atrás
Yann Weber
ed9133016f
Fixing component deletion
9 anos atrás
Yann Weber
fe9184f608
Reimplementig EmComponent::__setattr__ to call migration handler
Addding a method to indicate the end of a component initialisation phase (used in Model.load and Model.create_component)
Adding a method that dump component attributes (used in Model.create_component and Model.delete_component to call the migration_handler)
9 anos atrás
Yann Weber
195cca24a4
Implementing check methods for each EmComponent child (and EmComponent)
No extended checks was done. Only tested if the check passes without syntax error and without failing with no reason
9 anos atrás
Yann Weber
b6ef37752f
Supressed _fields from EmComponent and transforming the EmComponent in a standart object with standarts attributes
9 anos atrás
Yann Weber
7f93063f05
Rank at creation improvement
9 anos atrás
Yann Weber
c9f2f16c77
Added rank handling at component creation
At creation if no rank specified the component will be place last, else you can pass an integer representing an absolute rank or two specials strings 'last' or 'first'
9 anos atrás
Yann Weber
a2529cf8eb
Added a check method to EmComponent and EmClass
EmComponent::check() always return True but rearrange ranks if they are not continuous
9 anos atrás