From d47416273d7da0bdb7a09f26ebd49b01e1f57a25 Mon Sep 17 00:00:00 2001 From: Dana Lambert Date: Fri, 15 Oct 2021 14:34:48 +1300 Subject: [PATCH] Add django fixtures for base data --- backend/right_tree/api/data/__init__.py | 0 .../api/data/fixtures/eco_regions.json | 555 ++++++++++++++++++ .../data/fixtures/soil_order_mappings.json | 170 ++++++ .../api/data/fixtures/soil_variants.json | 23 + .../api/data/fixtures/tolerance_levels.json | 23 + 5 files changed, 771 insertions(+) create mode 100644 backend/right_tree/api/data/__init__.py create mode 100644 backend/right_tree/api/data/fixtures/eco_regions.json create mode 100644 backend/right_tree/api/data/fixtures/soil_order_mappings.json create mode 100644 backend/right_tree/api/data/fixtures/soil_variants.json create mode 100644 backend/right_tree/api/data/fixtures/tolerance_levels.json diff --git a/backend/right_tree/api/data/__init__.py b/backend/right_tree/api/data/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/backend/right_tree/api/data/fixtures/eco_regions.json b/backend/right_tree/api/data/fixtures/eco_regions.json new file mode 100644 index 0000000..7663a85 --- /dev/null +++ b/backend/right_tree/api/data/fixtures/eco_regions.json @@ -0,0 +1,555 @@ +[ + { + "model": "api.ecologicalregion", + "pk": 1, + "fields": { + "name": "Aorrangi" + } + }, + { + "model": "api.ecologicalregion", + "pk": 2, + "fields": { + "name": "Aspiring" + } + }, + { + "model": "api.ecologicalregion", + "pk": 3, + "fields": { + "name": "Auckland" + } + }, + { + "model": "api.ecologicalregion", + "pk": 4, + "fields": { + "name": "Banks" + } + }, + { + "model": "api.ecologicalregion", + "pk": 5, + "fields": { + "name": "Canterbury Foothills" + } + }, + { + "model": "api.ecologicalregion", + "pk": 6, + "fields": { + "name": "Canterbury Plains" + } + }, + { + "model": "api.ecologicalregion", + "pk": 7, + "fields": { + "name": "Catlins" + } + }, + { + "model": "api.ecologicalregion", + "pk": 8, + "fields": { + "name": "Central Otago" + } + }, + { + "model": "api.ecologicalregion", + "pk": 9, + "fields": { + "name": "Central Volcanic Plateau" + } + }, + { + "model": "api.ecologicalregion", + "pk": 10, + "fields": { + "name": "Clarence" + } + }, + { + "model": "api.ecologicalregion", + "pk": 11, + "fields": { + "name": "Coromandel" + } + }, + { + "model": "api.ecologicalregion", + "pk": 12, + "fields": { + "name": "D'Archiac" + } + }, + { + "model": "api.ecologicalregion", + "pk": 13, + "fields": { + "name": "East Cape" + } + }, + { + "model": "api.ecologicalregion", + "pk": 14, + "fields": { + "name": "Eastern Hawkes Bay" + } + }, + { + "model": "api.ecologicalregion", + "pk": 15, + "fields": { + "name": "Eastern Northland" + } + }, + { + "model": "api.ecologicalregion", + "pk": 16, + "fields": { + "name": "Eastern Volcanic Plateau" + } + }, + { + "model": "api.ecologicalregion", + "pk": 17, + "fields": { + "name": "Eastern Wairarapa" + } + }, + { + "model": "api.ecologicalregion", + "pk": 18, + "fields": { + "name": "Egmont" + } + }, + { + "model": "api.ecologicalregion", + "pk": 19, + "fields": { + "name": "Fiord" + } + }, + { + "model": "api.ecologicalregion", + "pk": 20, + "fields": { + "name": "Gore" + } + }, + { + "model": "api.ecologicalregion", + "pk": 21, + "fields": { + "name": "Hawdon" + } + }, + { + "model": "api.ecologicalregion", + "pk": 22, + "fields": { + "name": "Hawkes Bay" + } + }, + { + "model": "api.ecologicalregion", + "pk": 23, + "fields": { + "name": "Heron" + } + }, + { + "model": "api.ecologicalregion", + "pk": 24, + "fields": { + "name": "Inland Marlborough" + } + }, + { + "model": "api.ecologicalregion", + "pk": 25, + "fields": { + "name": "Kaikoura" + } + }, + { + "model": "api.ecologicalregion", + "pk": 26, + "fields": { + "name": "Kaimanawa" + } + }, + { + "model": "api.ecologicalregion", + "pk": 27, + "fields": { + "name": "Kaipara" + } + }, + { + "model": "api.ecologicalregion", + "pk": 28, + "fields": { + "name": "Kakanui" + } + }, + { + "model": "api.ecologicalregion", + "pk": 29, + "fields": { + "name": "King Country" + } + }, + { + "model": "api.ecologicalregion", + "pk": 30, + "fields": { + "name": "Lakes" + } + }, + { + "model": "api.ecologicalregion", + "pk": 31, + "fields": { + "name": "Lammerlaw" + } + }, + { + "model": "api.ecologicalregion", + "pk": 32, + "fields": { + "name": "Lowry" + } + }, + { + "model": "api.ecologicalregion", + "pk": 33, + "fields": { + "name": "MacKenzie" + } + }, + { + "model": "api.ecologicalregion", + "pk": 34, + "fields": { + "name": "Makarewa" + } + }, + { + "model": "api.ecologicalregion", + "pk": 35, + "fields": { + "name": "Manawatu" + } + }, + { + "model": "api.ecologicalregion", + "pk": 36, + "fields": { + "name": "Manawatu Gorge" + } + }, + { + "model": "api.ecologicalregion", + "pk": 37, + "fields": { + "name": "Mavora" + } + }, + { + "model": "api.ecologicalregion", + "pk": 38, + "fields": { + "name": "Moawhango" + } + }, + { + "model": "api.ecologicalregion", + "pk": 39, + "fields": { + "name": "Molesworth" + } + }, + { + "model": "api.ecologicalregion", + "pk": 40, + "fields": { + "name": "Nelson" + } + }, + { + "model": "api.ecologicalregion", + "pk": 41, + "fields": { + "name": "North Westland" + } + }, + { + "model": "api.ecologicalregion", + "pk": 42, + "fields": { + "name": "North-west Nelson" + } + }, + { + "model": "api.ecologicalregion", + "pk": 43, + "fields": { + "name": "Northern Northland" + } + }, + { + "model": "api.ecologicalregion", + "pk": 44, + "fields": { + "name": "Northern Volcanic Plateau" + } + }, + { + "model": "api.ecologicalregion", + "pk": 45, + "fields": { + "name": "Olivine" + } + }, + { + "model": "api.ecologicalregion", + "pk": 46, + "fields": { + "name": "Otago Coast" + } + }, + { + "model": "api.ecologicalregion", + "pk": 47, + "fields": { + "name": "Pahiatua" + } + }, + { + "model": "api.ecologicalregion", + "pk": 48, + "fields": { + "name": "Pareora" + } + }, + { + "model": "api.ecologicalregion", + "pk": 49, + "fields": { + "name": "Poor Knights" + } + }, + { + "model": "api.ecologicalregion", + "pk": 50, + "fields": { + "name": "Puketeraki" + } + }, + { + "model": "api.ecologicalregion", + "pk": 51, + "fields": { + "name": "Rakiura" + } + }, + { + "model": "api.ecologicalregion", + "pk": 52, + "fields": { + "name": "Rangitikei" + } + }, + { + "model": "api.ecologicalregion", + "pk": 53, + "fields": { + "name": "Raukumara" + } + }, + { + "model": "api.ecologicalregion", + "pk": 54, + "fields": { + "name": "Richmond" + } + }, + { + "model": "api.ecologicalregion", + "pk": 55, + "fields": { + "name": "Rodney" + } + }, + { + "model": "api.ecologicalregion", + "pk": 56, + "fields": { + "name": "Ruahine" + } + }, + { + "model": "api.ecologicalregion", + "pk": 57, + "fields": { + "name": "Sounds-Wellington" + } + }, + { + "model": "api.ecologicalregion", + "pk": 58, + "fields": { + "name": "Southland Foothills" + } + }, + { + "model": "api.ecologicalregion", + "pk": 59, + "fields": { + "name": "Spenser" + } + }, + { + "model": "api.ecologicalregion", + "pk": 60, + "fields": { + "name": "Tainui" + } + }, + { + "model": "api.ecologicalregion", + "pk": 61, + "fields": { + "name": "Taranaki" + } + }, + { + "model": "api.ecologicalregion", + "pk": 62, + "fields": { + "name": "Tararua" + } + }, + { + "model": "api.ecologicalregion", + "pk": 63, + "fields": { + "name": "Tasman" + } + }, + { + "model": "api.ecologicalregion", + "pk": 64, + "fields": { + "name": "Te Paki" + } + }, + { + "model": "api.ecologicalregion", + "pk": 65, + "fields": { + "name": "Te Wae Wae" + } + }, + { + "model": "api.ecologicalregion", + "pk": 66, + "fields": { + "name": "Three Kings" + } + }, + { + "model": "api.ecologicalregion", + "pk": 67, + "fields": { + "name": "Tongariro" + } + }, + { + "model": "api.ecologicalregion", + "pk": 68, + "fields": { + "name": "Urewera" + } + }, + { + "model": "api.ecologicalregion", + "pk": 69, + "fields": { + "name": "Waikaia" + } + }, + { + "model": "api.ecologicalregion", + "pk": 70, + "fields": { + "name": "Waikato" + } + }, + { + "model": "api.ecologicalregion", + "pk": 71, + "fields": { + "name": "Wainono" + } + }, + { + "model": "api.ecologicalregion", + "pk": 72, + "fields": { + "name": "Wairarapa Plains" + } + }, + { + "model": "api.ecologicalregion", + "pk": 73, + "fields": { + "name": "Wairau" + } + }, + { + "model": "api.ecologicalregion", + "pk": 74, + "fields": { + "name": "Wairoa" + } + }, + { + "model": "api.ecologicalregion", + "pk": 75, + "fields": { + "name": "Waitaki" + } + }, + { + "model": "api.ecologicalregion", + "pk": 76, + "fields": { + "name": "Western Northland" + } + }, + { + "model": "api.ecologicalregion", + "pk": 77, + "fields": { + "name": "Western Volcanic Plateau" + } + }, + { + "model": "api.ecologicalregion", + "pk": 78, + "fields": { + "name": "Whataroa" + } + }, + { + "model": "api.ecologicalregion", + "pk": 79, + "fields": { + "name": "Whatkatane" + } + } +] \ No newline at end of file diff --git a/backend/right_tree/api/data/fixtures/soil_order_mappings.json b/backend/right_tree/api/data/fixtures/soil_order_mappings.json new file mode 100644 index 0000000..39847c5 --- /dev/null +++ b/backend/right_tree/api/data/fixtures/soil_order_mappings.json @@ -0,0 +1,170 @@ +[ + { + "model": "api.soilorder", + "pk": 1, + "fields": { + "code": "A", + "name": "Anthropic" + } + }, + { + "model": "api.soilorder", + "pk": 2, + "fields": { + "code": "B", + "name": "Brown" + } + }, + { + "model": "api.soilorder", + "pk": 3, + "fields": { + "code": "G", + "name": "Gley" + } + }, + { + "model": "api.soilorder", + "pk": 4, + "fields": { + "code": "L", + "name": "Allophanic" + } + }, + { + "model": "api.soilorder", + "pk": 5, + "fields": { + "code": "N", + "name": "Granular" + } + }, + { + "model": "api.soilorder", + "pk": 6, + "fields": { + "code": "E", + "name": "Melanic" + } + }, + { + "model": "api.soilorder", + "pk": 7, + "fields": { + "code": "O", + "name": "Organic" + } + }, + { + "model": "api.soilorder", + "pk": 8, + "fields": { + "code": "X", + "name": "Oxidic" + } + }, + { + "model": "api.soilorder", + "pk": 9, + "fields": { + "code": "P", + "name": "Pallic" + } + }, + { + "model": "api.soilorder", + "pk": 10, + "fields": { + "code": "Z", + "name": "Podzol" + } + }, + { + "model": "api.soilorder", + "pk": 11, + "fields": { + "code": "M", + "name": "Pumice" + } + }, + { + "model": "api.soilorder", + "pk": 12, + "fields": { + "code": "W", + "name": "Raw" + } + }, + { + "model": "api.soilorder", + "pk": 13, + "fields": { + "code": "R", + "name": "Recent" + } + }, + { + "model": "api.soilorder", + "pk": 14, + "fields": { + "code": "S", + "name": "Semi" + } + }, + { + "model": "api.soilorder", + "pk": 15, + "fields": { + "code": "U", + "name": "Ultic" + } + }, + { + "model": "api.soilorder", + "pk": 16, + "fields": { + "code": "i", + "name": "Ice" + } + }, + { + "model": "api.soilorder", + "pk": 17, + "fields": { + "code": "t", + "name": "Town" + } + }, + { + "model": "api.soilorder", + "pk": 18, + "fields": { + "code": "r", + "name": "River" + } + }, + { + "model": "api.soilorder", + "pk": 19, + "fields": { + "code": "e", + "name": "Estu" + } + }, + { + "model": "api.soilorder", + "pk": 20, + "fields": { + "code": "l", + "name": "Lake" + } + }, + { + "model": "api.soilorder", + "pk": 21, + "fields": { + "code": "q", + "name": "Quar" + } + } +] \ No newline at end of file diff --git a/backend/right_tree/api/data/fixtures/soil_variants.json b/backend/right_tree/api/data/fixtures/soil_variants.json new file mode 100644 index 0000000..0d882b3 --- /dev/null +++ b/backend/right_tree/api/data/fixtures/soil_variants.json @@ -0,0 +1,23 @@ +[ + { + "model": "api.soilvariant", + "pk": 1, + "fields": { + "name": "Wet" + } + }, + { + "model": "api.soilvariant", + "pk": 2, + "fields": { + "name": "Mesic" + } + }, + { + "model": "api.soilvariant", + "pk": 3, + "fields": { + "name": "Dry" + } + } +] \ No newline at end of file diff --git a/backend/right_tree/api/data/fixtures/tolerance_levels.json b/backend/right_tree/api/data/fixtures/tolerance_levels.json new file mode 100644 index 0000000..165a754 --- /dev/null +++ b/backend/right_tree/api/data/fixtures/tolerance_levels.json @@ -0,0 +1,23 @@ +[ + { + "model": "api.tolerancelevel", + "pk": 1, + "fields": { + "level": "M" + } + }, + { + "model": "api.tolerancelevel", + "pk": 2, + "fields": { + "level": "H" + } + }, + { + "model": "api.tolerancelevel", + "pk": 3, + "fields": { + "level": "L" + } + } +] \ No newline at end of file