vortex-nwp 2.0.0b1__py3-none-any.whl → 2.0.0b2__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.
Files changed (139) hide show
  1. vortex/__init__.py +59 -45
  2. vortex/algo/__init__.py +3 -2
  3. vortex/algo/components.py +940 -614
  4. vortex/algo/mpitools.py +802 -497
  5. vortex/algo/serversynctools.py +34 -33
  6. vortex/config.py +19 -22
  7. vortex/data/__init__.py +9 -3
  8. vortex/data/abstractstores.py +593 -655
  9. vortex/data/containers.py +217 -162
  10. vortex/data/contents.py +65 -39
  11. vortex/data/executables.py +93 -102
  12. vortex/data/flow.py +40 -34
  13. vortex/data/geometries.py +228 -132
  14. vortex/data/handlers.py +428 -225
  15. vortex/data/outflow.py +15 -15
  16. vortex/data/providers.py +185 -163
  17. vortex/data/resources.py +48 -42
  18. vortex/data/stores.py +544 -413
  19. vortex/gloves.py +114 -87
  20. vortex/layout/__init__.py +1 -8
  21. vortex/layout/contexts.py +150 -84
  22. vortex/layout/dataflow.py +353 -202
  23. vortex/layout/monitor.py +264 -128
  24. vortex/nwp/__init__.py +5 -2
  25. vortex/nwp/algo/__init__.py +14 -5
  26. vortex/nwp/algo/assim.py +205 -151
  27. vortex/nwp/algo/clim.py +683 -517
  28. vortex/nwp/algo/coupling.py +447 -225
  29. vortex/nwp/algo/eda.py +437 -229
  30. vortex/nwp/algo/eps.py +403 -231
  31. vortex/nwp/algo/forecasts.py +420 -271
  32. vortex/nwp/algo/fpserver.py +683 -307
  33. vortex/nwp/algo/ifsnaming.py +205 -145
  34. vortex/nwp/algo/ifsroot.py +210 -122
  35. vortex/nwp/algo/monitoring.py +132 -76
  36. vortex/nwp/algo/mpitools.py +321 -191
  37. vortex/nwp/algo/odbtools.py +617 -353
  38. vortex/nwp/algo/oopsroot.py +449 -273
  39. vortex/nwp/algo/oopstests.py +90 -56
  40. vortex/nwp/algo/request.py +287 -206
  41. vortex/nwp/algo/stdpost.py +878 -522
  42. vortex/nwp/data/__init__.py +22 -4
  43. vortex/nwp/data/assim.py +125 -137
  44. vortex/nwp/data/boundaries.py +121 -68
  45. vortex/nwp/data/climfiles.py +193 -211
  46. vortex/nwp/data/configfiles.py +73 -69
  47. vortex/nwp/data/consts.py +426 -401
  48. vortex/nwp/data/ctpini.py +59 -43
  49. vortex/nwp/data/diagnostics.py +94 -66
  50. vortex/nwp/data/eda.py +50 -51
  51. vortex/nwp/data/eps.py +195 -146
  52. vortex/nwp/data/executables.py +440 -434
  53. vortex/nwp/data/fields.py +63 -48
  54. vortex/nwp/data/gridfiles.py +183 -111
  55. vortex/nwp/data/logs.py +250 -217
  56. vortex/nwp/data/modelstates.py +180 -151
  57. vortex/nwp/data/monitoring.py +72 -99
  58. vortex/nwp/data/namelists.py +254 -202
  59. vortex/nwp/data/obs.py +400 -308
  60. vortex/nwp/data/oopsexec.py +22 -20
  61. vortex/nwp/data/providers.py +90 -65
  62. vortex/nwp/data/query.py +71 -82
  63. vortex/nwp/data/stores.py +49 -36
  64. vortex/nwp/data/surfex.py +136 -137
  65. vortex/nwp/syntax/__init__.py +1 -1
  66. vortex/nwp/syntax/stdattrs.py +173 -111
  67. vortex/nwp/tools/__init__.py +2 -2
  68. vortex/nwp/tools/addons.py +22 -17
  69. vortex/nwp/tools/agt.py +24 -12
  70. vortex/nwp/tools/bdap.py +16 -5
  71. vortex/nwp/tools/bdcp.py +4 -1
  72. vortex/nwp/tools/bdm.py +3 -0
  73. vortex/nwp/tools/bdmp.py +14 -9
  74. vortex/nwp/tools/conftools.py +728 -378
  75. vortex/nwp/tools/drhook.py +12 -8
  76. vortex/nwp/tools/grib.py +65 -39
  77. vortex/nwp/tools/gribdiff.py +22 -17
  78. vortex/nwp/tools/ifstools.py +82 -42
  79. vortex/nwp/tools/igastuff.py +167 -143
  80. vortex/nwp/tools/mars.py +14 -2
  81. vortex/nwp/tools/odb.py +234 -125
  82. vortex/nwp/tools/partitioning.py +61 -37
  83. vortex/nwp/tools/satrad.py +27 -12
  84. vortex/nwp/util/async.py +83 -55
  85. vortex/nwp/util/beacon.py +10 -10
  86. vortex/nwp/util/diffpygram.py +174 -86
  87. vortex/nwp/util/ens.py +144 -63
  88. vortex/nwp/util/hooks.py +30 -19
  89. vortex/nwp/util/taskdeco.py +28 -24
  90. vortex/nwp/util/usepygram.py +278 -172
  91. vortex/nwp/util/usetnt.py +31 -17
  92. vortex/sessions.py +72 -39
  93. vortex/syntax/__init__.py +1 -1
  94. vortex/syntax/stdattrs.py +410 -171
  95. vortex/syntax/stddeco.py +31 -22
  96. vortex/toolbox.py +327 -192
  97. vortex/tools/__init__.py +11 -2
  98. vortex/tools/actions.py +125 -59
  99. vortex/tools/addons.py +111 -92
  100. vortex/tools/arm.py +42 -22
  101. vortex/tools/compression.py +72 -69
  102. vortex/tools/date.py +11 -4
  103. vortex/tools/delayedactions.py +242 -132
  104. vortex/tools/env.py +75 -47
  105. vortex/tools/folder.py +342 -171
  106. vortex/tools/grib.py +311 -149
  107. vortex/tools/lfi.py +423 -216
  108. vortex/tools/listings.py +109 -40
  109. vortex/tools/names.py +218 -156
  110. vortex/tools/net.py +632 -298
  111. vortex/tools/parallelism.py +93 -61
  112. vortex/tools/prestaging.py +55 -31
  113. vortex/tools/schedulers.py +172 -105
  114. vortex/tools/services.py +402 -333
  115. vortex/tools/storage.py +293 -358
  116. vortex/tools/surfex.py +24 -24
  117. vortex/tools/systems.py +1211 -631
  118. vortex/tools/targets.py +156 -100
  119. vortex/util/__init__.py +1 -1
  120. vortex/util/config.py +377 -327
  121. vortex/util/empty.py +2 -2
  122. vortex/util/helpers.py +56 -24
  123. vortex/util/introspection.py +18 -12
  124. vortex/util/iosponge.py +8 -4
  125. vortex/util/roles.py +4 -6
  126. vortex/util/storefunctions.py +39 -13
  127. vortex/util/structs.py +3 -3
  128. vortex/util/worker.py +29 -17
  129. vortex_nwp-2.0.0b2.dist-info/METADATA +66 -0
  130. vortex_nwp-2.0.0b2.dist-info/RECORD +142 -0
  131. {vortex_nwp-2.0.0b1.dist-info → vortex_nwp-2.0.0b2.dist-info}/WHEEL +1 -1
  132. vortex/layout/appconf.py +0 -109
  133. vortex/layout/jobs.py +0 -1276
  134. vortex/layout/nodes.py +0 -1424
  135. vortex/layout/subjobs.py +0 -464
  136. vortex_nwp-2.0.0b1.dist-info/METADATA +0 -50
  137. vortex_nwp-2.0.0b1.dist-info/RECORD +0 -146
  138. {vortex_nwp-2.0.0b1.dist-info → vortex_nwp-2.0.0b2.dist-info}/LICENSE +0 -0
  139. {vortex_nwp-2.0.0b1.dist-info → vortex_nwp-2.0.0b2.dist-info}/top_level.txt +0 -0
