inewave 1.10.1__py3-none-any.whl → 1.10.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
inewave/__init__.py CHANGED
@@ -6,7 +6,7 @@ inewave é um módulo em Python para manipulação dos arquivos de entrada
6
6
  e saída do NEWAVE.
7
7
  """
8
8
 
9
- __version__ = "1.10.1"
9
+ __version__ = "1.10.2"
10
10
 
11
11
  from . import newave # noqa
12
12
  from . import nwlistcf # noqa
@@ -1,8 +1,9 @@
1
- from cfinterface.components.section import Section
2
- from cfinterface.components.line import Line
1
+ from typing import IO, Any, Dict, List
2
+
3
3
  from cfinterface.components.integerfield import IntegerField
4
+ from cfinterface.components.line import Line
4
5
  from cfinterface.components.literalfield import LiteralField
5
- from typing import List, Dict, IO, Any
6
+ from cfinterface.components.section import Section
6
7
 
7
8
 
8
9
  class BlocoDadosNwlistop(Section):
@@ -25,19 +26,15 @@ class BlocoDadosNwlistop(Section):
25
26
  def __init__(self, previous=None, next=None, data=None) -> None:
26
27
  super().__init__(previous, next, data)
27
28
  self.__linha_opcao = Line([IntegerField(1, 1)])
28
- self.__linha_arquivo = Line(
29
- [LiteralField(29, 0), LiteralField(40, 30)]
30
- )
31
- self.__linha_series_op1 = Line(
32
- [IntegerField(4, 1), IntegerField(4, 6)]
33
- )
29
+ self.__linha_arquivo = Line([LiteralField(29, 0), LiteralField(40, 30)])
30
+ self.__linha_series_op1 = Line([IntegerField(4, 1), IntegerField(4, 6)])
34
31
  self.__linha_periodos = Line([IntegerField(3, 1), IntegerField(3, 5)])
35
- self.__linha_variaveis_op2 = Line(
36
- [IntegerField(2, 1 + 3 * i) for i in range(21)]
37
- )
38
- self.__linha_uhes_op2 = Line(
39
- [IntegerField(3, 1 + 4 * i) for i in range(16)]
40
- )
32
+ self.__linha_variaveis_op2 = Line([
33
+ IntegerField(2, 1 + 3 * i) for i in range(21)
34
+ ])
35
+ self.__linha_uhes_op2 = Line([
36
+ IntegerField(3, 1 + 4 * i) for i in range(16)
37
+ ])
41
38
  self.data: Dict[str, Any] = {}
42
39
  self.__comentarios: List[List[str]] = []
43
40
 
@@ -45,12 +42,10 @@ class BlocoDadosNwlistop(Section):
45
42
  if not isinstance(o, BlocoDadosNwlistop):
46
43
  return False
47
44
  bloco: BlocoDadosNwlistop = o
48
- if not all(
49
- [
50
- isinstance(self.data, dict),
51
- isinstance(o.data, dict),
52
- ]
53
- ):
45
+ if not all([
46
+ isinstance(self.data, dict),
47
+ isinstance(o.data, dict),
48
+ ]):
54
49
  return False
55
50
  else:
56
51
  return self.data == bloco.data
@@ -162,7 +157,7 @@ class BlocoDadosNwlistop(Section):
162
157
  for c in self.__comentarios[1]:
163
158
  file.write(c)
164
159
  # Escreve as séries
165
- file.write(self.__linha_periodos.write(self.data["series"]))
160
+ file.write(self.__linha_series_op1.write(self.data["series"]))
166
161
 
167
162
  # Override
168
163
  def __write_op2(self, file: IO, *args, **kwargs):
@@ -178,17 +173,17 @@ class BlocoDadosNwlistop(Section):
178
173
  for c in self.__comentarios[1]:
179
174
  file.write(c)
180
175
  # Escreve as séries
181
- file.write(self.__linha_periodos.write(self.data["variaveis_ree"]))
176
+ file.write(self.__linha_variaveis_op2.write(self.data["variaveis_ree"]))
182
177
  # Escreve as linhas de cabeçalho para variáveis individualizadas
183
178
  for c in self.__comentarios[2]:
184
179
  file.write(c)
185
180
  # Escreve as séries
186
- file.write(self.__linha_periodos.write(self.data["variaveis_uhe"]))
181
+ file.write(self.__linha_variaveis_op2.write(self.data["variaveis_uhe"]))
187
182
  # Escreve as linhas de cabeçalho para usinas
188
183
  for c in self.__comentarios[3]:
189
184
  file.write(c)
190
185
  # Escreve as séries
191
- file.write(self.__linha_periodos.write(self.data["uhes"]))
186
+ file.write(self.__linha_uhes_op2.write(self.data["uhes"]))
192
187
 
193
188
  # Override
194
189
  def __write_op4(self, file: IO, *args, **kwargs):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: inewave
3
- Version: 1.10.1
3
+ Version: 1.10.2
4
4
  Summary: inewave
5
5
  Project-URL: Documentation, https://rjmalves.github.io/inewave/
6
6
  Project-URL: Repository, https://github.com/rjmalves/inewave/
@@ -1,4 +1,4 @@
1
- inewave/__init__.py,sha256=r4u9i9Hht0EMarrDRzIq5xsDGMVX7MXW9PIkt68DcvA,236
1
+ inewave/__init__.py,sha256=fvATv_T-Ej_ViYCGhjQzMmlVjKBnjgC2joGAze6aajc,236
2
2
  inewave/config.py,sha256=fMgG2sqE_PNz30QCNxkgfPf78SEOAVfV07kGtO1bREE,1106
3
3
  inewave/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  inewave/_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -451,7 +451,7 @@ inewave/nwlistop/modelos/merclsin.py,sha256=arrMiDrPb3z7CqoT0ndCW0GZgJec6oa0by3y
451
451
  inewave/nwlistop/modelos/mevmin.py,sha256=xv2rpx4GqK3fs_b9F8fNcwepmkqZkFw6lhheAghRZj0,693
452
452
  inewave/nwlistop/modelos/mevminm.py,sha256=xv2rpx4GqK3fs_b9F8fNcwepmkqZkFw6lhheAghRZj0,693
453
453
  inewave/nwlistop/modelos/mevminsin.py,sha256=xv2rpx4GqK3fs_b9F8fNcwepmkqZkFw6lhheAghRZj0,693
454
- inewave/nwlistop/modelos/nwlistopdat.py,sha256=CLteMOIPb7hOMYDhxZ_dXrWHoKVKOsCyyZttGcI5C1Y,6989
454
+ inewave/nwlistop/modelos/nwlistopdat.py,sha256=svwmrXzLZjN5yD1UUWyUEsNlSUiwWah7N1lCHQvNQs8,6924
455
455
  inewave/nwlistop/modelos/perdf.py,sha256=HGMOZGIJLbfLSMin-K_5wzGUsUInA--KShyaTkv0Whc,638
456
456
  inewave/nwlistop/modelos/perdfm.py,sha256=HGMOZGIJLbfLSMin-K_5wzGUsUInA--KShyaTkv0Whc,638
457
457
  inewave/nwlistop/modelos/perdfsin.py,sha256=HGMOZGIJLbfLSMin-K_5wzGUsUInA--KShyaTkv0Whc,638
@@ -539,7 +539,7 @@ inewave/nwlistop/modelos/blocos/usina.py,sha256=cQvLVtG1NC8y4lP_to6-YjAKQRGRlaxO
539
539
  inewave/nwlistop/modelos/blocos/valoresclassetermicaseriepatamar.py,sha256=0LV0JMFoiuNEQ3n-XVfG2T0sIq_33bnCt6gmwPOTql8,3283
540
540
  inewave/nwlistop/modelos/blocos/valoresserie.py,sha256=Q88QBoI3zyU7y0AvHBeSqDBEVAkb3rAa3XpxA51NbF8,2143
541
541
  inewave/nwlistop/modelos/blocos/valoresseriepatamar.py,sha256=xnRdor-_2VyR5EbWNSzU_hbABJFtfgKGlznbcRaslGg,2589
542
- inewave-1.10.1.dist-info/METADATA,sha256=NqwgcoiWszd_S-eI1CwC8YDbHX-ntuSbfGnnM5XuTeo,3743
543
- inewave-1.10.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
544
- inewave-1.10.1.dist-info/licenses/LICENSE.md,sha256=0jOBL78mjzscN0-XI-6YtK1IqnODUbG85DaKAMH4XJ8,1070
545
- inewave-1.10.1.dist-info/RECORD,,
542
+ inewave-1.10.2.dist-info/METADATA,sha256=vAZzf_juRHFDT3Dyo4OGAjxz3oP-KQdK9tj8QUULvcI,3743
543
+ inewave-1.10.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
544
+ inewave-1.10.2.dist-info/licenses/LICENSE.md,sha256=0jOBL78mjzscN0-XI-6YtK1IqnODUbG85DaKAMH4XJ8,1070
545
+ inewave-1.10.2.dist-info/RECORD,,