Yann
12588a37ed
Added a dryrun option to the migration handler and solved a bug in the django patch file
2015-09-16 14:44:43 +02:00
Yann
e5e23defec
Now we use the register_model_state method to migrate the db
...
Added a patch to solve a bug in django/core/management/commands/makemigrations.py w/django/core/management/commands/makemigrations.py
See https://code.djangoproject.com/ticket/24735
2015-09-16 11:55:01 +02:00
Yann
1137205c99
Solved some bugs about conditionnal models instanciation in LodelTestInstance.models
...
Added Lodel/settings/migrations.py that I forget
Disabled the --merge option that was given to the makemigrations command by the MH
2015-09-16 11:03:45 +02:00
Yann
8bea52d740
Code cleaning and adding features to generate models in application only when not testing with the MH
2015-09-16 10:37:23 +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
f8879901f1
Using uniq_name of component for naming Django models
2015-09-11 14:52:56 +02:00
Yann
74f1de0f4b
First version of the DjangoMigrationHandler. Created a LodelTestInstance for tests purpose
...
Some problems are still to solve (see the todo comments in EditorialModel/migrationhandler/django.py )
2015-09-11 14:52:56 +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
Yann
c126922ecd
Cleaning EmType.superiors() comments and variable name
2015-09-11 12:26:22 +02:00
ArnAud
5fb9c8b7b6
EmComponent: get_max_rank() should return an int
2015-09-11 11:30:45 +02:00
Yann
661f7f24ea
Merge branch 'new_me'
2015-09-10 11:48:35 +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
9d77bb6a52
Rewrite tests for EmComponent and Model
2015-08-28 13:48:06 +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
1b3565d890
[Tests EmComponent] Added the support of MlString in check_equals
2015-07-31 17:15:07 +02:00
Roland Haroutiounian
fd87cd8619
[Tests EmComponent] Started the implementation of the create process
2015-07-31 17:11:46 +02:00
Roland Haroutiounian
8e12772546
[Tests - EmComponent] Added the reimplementation of the tests for the save method
...
It should be adjusted once the save method is implemented
2015-07-31 16:04:54 +02:00
Roland Haroutiounian
79b0369007
[Tests EmComponent]
2015-07-31 13:48:15 +02:00
Roland Haroutiounian
ee9a082f42
[Tests - EmComponent] Tests on the init process
2015-07-31 10:12:45 +02:00
Roland Haroutiounian
615e0e8f86
[Tests - EmFieldGroup] Cleaned old and useless comments in the code
2015-07-30 17:07:56 +02:00
Roland Haroutiounian
a9cbd03e17
[Tests - EmFieldGroup] Rewrote the tests for the fields() method of the class
2015-07-30 16:55:54 +02:00
Driky
ac6f791508
Réimplémentation du test TestEmClassCreation
2015-07-30 16:41:49 +02:00
Roland Haroutiounian
e4038f4f3a
[Tests on EmFieldgroup] Added the creation process tests for this class
2015-07-30 16:21:06 +02:00
Roland Haroutiounian
f1d819c254
[EmFieldGroup] Changed the assertions for the init tests with bad arguments
2015-07-30 15:11:28 +02:00
Roland Haroutiounian
03113ae8bf
Changes in the tests for the fieldgroups
2015-07-30 15:04:26 +02:00
Driky
cee5b53445
Correction syntax sur la nouvelle méthode d'ouverture du fichier json
2015-07-30 14:56:17 +02:00
Driky
b94f867764
Correction du warning sur la non fermeture du fichier json du quel est chargé le ME
2015-07-30 14:52:06 +02:00
Roland Haroutiounian
91e12a9df3
Merge branch 'new_me_tests' into new_me
2015-07-30 12:18:26 +02:00
Roland Haroutiounian
ba2ac6880c
[Tests] Changed the tests for the EmField class using the new Model object
2015-07-30 12:17:34 +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
bf5704d361
[Model] pep8+pylint
2015-07-29 11:39:13 +02:00
Roland Haroutiounian
8b2bd59daf
[EmField] pep8+pylint
2015-07-29 10:55:46 +02:00
Roland Haroutiounian
efcd7448d2
[EmFieldGroup] pep8+pylint
2015-07-29 10:54:06 +02:00
Roland Haroutiounian
33d163db8f
[Exceptions] pep8+pylint on exceptions.py
2015-07-29 10:44:52 +02:00
Roland Haroutiounian
ccf36dfe8b
[EditorialModel - classes] pep8+pylint on classes.py
2015-07-29 09:59:28 +02:00
Roland Haroutiounian
ab51b27b78
[migration handler] pylint+pep8 on migrationhandler/dummy.py
2015-07-29 09:55:42 +02:00
Roland Haroutiounian
53c3f1f687
[json_backend] pylint+pep8 on json_backend.py
2015-07-29 09:49:55 +02:00
Yann
6aa32322a0
SHA512 hash for Model
2015-07-24 17:41:08 +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
ArnAud
674f72559d
EmType : implement superiors()
2015-07-24 17:29:30 +02:00
Yann
4dfb751bb3
Removing a debug print
2015-07-24 17:27:23 +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
873edf19a6
[ #45 ] Reimplemented the __eq__ method of the Model class so that it uses the newly defined __hash__ method
2015-07-24 17:19:14 +02:00
Roland Haroutiounian
8a6fdd4c6a
[ #45 ] Added the __hash__ method implementation for the Model class
2015-07-24 17:18:18 +02:00
ArnAud
34fdd8d8b3
EmType: implement select and unselect _field
2015-07-24 17:17:28 +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