@@ -27,20 +27,24 @@ class HGeoDesc:
27
27
  self.grid = geo.grid
28
28
  self.dimensions = geo.dimensions
29
29
  self.name = geo.name
30
- self.projection = None if not geo.projected_geometry else geo.projection
30
+ self.projection = (
31
+ None if not geo.projected_geometry else geo.projection
32
+ )
31
33
  sio = io.StringIO()
32
34
  geo.what(out=sio, vertical_geometry=False)
33
35
  sio.seek(0)
34
36
  self._what = sio.readlines()[3:]
35
37
 
36
38
  def __eq__(self, other):
37
- return ((self.grid == other.grid) and
38
- (self.dimensions == other.dimensions) and
39
- (self.name == other.name) and
40
- (self.projection == other.projection))
39
+ return (
40
+ (self.grid == other.grid)
41
+ and (self.dimensions == other.dimensions)
42
+ and (self.name == other.name)
43
+ and (self.projection == other.projection)
44
+ )
41
45
 
42
46
  def __str__(self):
43
- return ''.join(self._what)
47
+ return "".join(self._what)
44
48
 
45
49
 
46
50
  class DataDesc:
@@ -51,7 +55,7 @@ class DataDesc:
51
55
  :param epyfied: An epygram fild object.
52
56
  """
53
57
  self.stats = epyfield.stats()
54
- self.stats.pop('quadmean', None) # We do not want quadmean
58
+ self.stats.pop("quadmean", None) # We do not want quadmean
55
59
  s256 = hashlib.sha256()
56
60
  s256.update(epyfield.data.tobytes())
57
61
  self.checksum = s256.digest()
@@ -60,7 +64,9 @@ class DataDesc:
60
64
  return self.checksum == other.checksum
61
65
 
62
66
  def __str__(self):
63
- return ', '.join(['{:s}={!s}'.format(k, v) for k, v in self.stats.items()])
67
+ return ", ".join(
68
+ ["{:s}={!s}".format(k, v) for k, v in self.stats.items()]
69
+ )
64
70
 
65
71
 
66
72
  class HGeoLibrary:
@@ -87,11 +93,11 @@ class HGeoLibrary:
87
93
  return found[0]
88
94
 
89
95
  def __str__(self):
90
- outstr = ''
96
+ outstr = ""
91
97
  for i, g in enumerate(self._geolist):
92
- outstr += 'HORIZONTAL GEOMETRY #{:d}\n\n'.format(i)
98
+ outstr += "HORIZONTAL GEOMETRY #{:d}\n\n".format(i)
93
99
  outstr += str(g)
94
- outstr += '\n'
100
+ outstr += "\n"
95
101
  return outstr
96
102
 
97
103
 
@@ -110,32 +116,45 @@ class FieldDesc:
110
116
  Compute the comparison score of the present field with respect to a
111
117
  reference one (*other*).
112
118
  """
