diff options
7 files changed, 824 insertions, 1 deletions
diff --git a/Makefile.example b/Makefile.example index 95f390e6f..0ec951651 100644 --- a/Makefile.example +++ b/Makefile.example @@ -117,6 +117,9 @@ build_doc: build_doc_values build_doc_model_graph build_doc_changelog ## generat test: clean ## launch tests cd $(project); $(PYTHON) manage.py test $(apps) +test_verbose: clean ## launch tests with verbose + cd $(project); $(PYTHON) manage.py test -v 2 $(apps) + soft_test: clean ## launch tests without database regeneration cd $(project); $(PYTHON) manage.py test -k --tag gis --exclude-tag ui --exclude-tag libreoffice $(apps) cd $(project); $(PYTHON) manage.py test -k --exclude-tag gis --exclude-tag ui $(apps) @@ -264,6 +267,7 @@ fixtures_operations: archaeological_operations.remaintype \ archaeological_operations.reportstate \ archaeological_operations.recordqualitytype \ + archaeological_operations.culturalattributiontype \ > '../archaeological_operations/fixtures/initial_data-'$(default_data)'.json' cd $(project); $(PYTHON) ./manage.py dumpdata --indent 4 --natural-primary --natural-foreign \ archaeological_operations.relationtype \ @@ -311,6 +315,8 @@ fixtures_finds: archaeological_finds.markingtype \ archaeological_finds.originalreproduction \ archaeological_finds.inventorymarkingpresence \ + archaeological_finds.communicabilitytype \ + archaeological_finds.functionalarea \ > '../archaeological_finds/fixtures/initial_data-'$(default_data)'.json' fixtures_warehouse: diff --git a/archaeological_finds/migrations/0125_data_migration_communicability.json b/archaeological_finds/migrations/0125_data_migration_communicability.json new file mode 100644 index 000000000..4d9e1b52c --- /dev/null +++ b/archaeological_finds/migrations/0125_data_migration_communicability.json @@ -0,0 +1,22 @@ +[ +{ + "model": "archaeological_finds.communicabilitytype", + "fields": { + "label": "Non consultable", + "txt_idx": "non-consultable", + "comment": "", + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.communicabilitytype", + "fields": { + "label": "Non diffusable", + "txt_idx": "non-diffusable", + "comment": "", + "available": true, + "parent": null + } +} +] diff --git a/archaeological_finds/migrations/0125_data_migration_communicability_functionalarea.py b/archaeological_finds/migrations/0125_data_migration_communicability_functionalarea.py new file mode 100644 index 000000000..3734e46d5 --- /dev/null +++ b/archaeological_finds/migrations/0125_data_migration_communicability_functionalarea.py @@ -0,0 +1,29 @@ +import os + +from django.db import migrations +from django.core.management import call_command + + +def load_data(apps, __): + CommunicabilityType = apps.get_model("archaeological_finds", "communicabilitytype") + if not CommunicabilityType.objects.count(): + migration = "0125_data_migration_communicability.json" + json_path = os.sep.join(os.path.abspath(__file__).split(os.sep)[:-1] + [migration]) + call_command("loaddata", json_path) + + FunctionalArea = apps.get_model("archaeological_finds", "functionalarea") + if not FunctionalArea.objects.count(): + migration = "0125_data_migration_functionalarea.json" + json_path = os.sep.join(os.path.abspath(__file__).split(os.sep)[:-1] + [migration]) + call_command("loaddata", json_path) + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_finds', '0124_verbose_names'), + ] + + operations = [ + migrations.RunPython(load_data) + ] diff --git a/archaeological_finds/migrations/0125_data_migration_functionalarea.json b/archaeological_finds/migrations/0125_data_migration_functionalarea.json new file mode 100644 index 000000000..1921eb8dd --- /dev/null +++ b/archaeological_finds/migrations/0125_data_migration_functionalarea.json @@ -0,0 +1,312 @@ +[ +{ + "model": "archaeological_finds.functionalarea", + "fields": { + "label": "architecture / construction / habitat /d\u00e9cor", + "txt_idx": "architecture-construction-habitat-decor", + "comment": "", + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.functionalarea", + "fields": { + "label": "armement / artillerie", + "txt_idx": "armement-artillerie", + "comment": "", + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.functionalarea", + "fields": { + "label": "bijouterie / orf\u00e8vrerie / parure", + "txt_idx": "bijouterie-orfevrerie-parure", + "comment": "", + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.functionalarea", + "fields": { + "label": "dessin", + "txt_idx": "dessin", + "comment": "", + "available": false, + "parent": null + } +}, +{ + "model": "archaeological_finds.functionalarea", + "fields": { + "label": "\u00e9b\u00e9nisterie / menuiserie / mobilier de l'habitat", + "txt_idx": "ebenisterie-menuiserie-mobilier-de-l-habitat", + "comment": "", + "available": false, + "parent": null + } +}, +{ + "model": "archaeological_finds.functionalarea", + "fields": { + "label": "\u00e9maillerie", + "txt_idx": "emaillerie", + "comment": "", + "available": false, + "parent": null + } +}, +{ + "model": "archaeological_finds.functionalarea", + "fields": { + "label": "estampage", + "txt_idx": "estampage", + "comment": "", + "available": false, + "parent": null + } +}, +{ + "model": "archaeological_finds.functionalarea", + "fields": { + "label": "gravure", + "txt_idx": "gravure", + "comment": "", + "available": false, + "parent": null + } +}, +{ + "model": "archaeological_finds.functionalarea", + "fields": { + "label": "harnachement / sellerie", + "txt_idx": "harnachement-sellerie", + "comment": "", + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.functionalarea", + "fields": { + "label": "huisserie / serrurerie", + "txt_idx": "huisserie-serrurerie", + "comment": "", + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.functionalarea", + "fields": { + "label": "outillage / ustensile", + "txt_idx": "outillage-ustensile", + "comment": "", + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.functionalarea", + "fields": { + "label": "lapidaire / statuaire", + "txt_idx": "lapidaire-statuaire", + "comment": "", + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.functionalarea", + "fields": { + "label": "maquettisme / mod\u00e9lisme", + "txt_idx": "maquettisme-modelisme", + "comment": "", + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.functionalarea", + "fields": { + "label": "maroquinerie", + "txt_idx": "maroquinerie", + "comment": "", + "available": false, + "parent": null + } +}, +{ + "model": "archaeological_finds.functionalarea", + "fields": { + "label": "marqueterie", + "txt_idx": "marqueterie", + "comment": "", + "available": false, + "parent": null + } +}, +{ + "model": "archaeological_finds.functionalarea", + "fields": { + "label": "m\u00e9tallurgie / m\u00e9tallerie / fonte", + "txt_idx": "metallurgie-metallerie-fonte", + "comment": "", + "available": false, + "parent": null + } +}, +{ + "model": "archaeological_finds.functionalarea", + "fields": { + "label": "modelage / fa\u00e7onnage", + "txt_idx": "modelage-faconnage", + "comment": "", + "available": false, + "parent": null + } +}, +{ + "model": "archaeological_finds.functionalarea", + "fields": { + "label": "numismatique / monnayage", + "txt_idx": "numismatique-monnayage", + "comment": "", + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.functionalarea", + "fields": { + "label": "ornementation", + "txt_idx": "ornementation", + "comment": "", + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.functionalarea", + "fields": { + "label": "peinture", + "txt_idx": "peinture-", + "comment": "", + "available": false, + "parent": null + } +}, +{ + "model": "archaeological_finds.functionalarea", + "fields": { + "label": "poterie / c\u00e9ramique", + "txt_idx": "poterie-ceramique", + "comment": "", + "available": false, + "parent": null + } +}, +{ + "model": "archaeological_finds.functionalarea", + "fields": { + "label": "pratiques fun\u00e9raires", + "txt_idx": "pratiques-funeraires", + "comment": "", + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.functionalarea", + "fields": { + "label": "reproduction / moulage / galvanoplastie / tirage", + "txt_idx": "reproduction-moulage-galvanoplastie-tirage", + "comment": "", + "available": false, + "parent": null + } +}, +{ + "model": "archaeological_finds.functionalarea", + "fields": { + "label": "sculpture / ronde-bosse / relief", + "txt_idx": "sculpture-ronde-bosse-relief", + "comment": "", + "available": false, + "parent": null + } +}, +{ + "model": "archaeological_finds.functionalarea", + "fields": { + "label": "tabletterie / \u00e9criture / glyptique / inscriptions", + "txt_idx": "tabletterie-ecriture-glyptique-inscriptions", + "comment": "", + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.functionalarea", + "fields": { + "label": "v\u00eatement / habillement / accessoire", + "txt_idx": "vetement-habillement-accessoire", + "comment": "", + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.functionalarea", + "fields": { + "label": "vaisselle / ustensiles / r\u00e9cipients", + "txt_idx": "vaisselle-ustensiles-recipients", + "comment": "", + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.functionalarea", + "fields": { + "label": "vannerie", + "txt_idx": "vannerie", + "comment": "", + "available": false, + "parent": null + } +}, +{ + "model": "archaeological_finds.functionalarea", + "fields": { + "label": "verrerie", + "txt_idx": "verrerie", + "comment": "", + "available": false, + "parent": null + } +}, +{ + "model": "archaeological_finds.functionalarea", + "fields": { + "label": "vitraillerie", + "txt_idx": "vitraillerie", + "comment": "", + "available": false, + "parent": null + } +}, +{ + "model": "archaeological_finds.functionalarea", + "fields": { + "label": "pratiques religieuses", + "txt_idx": "pratiques-religieuses", + "comment": "", + "available": true, + "parent": null + } +} +] diff --git a/archaeological_operations/migrations/0117_data_migration_culturalattributiontype.json b/archaeological_operations/migrations/0117_data_migration_culturalattributiontype.json new file mode 100644 index 000000000..1242a4ada --- /dev/null +++ b/archaeological_operations/migrations/0117_data_migration_culturalattributiontype.json @@ -0,0 +1,431 @@ +[ +{ + "model": "archaeological_operations.culturalattributiontype", + "fields": { + "label": "Acheul\u00e9en", + "txt_idx": "acheuleen", + "comment": "", + "available": true, + "parent": null, + "order": 10 + } +}, +{ + "model": "archaeological_operations.culturalattributiontype", + "fields": { + "label": "Augy-Ste-Pallaye", + "txt_idx": "augy-ste-pallaye", + "comment": "", + "available": true, + "parent": null, + "order": 10 + } +}, +{ + "model": "archaeological_operations.culturalattributiontype", + "fields": { + "label": "Aurignacien", + "txt_idx": "aurignacien", + "comment": "", + "available": true, + "parent": null, + "order": 10 + } +}, +{ + "model": "archaeological_operations.culturalattributiontype", + "fields": { + "label": "Azilien", + "txt_idx": "azilien", + "comment": "", + "available": true, + "parent": null, + "order": 10 + } +}, +{ + "model": "archaeological_operations.culturalattributiontype", + "fields": { + "label": "Bad\u00e9goulien", + "txt_idx": "badegoulien", + "comment": "", + "available": true, + "parent": null, + "order": 10 + } +}, +{ + "model": "archaeological_operations.culturalattributiontype", + "fields": { + "label": "Campaniforme", + "txt_idx": "campaniforme", + "comment": "", + "available": true, + "parent": null, + "order": 10 + } +}, +{ + "model": "archaeological_operations.culturalattributiontype", + "fields": { + "label": "Cap\u00e9tien", + "txt_idx": "capetien", + "comment": "", + "available": true, + "parent": null, + "order": 10 + } +}, +{ + "model": "archaeological_operations.culturalattributiontype", + "fields": { + "label": "Cardial", + "txt_idx": "cardial", + "comment": "", + "available": true, + "parent": null, + "order": 10 + } +}, +{ + "model": "archaeological_operations.culturalattributiontype", + "fields": { + "label": "Cardial ou \u00e9picardial", + "txt_idx": "cardial-ou-epicardial", + "comment": "", + "available": true, + "parent": null, + "order": 10 + } +}, +{ + "model": "archaeological_operations.culturalattributiontype", + "fields": { + "label": "Carolingien", + "txt_idx": "carolingien", + "comment": "", + "available": true, + "parent": null, + "order": 10 + } +}, +{ + "model": "archaeological_operations.culturalattributiontype", + "fields": { + "label": "Cerny", + "txt_idx": "cerny", + "comment": "", + "available": true, + "parent": null, + "order": 10 + } +}, +{ + "model": "archaeological_operations.culturalattributiontype", + "fields": { + "label": "Chass\u00e9en", + "txt_idx": "chasseen", + "comment": "", + "available": true, + "parent": null, + "order": 10 + } +}, +{ + "model": "archaeological_operations.culturalattributiontype", + "fields": { + "label": "Ch\u00e2telperronien", + "txt_idx": "chatelperronien", + "comment": "", + "available": true, + "parent": null, + "order": 10 + } +}, +{ + "model": "archaeological_operations.culturalattributiontype", + "fields": { + "label": "Civilisation Sa\u00f4ne-Rh\u00f4ne", + "txt_idx": "civilisation-saone-rhone", + "comment": "", + "available": true, + "parent": null, + "order": 10 + } +}, +{ + "model": "archaeological_operations.culturalattributiontype", + "fields": { + "label": "Conguel", + "txt_idx": "conguel", + "comment": "", + "available": true, + "parent": null, + "order": 10 + } +}, +{ + "model": "archaeological_operations.culturalattributiontype", + "fields": { + "label": "Cord\u00e9", + "txt_idx": "corde", + "comment": "", + "available": true, + "parent": null, + "order": 10 + } +}, +{ + "model": "archaeological_operations.culturalattributiontype", + "fields": { + "label": "Culture d'Artenac", + "txt_idx": "culture-dartenac", + "comment": "", + "available": true, + "parent": null, + "order": 10 + } +}, +{ + "model": "archaeological_operations.culturalattributiontype", + "fields": { + "label": "Culture Seine-Oise-Marne", + "txt_idx": "culture-seine-oise-marne", + "comment": "", + "available": true, + "parent": null, + "order": 10 + } +}, +{ + "model": "archaeological_operations.culturalattributiontype", + "fields": { + "label": "D\u00e9bitage Levallois", + "txt_idx": "debitage-levallois", + "comment": "", + "available": true, + "parent": null, + "order": 10 + } +}, +{ + "model": "archaeological_operations.culturalattributiontype", + "fields": { + "label": "\u00c9picardial", + "txt_idx": "epicardial", + "comment": "", + "available": true, + "parent": null, + "order": 10 + } +}, +{ + "model": "archaeological_operations.culturalattributiontype", + "fields": { + "label": "Ferri\u00e8res", + "txt_idx": "ferrieres", + "comment": "", + "available": true, + "parent": null, + "order": 10 + } +}, +{ + "model": "archaeological_operations.culturalattributiontype", + "fields": { + "label": "Fontbouisse", + "txt_idx": "fontbouisse", + "comment": "", + "available": true, + "parent": null, + "order": 10 + } +}, +{ + "model": "archaeological_operations.culturalattributiontype", + "fields": { + "label": "Gaule celtique", + "txt_idx": "gaule-celtique", + "comment": "", + "available": true, + "parent": null, + "order": 10 + } +}, +{ + "model": "archaeological_operations.culturalattributiontype", + "fields": { + "label": "Gaule celtique/romaine", + "txt_idx": "gaule-celtique-romaine", + "comment": "", + "available": true, + "parent": null, + "order": 10 + } +}, +{ + "model": "archaeological_operations.culturalattributiontype", + "fields": { + "label": "Gaule romaine", + "txt_idx": "gaule-romaine", + "comment": "", + "available": true, + "parent": null, + "order": 10 + } +}, +{ + "model": "archaeological_operations.culturalattributiontype", + "fields": { + "label": "Gravettien", + "txt_idx": "gravettien", + "comment": "", + "available": true, + "parent": null, + "order": 10 + } +}, +{ + "model": "archaeological_operations.culturalattributiontype", + "fields": { + "label": "Grossgartach", + "txt_idx": "grossgartach", + "comment": "", + "available": true, + "parent": null, + "order": 10 + } +}, +{ + "model": "archaeological_operations.culturalattributiontype", + "fields": { + "label": "K\u00e9rugou", + "txt_idx": "kerugou", + "comment": "", + "available": true, + "parent": null, + "order": 10 + } +}, +{ + "model": "archaeological_operations.culturalattributiontype", + "fields": { + "label": "Magdal\u00e9nien", + "txt_idx": "magdalenien", + "comment": "", + "available": true, + "parent": null, + "order": 10 + } +}, +{ + "model": "archaeological_operations.culturalattributiontype", + "fields": { + "label": "Matignons", + "txt_idx": "matignons", + "comment": "", + "available": true, + "parent": null, + "order": 10 + } +}, +{ + "model": "archaeological_operations.culturalattributiontype", + "fields": { + "label": "M\u00e9rovingien", + "txt_idx": "merovingien", + "comment": "", + "available": true, + "parent": null, + "order": 10 + } +}, +{ + "model": "archaeological_operations.culturalattributiontype", + "fields": { + "label": "Moust\u00e9rien", + "txt_idx": "mousterien", + "comment": "", + "available": true, + "parent": null, + "order": 10 + } +}, +{ + "model": "archaeological_operations.culturalattributiontype", + "fields": { + "label": "Peu-Richard", + "txt_idx": "peu-richard", + "comment": "", + "available": true, + "parent": null, + "order": 10 + } +}, +{ + "model": "archaeological_operations.culturalattributiontype", + "fields": { + "label": "Robenhausien", + "txt_idx": "robenhausien", + "comment": "", + "available": true, + "parent": null, + "order": 10 + } +}, +{ + "model": "archaeological_operations.culturalattributiontype", + "fields": { + "label": "RRBP", + "txt_idx": "rrbp", + "comment": "", + "available": true, + "parent": null, + "order": 10 + } +}, +{ + "model": "archaeological_operations.culturalattributiontype", + "fields": { + "label": "Ruban\u00e9", + "txt_idx": "rubane", + "comment": "", + "available": true, + "parent": null, + "order": 10 + } +}, +{ + "model": "archaeological_operations.culturalattributiontype", + "fields": { + "label": "Solutr\u00e9en", + "txt_idx": "solutreen", + "comment": "", + "available": true, + "parent": null, + "order": 10 + } +}, +{ + "model": "archaeological_operations.culturalattributiontype", + "fields": { + "label": "Tardenoisien", + "txt_idx": "tardenoisien", + "comment": "", + "available": true, + "parent": null, + "order": 10 + } +}, +{ + "model": "archaeological_operations.culturalattributiontype", + "fields": { + "label": "Viking", + "txt_idx": "viking", + "comment": "", + "available": true, + "parent": null, + "order": 10 + } +} +] diff --git a/archaeological_operations/migrations/0117_data_migration_culturalattributiontype.py b/archaeological_operations/migrations/0117_data_migration_culturalattributiontype.py new file mode 100644 index 000000000..4838cf4b2 --- /dev/null +++ b/archaeological_operations/migrations/0117_data_migration_culturalattributiontype.py @@ -0,0 +1,23 @@ +import os + +from django.db import migrations +from django.core.management import call_command + + +def load_data(apps, __): + CulturalAttributionType = apps.get_model("archaeological_operations", "culturalattributiontype") + if not CulturalAttributionType.objects.count(): + migration = "0117_data_migration_culturalattributiontype.json" + json_path = os.sep.join(os.path.abspath(__file__).split(os.sep)[:-1] + [migration]) + call_command("loaddata", json_path) + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_operations', '0116_deposit_dates'), + ] + + operations = [ + migrations.RunPython(load_data) + ] diff --git a/install/ishtar-prepare-instance b/install/ishtar-prepare-instance index 9a4030dca..9a98d313c 100755 --- a/install/ishtar-prepare-instance +++ b/install/ishtar-prepare-instance @@ -386,7 +386,7 @@ EOF $PYTHON ./manage.py migrate cecho y " - loading fixtures" - FIXTURES="$DEST/fixtures/initial_data-auth-fr.json $ISHTAR_LIB_PATH/ishtar_common/fixtures/initial_data-fr.json $ISHTAR_LIB_PATH/ishtar_common/fixtures/initial_importtypes-fr.json $ISHTAR_LIB_PATH/archaeological_operations/fixtures/initial_data-fr.json $ISHTAR_LIB_PATH/archaeological_operations/fixtures/initial_data_relation_type_norel-fr.json $ISHTAR_LIB_PATH/archaeological_operations/fixtures/initial_data_relation_type-fr.json $ISHTAR_LIB_PATH/archaeological_context_records/fixtures/initial_data-fr.json $ISHTAR_LIB_PATH/archaeological_context_records/fixtures/initial_data_relation_type_norel-fr.json $ISHTAR_LIB_PATH/archaeological_context_records/fixtures/initial_data_relation_type-fr.json $ISHTAR_LIB_PATH/archaeological_files/fixtures/initial_data-fr.json $ISHTAR_LIB_PATH/archaeological_finds/fixtures/initial_data-fr.json $ISHTAR_LIB_PATH/archaeological_warehouse/fixtures/initial_data-fr.json" + FIXTURES="$DEST/fixtures/initial_data-auth-fr.json $ISHTAR_LIB_PATH/ishtar_common/fixtures/initial_data-fr.json $ISHTAR_LIB_PATH/ishtar_common/fixtures/initial_importtypes-fr.json $ISHTAR_LIB_PATH/ishtar_common/fixtures/initial_geo-fr.json $ISHTAR_LIB_PATH/archaeological_operations/fixtures/initial_data-fr.json $ISHTAR_LIB_PATH/archaeological_operations/fixtures/initial_data_relation_type_norel-fr.json $ISHTAR_LIB_PATH/archaeological_operations/fixtures/initial_data_relation_type-fr.json $ISHTAR_LIB_PATH/archaeological_context_records/fixtures/initial_data-fr.json $ISHTAR_LIB_PATH/archaeological_context_records/fixtures/initial_data_relation_type_norel-fr.json $ISHTAR_LIB_PATH/archaeological_context_records/fixtures/initial_data_relation_type-fr.json $ISHTAR_LIB_PATH/archaeological_files/fixtures/initial_data-fr.json $ISHTAR_LIB_PATH/archaeological_finds/fixtures/initial_data-fr.json $ISHTAR_LIB_PATH/archaeological_warehouse/fixtures/initial_data-fr.json" for data in $FIXTURES; do echo $data; $PYTHON ./manage.py loaddata $data; |