Añadir soporte para Punt Frontera en el cálculo del CINI de CentroTransformador#44
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Este PR añade el flag Punt Frontera al modelo CentroTransformador y ajusta el cálculo del CINI para que la posición 5 valga '5' cuando el CT está marcado como Punt Frontera, independientemente del tipo de CT.
Changes:
- Se introduce
self.punt_frontera = FalseenCentroTransformador.__init__. - En
CentroTransformador.cini, sipunt_fronteraesTrue, se fuerzac.positions[5] = '5'. - Se añade un test que verifica
cini[5] == '5'cuandopunt_fronteraestá activo.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| spec/cts_spec.py | Añade cobertura de test para la nueva regla de Punt Frontera en la posición 5 del CINI. |
| cini/models.py | Incorpora el nuevo atributo punt_frontera y actualiza la lógica de cálculo del CINI del CT. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mvilaboa
approved these changes
Jun 17, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objetivos
Comportamiento antiguo
Intemperie), '2' (Caseta), '3' (Local), '4' (Subterráneo), '9' (Móvil). No existía el valor '5'.Comportamiento nuevo
Tests