113
- fidscore = functools.reduce(operator.add,
114
- [int(self.fid[k] == other.fid[k])
115
- for k in self.fid.keys() if k in other.fid])
116
- fidscore = 5. * float(fidscore) / float(max(len(self.fid), len(other.fid)))
117
- return (int(self.valid != other.valid) * -5. +
118
- int(self.hgeoid != other.hgeoid) * -5. +
119
- int(self.vgeo != other.vgeo) * -4. +
120
- int(self.datadesc == other.datadesc) * 5. +
121
- fidscore)
119
+ fidscore = functools.reduce(
120
+ operator.add,
121
+ [
122
+ int(self.fid[k] == other.fid[k])
123
+ for k in self.fid.keys()
124
+ if k in other.fid
125
+ ],
126
+ )
127
+ fidscore = (
128
+ 5.0 * float(fidscore) / float(max(len(self.fid), len(other.fid)))
129
+ )
130
+ return (
131
+ int(self.valid != other.valid) * -5.0
132
+ + int(self.hgeoid != other.hgeoid) * -5.0
133
+ + int(self.vgeo != other.vgeo) * -4.0
134
+ + int(self.datadesc == other.datadesc) * 5.0
135
+ + fidscore
136
+ )
122
137
 
123
138
  def ranking_summary(self, other):
