Skip to content

Commit

Permalink
[back] add EEGA to biofuels list and double counting
Browse files Browse the repository at this point in the history
  • Loading branch information
Damien Romito committed Jul 30, 2024
1 parent 02c5af8 commit 1117831
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,3 +181,8 @@ Ensuite, setup normalement le projet:
- `(cd front; npm install)`
- `docker-compose up --build -d`
- `code .`

## Double comptage : comment ajouter un biocarburant ou une matière premère

1 - Modifier le fichier `biocarburant.csv` ou `matierespremieres.csv` en ajoutant les données concernées
2 - mettre à jour le fichier `excel_to_carbure_convertor.py` en ajoutant dans les tableaux au moins une instance puis les variations de dénominations
1 change: 0 additions & 1 deletion web/doublecount/dc_sanity_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from doublecount.models import DoubleCountingApplication, DoubleCountingProduction, DoubleCountingSourcing
from core.models import Biocarburant, MatierePremiere
from doublecount.parser.types import ProductionBaseRow, ProductionRow, SourcingRow
from transactions.sanity_checks.biofuel_feedstock import get_biofuel_feedstock_incompatibilities
from transactions.sanity_checks.double_counting import get_dc_biofuel_feedstock_incompatibilities


Expand Down
2 changes: 0 additions & 2 deletions web/doublecount/parser/dc_parser.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import re
from typing import List, Tuple
from openpyxl import load_workbook
from doublecount.parser.parse_traceability import parse_traceability
from doublecount.parser.parse_info import parse_info
from doublecount.parser.parse_sourcing_forecast import parse_sourcing_forecast
from doublecount.parser.parse_production import parse_requested_quota, parse_production_max, parse_production_forecast
Expand Down
1 change: 1 addition & 0 deletions web/doublecount/parser/excel_to_carbure_convertor.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"bioessence de synthèse": "BES",
"bioetbe": "ETBE",
"biogazole de synthèse": "BG",
"eeag": "EEAG",
"eeha": "EEHA",
"eehu": "EEHU",
"eehv": "EEHV",
Expand Down
3 changes: 0 additions & 3 deletions web/doublecount/parser/parse_sourcing_forecast.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import re
from typing import List
from openpyxl import Workbook
from core.models import MatierePremiere
from doublecount.parser.helpers import extract_year

from doublecount.parser.types import SourcingRow
Expand All @@ -11,7 +9,6 @@
def parse_sourcing_forecast(excel_file: Workbook, start_year: int) -> List[SourcingRow]:
sourcing_sheet = excel_file["Approvisionnement prévisionnel"]
sourcing_rows: List[SourcingRow] = []
dc_feedstocks = {f.code: f for f in MatierePremiere.objects.filter(is_double_compte=True)}

current_year = -1

Expand Down
1 change: 1 addition & 0 deletions web/fixtures/csv/biocarburants.csv
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ BGS,Biogazole de synthèse (Hors HVO),44,34,0.773,0,0,0,0,1
BES,Bio-essence de synthèse,44,33,0.75,1,0,1,1,0
BT,Butanol,33,27,0.818,1,0,0,1,0
ED95,Éthanol pour ED95,27,21,0.778,1,0,1,1,0
EEAG,EEAG,38,34,0.895,0,1,0,0,1
EEHA,EEHA,38,34,0.895,0,1,0,0,1
EEHU,EEHU,38,34,0.895,0,1,0,0,1
EEHV,EEHV,38,34,0.895,0,1,0,0,1
Expand Down

0 comments on commit 1117831

Please sign in to comment.