-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add gdd ingestor * Add fixtures for GDDConfig, GDDMatrix and Crop; Refcatored unique_together constraint * rm GDD traces * fix: pk values with names * rm dependency
- Loading branch information
1 parent
35dbabc
commit 5b7ef14
Showing
5 changed files
with
1,762 additions
and
1 deletion.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
django_project/dcas/migrations/0005_alter_gddmatrix_unique_together.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Generated by Django 4.2.7 on 2025-01-14 12:49 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('dcas', '0004_dcasrequest_dcasoutput_dcaserrorlog'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterUniqueTogether( | ||
name='gddmatrix', | ||
unique_together={('crop', 'crop_stage_type', 'config', 'crop_growth_stage', 'gdd_threshold')}, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
[ | ||
{ | ||
"model": "gap.crop", | ||
"pk": 2, | ||
"fields": { | ||
"name": "Maize" | ||
} | ||
}, | ||
{ | ||
"model": "gap.crop", | ||
"pk": 8, | ||
"fields": { | ||
"name": "Finger Millet" | ||
} | ||
}, | ||
{ | ||
"model": "gap.crop", | ||
"pk": 6, | ||
"fields": { | ||
"name": "Sorghum" | ||
} | ||
}, | ||
{ | ||
"model": "gap.crop", | ||
"pk": 10, | ||
"fields": { | ||
"name": "Cassava" | ||
} | ||
}, | ||
{ | ||
"model": "gap.crop", | ||
"pk": 3, | ||
"fields": { | ||
"name": "Potatoes" | ||
} | ||
}, | ||
{ | ||
"model": "gap.crop", | ||
"pk": 5, | ||
"fields": { | ||
"name": "Sunflower" | ||
} | ||
}, | ||
{ | ||
"model": "gap.crop", | ||
"pk": 7, | ||
"fields": { | ||
"name": "Soybeans" | ||
} | ||
}, | ||
{ | ||
"model": "gap.crop", | ||
"pk": 4, | ||
"fields": { | ||
"name": "Green Grams" | ||
} | ||
}, | ||
{ | ||
"model": "gap.crop", | ||
"pk": 9, | ||
"fields": { | ||
"name": "Cowpea" | ||
} | ||
}, | ||
{ | ||
"model": "gap.crop", | ||
"pk": 1, | ||
"fields": { | ||
"name": "Common Beans" | ||
} | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
[ | ||
{ | ||
"model": "dcas.gddconfig", | ||
"pk": 1, | ||
"fields": { | ||
"crop": 2, | ||
"base_temperature": 10, | ||
"cap_temperature": 35, | ||
"config": 1 | ||
} | ||
}, | ||
{ | ||
"model": "dcas.gddconfig", | ||
"pk": 2, | ||
"fields": { | ||
"crop": 8, | ||
"base_temperature": 9, | ||
"cap_temperature": 25, | ||
"config": 1 | ||
} | ||
}, | ||
{ | ||
"model": "dcas.gddconfig", | ||
"pk": 3, | ||
"fields": { | ||
"crop": 6, | ||
"base_temperature": 10, | ||
"cap_temperature": 35, | ||
"config": 1 | ||
} | ||
}, | ||
{ | ||
"model": "dcas.gddconfig", | ||
"pk": 4, | ||
"fields": { | ||
"crop": 10, | ||
"base_temperature": 12, | ||
"cap_temperature": 35, | ||
"config": 1 | ||
} | ||
}, | ||
{ | ||
"model": "dcas.gddconfig", | ||
"pk": 5, | ||
"fields": { | ||
"crop": 3, | ||
"base_temperature": 4.5, | ||
"cap_temperature": 20, | ||
"config": 1 | ||
} | ||
}, | ||
{ | ||
"model": "dcas.gddconfig", | ||
"pk": 6, | ||
"fields": { | ||
"crop": 5, | ||
"base_temperature": 10, | ||
"cap_temperature": 30, | ||
"config": 1 | ||
} | ||
}, | ||
{ | ||
"model": "dcas.gddconfig", | ||
"pk": 7, | ||
"fields": { | ||
"crop": 7, | ||
"base_temperature": 10, | ||
"cap_temperature": 30, | ||
"config": 1 | ||
} | ||
}, | ||
{ | ||
"model": "dcas.gddconfig", | ||
"pk": 8, | ||
"fields": { | ||
"crop": 4, | ||
"base_temperature": 10, | ||
"cap_temperature": 35, | ||
"config": 1 | ||
} | ||
}, | ||
{ | ||
"model": "dcas.gddconfig", | ||
"pk": 9, | ||
"fields": { | ||
"crop": 9, | ||
"base_temperature": 10, | ||
"cap_temperature": 30, | ||
"config": 1 | ||
} | ||
}, | ||
{ | ||
"model": "dcas.gddconfig", | ||
"pk": 10, | ||
"fields": { | ||
"crop": 1, | ||
"base_temperature": 10, | ||
"cap_temperature": 30, | ||
"config": 1 | ||
} | ||
} | ||
] |
Oops, something went wrong.