124
139
  """Returns detailed comparison information (including the ranking)."""
125
- return (self.datadesc == other.datadesc,
126
- self.valid == other.valid,
127
- self.hgeoid == other.hgeoid and self.vgeo == other.vgeo,
128
- self.ranking(other))
140
+ return (
141
+ self.datadesc == other.datadesc,
142
+ self.valid == other.valid,
143
+ self.hgeoid == other.hgeoid and self.vgeo == other.vgeo,
144
+ self.ranking(other),
145
+ )
129
146
 
130
147
  def __str__(self):
131
- out = "HGeo=#{:d} ; Validity={!s} ; metadata are:\n".format(self.hgeoid, self.valid)
148
+ out = "HGeo=#{:d} ; Validity={!s} ; metadata are:\n".format(
149
+ self.hgeoid, self.valid
150
+ )
132
151
  out += pprint.pformat(self.fid) + "\n"
133
152
  out += "Data: {!s}".format(self.datadesc)
134
153
  return out
135
154
 
136
155
  def prefixed_str(self, prefix):
137
156
  """A representation of this object prefixed with the *prefix* string."""
138
- return '\n'.join([prefix + l for l in str(self).split('\n')])
157
+ return "\n".join([prefix + l for l in str(self).split("\n")])
139
158
 
140
159
 
141
160
  class FieldBundle:
@@ -157,23 +176,28 @@ class FieldBundle:
157
176
  ddesc = DataDesc(fld)
158
177
  hgeo_id = self._hgeolib.register(hgeo)
159
178
  fid = copy.copy(fid)
160
- fid['datebasis'] = fld.validity.getbasis()
161
- fid['term'] = fld.validity.term()
162
- fid['cumulativeduration'] = fld.validity.cumulativeduration()
179
+ fid["datebasis"] = fld.validity.getbasis()
180
+ fid["term"] = fld.validity.term()
181
+ fid["cumulativeduration"] = fld.validity.cumulativeduration()
163
182
  return FieldDesc(hgeo_id, vgeo, ddesc, fid, valid)
164
183
 
165
- @usepygram.epygram_checker.disabled_if_unavailable(version='1.0.0')
184
+ @usepygram.epygram_checker.disabled_if_unavailable(version="1.0.0")
166
185
  def read_grib(self, filename):
167
186
  """Read in a GRIB file."""
168
187
  with usepygram.epy_env_prepare(sessions.current()):
169
- gribdata = footprints.proxy.dataformat(filename=filename,
170
- openmode='r', format='GRIB')
171
- fld = gribdata.iter_fields(get_info_as_json=('centre', 'subCentre'))
188
+ gribdata = footprints.proxy.dataformat(
189
+ filename=filename, openmode="r", format="GRIB"
190
+ )
191
+ fld = gribdata.iter_fields(
192
+ get_info_as_json=("centre", "subCentre")
193
+ )
172
194
  while fld:
173
- fid = fld.fid.get('GRIB2', fld.fid.get('GRIB1'))
195
+ fid = fld.fid.get("GRIB2", fld.fid.get("GRIB1"))
174
196
  fid.update(json.loads(fld.comment))
175
197
  self._fields.append(self._common_processing(fld, fid))
176
- fld = gribdata.iter_fields(get_info_as_json=('centre', 'subCentre'))
198
+ fld = gribdata.iter_fields(
199
+ get_info_as_json=("centre", "subCentre")
200
+ )
177
201
 
178
202
 
179
203
  class FieldBundles:
