-
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.
- Loading branch information
Showing
20 changed files
with
233 additions
and
30 deletions.
There are no files selected for viewing
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
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 @@ | ||
{ | ||
"Id": "Policy1587216857769", | ||
"Statement": [ | ||
{ | ||
"Action": [ | ||
"s3:GetObject", | ||
"s3:PutObject", | ||
"s3:ListBucket" | ||
], | ||
"Effect": "Allow", | ||
"Principal": "*", | ||
"Resource": "arn:aws:s3:::csv-data/*", | ||
"Sid": "Stmt1587216727444" | ||
} | ||
], | ||
"Version": "2012-10-17" | ||
} |
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,15 @@ | ||
{ | ||
"Id": "Policy1587216857769", | ||
"Statement": [ | ||
{ | ||
"Action": [ | ||
"*" | ||
], | ||
"Effect": "Deny", | ||
"Principal": "*", | ||
"Resource": "arn:aws:s3:::csv-data/*", | ||
"Sid": "Stmt1587216727444" | ||
} | ||
], | ||
"Version": "2012-10-17" | ||
} |
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,15 @@ | ||
curl $S3CFG_FILE_URI > .s3cfg | ||
# retrieve most recent date | ||
FILEPATH=$(s3cmd ls s3://csv-data| tail -1 | awk '{ print $2 }') | ||
DATE=${FILEPATH##"s3://csv-data/"} | ||
DATE=${DATE%"/"} | ||
# if this date doesn't exist yet | ||
if ls csv-data/$DATE ; then | ||
echo "This data has already been loaded" | ||
else | ||
# retrieve most recent files | ||
mkdir -p csv-data/$DATE/ | ||
s3cmd get s3://csv-data/$DATE/ --recursive csv-data/$DATE/ | ||
# import those files to database (django models) | ||
python $APP_ID/manage.py load_ingredients -d csv-data/$DATE $DATE | ||
fi |
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
45 changes: 45 additions & 0 deletions
45
data/migrations/0086_alter_effect_options_alter_historicaleffect_options_and_more.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,45 @@ | ||
# Generated by Django 5.1 on 2024-08-21 16:05 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("data", "0085_companyaccessclaim_declarant_role_and_more"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterModelOptions( | ||
name="effect", | ||
options={ | ||
"verbose_name": "Objectif et effet des compléments alimentaires", | ||
"verbose_name_plural": "Objectifs et effets des compléments alimentaires", | ||
}, | ||
), | ||
migrations.AlterModelOptions( | ||
name="historicaleffect", | ||
options={ | ||
"get_latest_by": ("history_date", "history_id"), | ||
"ordering": ("-history_date", "-history_id"), | ||
"verbose_name": "historical Objectif et effet des compléments alimentaires", | ||
"verbose_name_plural": "historical Objectifs et effets des compléments alimentaires", | ||
}, | ||
), | ||
migrations.AlterModelOptions( | ||
name="historicalpopulation", | ||
options={ | ||
"get_latest_by": ("history_date", "history_id"), | ||
"ordering": ("-history_date", "-history_id"), | ||
"verbose_name": "historical Population cible", | ||
"verbose_name_plural": "historical Populations cibles", | ||
}, | ||
), | ||
migrations.AlterModelOptions( | ||
name="population", | ||
options={ | ||
"verbose_name": "Population cible", | ||
"verbose_name_plural": "Populations cibles", | ||
}, | ||
), | ||
] |
57 changes: 57 additions & 0 deletions
57
data/migrations/0087_declaration_other_conditions_and_more.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,57 @@ | ||
# Generated by Django 5.1 on 2024-08-22 08:56 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("data", "0086_alter_effect_options_alter_historicaleffect_options_and_more"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="declaration", | ||
name="other_conditions", | ||
field=models.TextField( | ||
blank=True, | ||
verbose_name="autres populations à risques ou facteurs de risques non listés", | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="declaration", | ||
name="other_galenic_formulation", | ||
field=models.TextField( | ||
blank=True, verbose_name="autre forme galénique non listée" | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="historicaldeclaration", | ||
name="other_conditions", | ||
field=models.TextField( | ||
blank=True, | ||
verbose_name="autres populations à risques ou facteurs de risques non listés", | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="historicaldeclaration", | ||
name="other_galenic_formulation", | ||
field=models.TextField( | ||
blank=True, verbose_name="autre forme galénique non listée" | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="declaration", | ||
name="other_effects", | ||
field=models.TextField( | ||
blank=True, verbose_name="autres objectifs ou effets non listés" | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="historicaldeclaration", | ||
name="other_effects", | ||
field=models.TextField( | ||
blank=True, verbose_name="autres objectifs ou effets non listés" | ||
), | ||
), | ||
] |
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
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
File renamed without changes.
Binary file not shown.
Binary file not shown.
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,9 @@ | ||
<template> | ||
<DsfrInputGroup class="max-w-2xl mt-6 pt-8" v-if="listOfChoices && listOfChoices.indexOf(otherChoiceId) > -1"> | ||
<DsfrInput v-model="model" label-visible :label="label" :required="true" /> | ||
</DsfrInputGroup> | ||
</template> | ||
<script setup> | ||
defineProps({ listOfChoices: { type: Array }, otherChoiceId: { type: Number }, label: { type: String } }) | ||
const model = defineModel() | ||
</script> |
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
Oops, something went wrong.