Yann
10379c6a95
Fieldgroups are deleted
2015-11-04 13:52:58 +01:00
Yann
36ffdfdf0c
Some bugfix in components.max_rank model.create_component in the random em generator and in the file fieldtype
2015-10-29 16:28:23 +01:00
Yann
1c4e2ddba8
Some Doxygen comments fix
2015-10-22 11:25:23 +02:00
Roland Haroutiounian
8058785023
PEP8/Pylint on components.py
2015-09-30 12:02:29 +02:00
Yann
2dc226c65a
Fixed a bug in set_rank()
...
When the list is empty new_rank is > get_max_rank, because get_max_rank returns -1
2015-09-25 16:40:15 +02:00
Yann
58837a0ed4
Fix modify_rank and associated tests
...
Now modify_rank don't raise anymore when too big/small modifier is given but do its best to make a valid modification
The modify_rank tests (and the __hash__ __cmp__ tests) has been modified to fit this new behavior
2015-09-24 15:28:25 +02:00
Yann
6fa5a2a7f6
Reimplementation of get_max_rank for EmComponent + little correction in hash test
2015-09-24 15:01:18 +02:00
ArnAud
9cc01fec46
EmComponent : lint + pep8
2015-09-24 14:35:46 +02:00
ArnAud
4d1e687065
EmComponent : introduce attr_flat => reusable flattened attribut list of a component
2015-09-24 14:03:19 +02:00
ArnAud
5f0f5dd3bf
EmComponent: convert attr_dump attribut to a method
2015-09-24 12:20:20 +02:00
ArnAud
90fcecd015
EmComponent: make the __hash__ function always return the same hash !
2015-09-23 17:26:19 +02:00
Roland Haroutiounian
e4dfc1bb7a
[ #49 ] Changes made in the unit tests for test_model
2015-09-23 09:34:43 +02:00
Yann
3109cc72bd
Deleted deprecated methos new_uid from EmComponent
2015-09-18 15:44:36 +02:00
Roland Haroutiounian
88d79a0a22
[ #49 ] added an existence test for the "model" property in EmComponent.dumps()
2015-09-18 15:39:05 +02:00
Roland Haroutiounian
8ddf179e8f
Merge branch 't49'
2015-09-18 15:32:16 +02:00
Roland Haroutiounian
f1a264ac59
[ #49 ] Removed the string casting in attr_dump
2015-09-18 15:31:33 +02:00
ArnAud
9131f7bcd2
EmField: type attribute is now called fieldtype
2015-09-18 14:58:13 +02:00
Roland Haroutiounian
f0c760fdb0
[ #49 ] Took off the "model" property from the component dump
2015-09-18 14:19:58 +02:00
Roland Haroutiounian
e6de8b7a8b
[ #49 ] Changed the value format used for the component in its attr_dump method
2015-09-18 14:01:35 +02:00
Yann
18695e3a72
Implement the BackendJson save method
2015-09-18 12:23:00 +02:00
Yann
d199d571bd
Cleaning & commenting + adding warning
2015-09-18 11:17:47 +02:00
Yann
aa6e01bff0
Dirty comit of a djago MH that "works"
...
Code cleaning, commenting etc needed...
2015-09-16 09:53:03 +02:00
Yann
17c1eba918
Solved a bug about checking ranks and getting max rank
2015-09-11 14:51:38 +02:00
Yann
46dfe3a7ba
Added a new @property to EmComponent uniq_name
2015-09-11 14:32:16 +02:00
ArnAud
5fb9c8b7b6
EmComponent: get_max_rank() should return an int
2015-09-11 11:30:45 +02:00
Yann
e530211a1e
Comments update
2015-09-10 11:46:51 +02:00
Yann
0901c29a33
Bugfix on EmComponent.check()
2015-08-28 13:48:36 +02:00
Yann
d2f6509397
Checking type of model argument (without importing Model)
...
The check is done on the __class__.__name__ attr of model argument (maybe not a good solution ?)
2015-08-28 09:49:54 +02:00
Roland Haroutiounian
113deb302d
[EmComponent] added a test to not take uids into account in the hash computation process
2015-07-29 16:52:31 +02:00
Roland Haroutiounian
0bf24b6c48
[ #45 ] Changed the return of the hash methods, we get integer instead of string
2015-07-24 17:30:42 +02:00
Yann
084b8af6c1
MigrationHandler enhancement (now records Model's hash for each changes). Better beaviour of Model.create_component if MigrationHandler raises
2015-07-24 17:23:12 +02:00
Roland Haroutiounian
8a6fdd4c6a
[ #45 ] Added the __hash__ method implementation for the Model class
2015-07-24 17:18:18 +02:00
Roland Haroutiounian
c916801c99
[ #45 ] Changed the __hash__ implementation of the EmComponent class
2015-07-24 16:53:55 +02:00
Yann
ed9133016f
Fixing component deletion
2015-07-24 16:50:24 +02:00
Yann
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)
2015-07-24 16:36:21 +02:00
Yann
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
2015-07-24 15:42:24 +02:00
Yann
405dd318dd
Added type check in EmComponent and childs class type check. Added some cast functions to Backend
2015-07-24 12:46:04 +02:00
Yann
b6ef37752f
Supressed _fields from EmComponent and transforming the EmComponent in a standart object with standarts attributes
2015-07-24 12:03:39 +02:00
Yann
a2529cf8eb
Added a check method to EmComponent and EmClass
...
EmComponent::check() always return True but rearrange ranks if they are not continuous
2015-07-23 17:32:18 +02:00
Yann
8bf864c597
Handling rank sorting in Model and rank modifier in EmComponent
2015-07-23 16:22:36 +02:00
ArnAud
4803eba6a7
EmComponent: access to model is now named model !!
2015-07-23 14:11:57 +02:00
Yann
b87c276b26
Now EmComponents gets a Model instance when instanciate, and the Model._components dict structure has change a bit
...
Model._components now contains only one dict ( 'uids' key ) and the others are now list of EmComponent instances
Model now handle EVERY access to the _components dict
2015-07-23 14:02:48 +02:00
Yann
6a56b31ba5
Migrating EmClass methods and EmComponent.delete according to the new Model object, changed the Model.components dict keys (and the json test file)
...
There is now two methods Model.name_from_emclass and emclass_from_name that allows to access the Model.components array
2015-07-23 11:24:57 +02:00
ArnAud
79336030c7
EM: store in each component a reference to the list of the other
2015-07-22 14:59:14 +02:00
ArnAud
c73251795c
EM: first draft for a Model Class
2015-07-16 14:36:05 +02:00
ArnAud
1d2c069fb8
EmComponent: get rid of database functions
2015-07-16 14:35:01 +02:00
Roland Haroutiounian
79c168587e
[pep8] Correction sur les lignes vides entre les classes et les méthodes
2015-07-10 09:01:00 +02:00
Yann
889abc8547
Put the database configuration asinstance attribute of EmComponent
2015-07-09 17:30:21 +02:00
Yann
cd37b0129f
Better comments for set_rank method
2015-07-08 09:13:03 +02:00
Yann
d7d4a989f1
TODO on EmComponent
2015-07-03 09:41:06 +02:00