@@ -203,22 +227,28 @@ class FieldBundles:
203
227
  class EpyGribDiff(FieldBundles):
204
228
  """A specialised version of :class:`FieldBundles` that deals with GRIB files."""
205
229
 
206
- _FMT_COUNTER = '[{:04d}] '
207
- _HEAD_COUNTER = ' ' * len(_FMT_COUNTER.format(0))
230
+ _FMT_COUNTER = "[{:04d}] "
231
+ _HEAD_COUNTER = " " * len(_FMT_COUNTER.format(0))
208
232
 
209
- _FMT_SHORT = "#{n:>4d} id={id:16s} l={level:<6d} c={centre:<3d},{scentre:3d}"
233
+ _FMT_SHORT = (
234
+ "#{n:>4d} id={id:16s} l={level:<6d} c={centre:<3d},{scentre:3d}"
235
+ )
210
236
  _HEAD_SHORT = "Mess. ParamId/ShortN Level Centre,S "
211
237
 
212
238
  _FMT_MIDDLE = " | {0:1s} {1:1s} {2:1s} {3:6s} | "
213
239
  _HEAD_MIDDLE = " | {:1s} {:1s} {:1s} {:5s} | "
214
- _ELTS_MIDDLE = ('data', 'valid', 'geo', 'score')
240
+ _ELTS_MIDDLE = ("data", "valid", "geo", "score")
215
241
 
216
- _SPACER = (_HEAD_COUNTER +
217
- 'REF ' + '-' * (len(_HEAD_SHORT) - 4) +
218
- ' | ----- ----- | ' +
219
- 'NEW ' + '-' * (len(_HEAD_SHORT) - 4))
242
+ _SPACER = (
243
+ _HEAD_COUNTER
244
+ + "REF "
245
+ + "-" * (len(_HEAD_SHORT) - 4)
246
+ + " | ----- ----- | "
247
+ + "NEW "
248
+ + "-" * (len(_HEAD_SHORT) - 4)
249
+ )
220
250
 
221
- _DETAILED_SUMARY = 'Data: {0:1s} ; Validity Date: {1:1s} ; HGeometry: {2:s} ; Score: {3:6s}'
251
+ _DETAILED_SUMARY = "Data: {0:1s} ; Validity Date: {1:1s} ; HGeometry: {2:s} ; Score: {3:6s}"
222
252
 
223
253
  def __init__(self, ref, new):
224
254
  """
@@ -226,9 +256,9 @@ class EpyGribDiff(FieldBundles):
226
256
  :param str new: Path to the new GRIB file
227
257
  """
228
258
  super().__init__()
229
- self._new = self.new_bundle('New')
259
+ self._new = self.new_bundle("New")
230
260
  self._new.read_grib(new)
231
- self._ref = self.new_bundle('Ref')
261
+ self._ref = self.new_bundle("Ref")
232
262
  self._ref.read_grib(ref)
233
263
 
234
264
  def _compute_diff(self):
@@ -250,7 +280,7 @@ class EpyGribDiff(FieldBundles):
250
280
  # If the score is >= 3 the fields are paired...
251
281
  # Note: Their might be several field combinations with the same
252
282
  # ranking score
253
- if highest >= 3.:
283
+ if highest >= 3.0:
254
284
  refs = rscore[highest]
255
285
  couples.append((i, refs, highest, rsummary[highest]))
256
286
  found.update(refs)
@@ -266,52 +296,79 @@ class EpyGribDiff(FieldBundles):
266
296
  """Returns the comparison table header."""
267
297
  out = cls._SPACER + "\n"
268
298
  e_len = max([len(e) for e in cls._ELTS_MIDDLE])
269
- e_new = [('{:>' + str(e_len) + 's}').format(e.upper()) for e in cls._ELTS_MIDDLE]
299
+ e_new = [
300
+ ("{:>" + str(e_len) + "s}").format(e.upper())
301
+ for e in cls._ELTS_MIDDLE
302
+ ]
270
303
  if e_len > 1:
271
304
  for i in range(e_len - 1):
