Skip to content

Commit

Permalink
Revised tipo_medida possible values
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmunoznovoa committed Aug 29, 2024
1 parent 22b39dd commit d0deab5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cchloader/models/epfpf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
from marshmallow import Schema, fields
from marshmallow.validate import OneOf

tipomedida_valid = [x for x in range(1,100)] # TODO revisar valors possibles a REE
# According to TiposMedidaPuntoFrontera file in ESIOS
not_existing_tipo_medida = [6,9,12,36,38,70,71,72,74,77,81,85,86]
tipomedida_valid = [x for x in range(1,100) if x not in not_existing_tipo_medida]

class EPFPFSchema(Schema):
name = fields.String(position=0, required=True)
Expand All @@ -14,7 +16,7 @@ class EPFPFSchema(Schema):
valor = fields.Integer(position=6) # kWh
firmeza = fields.String(position=7, validate=OneOf(['F','P']))
cierre = fields.String(position=8, validate=OneOf(['P','D','']))
tipo_medida = fields.Integer(position=9, validate=OneOf(tipomedida_valid)) # TODO revisar format i valors possibles a REE
tipo_medida = fields.Integer(position=9, validate=OneOf(tipomedida_valid))


EPFPFSchema()

0 comments on commit d0deab5

Please sign in to comment.