272
- out += (cls._HEAD_COUNTER + ' ' * len(cls._HEAD_SHORT) +
273
- cls._HEAD_MIDDLE.format(* [e[i] for e in e_new]) +
274
- ' ' * len(cls._HEAD_SHORT) + "\n")
275
- out += (cls._HEAD_COUNTER + cls._HEAD_SHORT +
276
- cls._HEAD_MIDDLE.format(* [e[-1] for e in e_new]) +
277
- cls._HEAD_SHORT + "\n") + cls._SPACER + "\n"
305
+ out += (
306
+ cls._HEAD_COUNTER
307
+ + " " * len(cls._HEAD_SHORT)
308
+ + cls._HEAD_MIDDLE.format(*[e[i] for e in e_new])
309
+ + " " * len(cls._HEAD_SHORT)
310
+ + "\n"
311
+ )
312
+ out += (
313
+ (
314
+ cls._HEAD_COUNTER
315
+ + cls._HEAD_SHORT
316
+ + cls._HEAD_MIDDLE.format(*[e[-1] for e in e_new])
317
+ + cls._HEAD_SHORT
318
+ + "\n"
319
+ )
320
+ + cls._SPACER
321
+ + "\n"
322
+ )
278
323
  return out
279
324
 
280
325
  @classmethod
281
326
  def _str_field_summary(cls, n, field):
282
327
  """Returns a string that summarise a field properties."""
283
- if 'paramId' in field.fid:
328
+ if "paramId" in field.fid:
284
329
  # GRIB1
285
- sid = str(field.fid['paramId']) + '/' + field.fid['shortName']
330
+ sid = str(field.fid["paramId"]) + "/" + field.fid["shortName"]
286
331
  else:
287
332
  # GRIB2
288
- sid = (str(field.fid['parameterCategory']) + '-' +
289
- str(field.fid['parameterNumber']) + '/' +
290
- field.fid['shortName'])
333
+ sid = (
334
+ str(field.fid["parameterCategory"])
335
+ + "-"
336
+ + str(field.fid["parameterNumber"])
337
+ + "/"
338
+ + field.fid["shortName"]
339
+ )
291
340
  if len(sid) > 16: # Truncate if the string is too long
292
- sid = sid[:15] + '*'
293
- return cls._FMT_SHORT.format(n=n, id=sid, level=field.fid.get('level', -99),
294
- centre=field.fid['centre'],
295
- scentre=field.fid.get('subCentre', -99))
341
+ sid = sid[:15] + "*"
342
+ return cls._FMT_SHORT.format(
343
+ n=n,
344
+ id=sid,
345
+ level=field.fid.get("level", -99),
346
+ centre=field.fid["centre"],
347
+ scentre=field.fid.get("subCentre", -99),
348
+ )
296
349
 
297
350
  @classmethod
298
351
  def _str_rsummary_format(cls, rsum, fmt):
299
352
  """Format the ranking_summary output."""
300
- dmap = {True: '=', False: '!'}
301
- return fmt.format(dmap[rsum[0]], dmap[rsum[1]], dmap[rsum[2]],
302
- '======' if rsum[3] == 10 else '{:6.2f}'.format(rsum[3]))
353
+ dmap = {True: "=", False: "!"}
354
+ return fmt.format(
355
+ dmap[rsum[0]],
356
+ dmap[rsum[1]],
357
+ dmap[rsum[2]],
358
+ "======" if rsum[3] == 10 else "{:6.2f}".format(rsum[3]),
359
+ )
303
360
 
304
361
  @staticmethod
305
362
  def _embedded_counter(c):
306
363
  """Return the formatted comparison counter."""
307
- return '[{:04d}] '.format(c)
364
+ return "[{:04d}] ".format(c)
308
365
 
309
366
  def format_diff(self, detailed=True):
310
367
  """Return a string that contains the comparison results.
311
368
 
312
369
  :param bool detailed: If False, just returns the comparison table.
313
370
  """
314
- out = ''
371
+ out = ""
315
372
  counter = 0
316
373
  for couple in self._compute_diff():
317
374
  if couple[0] is None:
@@ -319,39 +376,70 @@ class EpyGribDiff(FieldBundles):
319
376
  counter += 1
320
377
  out += self._embedded_counter(counter)
321
378
  if detailed:
322
- out += 'Unmatched reference field\n'
323
- out += self.bundles['Ref'].fields[n].prefixed_str(' REF| ') + "\n"
379
+ out += "Unmatched reference field\n"
380
+ out += (
381
+ self.bundles["Ref"]
382
+ .fields[n]
383
+ .prefixed_str(" REF| ")
384
+ + "\n"
385
+ )
324
386
  else:
325
- out += self._str_field_summary(n, self.bundles['Ref'].fields[n])
326
- out += self._FMT_MIDDLE.format('?', '?', '?', ' ?') + '\n'
387
+ out += self._str_field_summary(
388
+ n, self.bundles["Ref"].fields[n]
389
+ )
390
+ out += (
391
+ self._FMT_MIDDLE.format("?", "?", "?", " ?")
392
+ + "\n"
393
+ )
327
394
  else:
328
- new = self.bundles['New'].fields[couple[0]]
395
+ new = self.bundles["New"].fields[couple[0]]
329
396
  if len(couple[1]):
330
397
  for i, n in enumerate(couple[1]):
331
398
  counter += 1
332
- ref = self.bundles['Ref'].fields[n]
399
+ ref = self.bundles["Ref"].fields[n]
333
400
  out += self._embedded_counter(counter)
334
401
  if detailed:
335
- out += self._str_rsummary_format(couple[3][i], self._DETAILED_SUMARY) + "\n"
336
- out += ref.prefixed_str(' REF| ') + "\n vs\n" + new.prefixed_str(' NEW| ') + "\n"
402
+ out += (
403
+ self._str_rsummary_format(
404
+ couple[3][i], self._DETAILED_SUMARY
405
+ )
406
+ + "\n"
407
+ )
408
+ out += (
409
+ ref.prefixed_str(" REF| ")
410
+ + "\n vs\n"
411
+ + new.prefixed_str(" NEW| ")
412
+ + "\n"
413
+ )
337
414
  else:
338
415
  out += self._str_field_summary(n, ref)
339
- out += self._str_rsummary_format(couple[3][i], self._FMT_MIDDLE)
340
- out += self._str_field_summary(couple[0], new) if i == 0 else ' idem.'
341
- out += '\n'
416
+ out += self._str_rsummary_format(
417
+ couple[3][i], self._FMT_MIDDLE
418
+ )
419
+ out += (
420
+ self._str_field_summary(couple[0], new)
421
+ if i == 0
422
+ else " idem."
423
+ )
424
+ out += "\n"
342
425
  else:
343
426
  counter += 1
344
427
  out += self._embedded_counter(counter)
345
428
  if detailed:
346
- out += 'Unmatched new field \n'
347
- out += self.bundles['New'].fields[couple[0]].prefixed_str(' NEW| ') + "\n"
429
+ out += "Unmatched new field \n"
430
+ out += (
431
+ self.bundles["New"]
432
+ .fields[couple[0]]
433
+ .prefixed_str(" NEW| ")
434
+ + "\n"
435
+ )
348
436
  else:
349
- out += ' ' * len(self._HEAD_SHORT)
350
- out += self._FMT_MIDDLE.format('?', '?', '?', ' ?')
351
- out += self._str_field_summary(couple[0], new) + '\n'
352
- out += "\n" if detailed else ''
437
+ out += " " * len(self._HEAD_SHORT)
438
+ out += self._FMT_MIDDLE.format("?", "?", "?", " ?")
439
+ out += self._str_field_summary(couple[0], new) + "\n"
440
+ out += "\n" if detailed else ""
353
441
  if detailed:
354
- out += 'LIST OF HORIZONTAL GEOMETRIES:\n\n'
442
+ out += "LIST OF HORIZONTAL GEOMETRIES:\n\n"
355
443
  out += str(self.hgeo_library)
356
444
  return out
357
445