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.
- vortex/__init__.py +59 -45
- vortex/algo/__init__.py +3 -2
- vortex/algo/components.py +940 -614
- vortex/algo/mpitools.py +802 -497
- vortex/algo/serversynctools.py +34 -33
- vortex/config.py +19 -22
- vortex/data/__init__.py +9 -3
- vortex/data/abstractstores.py +593 -655
- vortex/data/containers.py +217 -162
- vortex/data/contents.py +65 -39
- vortex/data/executables.py +93 -102
- vortex/data/flow.py +40 -34
- vortex/data/geometries.py +228 -132
- vortex/data/handlers.py +428 -225
- vortex/data/outflow.py +15 -15
- vortex/data/providers.py +185 -163
- vortex/data/resources.py +48 -42
- vortex/data/stores.py +544 -413
- vortex/gloves.py +114 -87
- vortex/layout/__init__.py +1 -8
- vortex/layout/contexts.py +150 -84
- vortex/layout/dataflow.py +353 -202
- vortex/layout/monitor.py +264 -128
- vortex/nwp/__init__.py +5 -2
- vortex/nwp/algo/__init__.py +14 -5
- vortex/nwp/algo/assim.py +205 -151
- vortex/nwp/algo/clim.py +683 -517
- vortex/nwp/algo/coupling.py +447 -225
- vortex/nwp/algo/eda.py +437 -229
- vortex/nwp/algo/eps.py +403 -231
- vortex/nwp/algo/forecasts.py +420 -271
- vortex/nwp/algo/fpserver.py +683 -307
- vortex/nwp/algo/ifsnaming.py +205 -145
- vortex/nwp/algo/ifsroot.py +210 -122
- vortex/nwp/algo/monitoring.py +132 -76
- vortex/nwp/algo/mpitools.py +321 -191
- vortex/nwp/algo/odbtools.py +617 -353
- vortex/nwp/algo/oopsroot.py +449 -273
- vortex/nwp/algo/oopstests.py +90 -56
- vortex/nwp/algo/request.py +287 -206
- vortex/nwp/algo/stdpost.py +878 -522
- vortex/nwp/data/__init__.py +22 -4
- vortex/nwp/data/assim.py +125 -137
- vortex/nwp/data/boundaries.py +121 -68
- vortex/nwp/data/climfiles.py +193 -211
- vortex/nwp/data/configfiles.py +73 -69
- vortex/nwp/data/consts.py +426 -401
- vortex/nwp/data/ctpini.py +59 -43
- vortex/nwp/data/diagnostics.py +94 -66
- vortex/nwp/data/eda.py +50 -51
- vortex/nwp/data/eps.py +195 -146
- vortex/nwp/data/executables.py +440 -434
- vortex/nwp/data/fields.py +63 -48
- vortex/nwp/data/gridfiles.py +183 -111
- vortex/nwp/data/logs.py +250 -217
- vortex/nwp/data/modelstates.py +180 -151
- vortex/nwp/data/monitoring.py +72 -99
- vortex/nwp/data/namelists.py +254 -202
- vortex/nwp/data/obs.py +400 -308
- vortex/nwp/data/oopsexec.py +22 -20
- vortex/nwp/data/providers.py +90 -65
- vortex/nwp/data/query.py +71 -82
- vortex/nwp/data/stores.py +49 -36
- vortex/nwp/data/surfex.py +136 -137
- vortex/nwp/syntax/__init__.py +1 -1
- vortex/nwp/syntax/stdattrs.py +173 -111
- vortex/nwp/tools/__init__.py +2 -2
- vortex/nwp/tools/addons.py +22 -17
- vortex/nwp/tools/agt.py +24 -12
- vortex/nwp/tools/bdap.py +16 -5
- vortex/nwp/tools/bdcp.py +4 -1
- vortex/nwp/tools/bdm.py +3 -0
- vortex/nwp/tools/bdmp.py +14 -9
- vortex/nwp/tools/conftools.py +728 -378
- vortex/nwp/tools/drhook.py +12 -8
- vortex/nwp/tools/grib.py +65 -39
- vortex/nwp/tools/gribdiff.py +22 -17
- vortex/nwp/tools/ifstools.py +82 -42
- vortex/nwp/tools/igastuff.py +167 -143
- vortex/nwp/tools/mars.py +14 -2
- vortex/nwp/tools/odb.py +234 -125
- vortex/nwp/tools/partitioning.py +61 -37
- vortex/nwp/tools/satrad.py +27 -12
- vortex/nwp/util/async.py +83 -55
- vortex/nwp/util/beacon.py +10 -10
- vortex/nwp/util/diffpygram.py +174 -86
- vortex/nwp/util/ens.py +144 -63
- vortex/nwp/util/hooks.py +30 -19
- vortex/nwp/util/taskdeco.py +28 -24
- vortex/nwp/util/usepygram.py +278 -172
- vortex/nwp/util/usetnt.py +31 -17
- vortex/sessions.py +72 -39
- vortex/syntax/__init__.py +1 -1
- vortex/syntax/stdattrs.py +410 -171
- vortex/syntax/stddeco.py +31 -22
- vortex/toolbox.py +327 -192
- vortex/tools/__init__.py +11 -2
- vortex/tools/actions.py +125 -59
- vortex/tools/addons.py +111 -92
- vortex/tools/arm.py +42 -22
- vortex/tools/compression.py +72 -69
- vortex/tools/date.py +11 -4
- vortex/tools/delayedactions.py +242 -132
- vortex/tools/env.py +75 -47
- vortex/tools/folder.py +342 -171
- vortex/tools/grib.py +311 -149
- vortex/tools/lfi.py +423 -216
- vortex/tools/listings.py +109 -40
- vortex/tools/names.py +218 -156
- vortex/tools/net.py +632 -298
- vortex/tools/parallelism.py +93 -61
- vortex/tools/prestaging.py +55 -31
- vortex/tools/schedulers.py +172 -105
- vortex/tools/services.py +402 -333
- vortex/tools/storage.py +293 -358
- vortex/tools/surfex.py +24 -24
- vortex/tools/systems.py +1211 -631
- vortex/tools/targets.py +156 -100
- vortex/util/__init__.py +1 -1
- vortex/util/config.py +377 -327
- vortex/util/empty.py +2 -2
- vortex/util/helpers.py +56 -24
- vortex/util/introspection.py +18 -12
- vortex/util/iosponge.py +8 -4
- vortex/util/roles.py +4 -6
- vortex/util/storefunctions.py +39 -13
- vortex/util/structs.py +3 -3
- vortex/util/worker.py +29 -17
- vortex_nwp-2.0.0b2.dist-info/METADATA +66 -0
- vortex_nwp-2.0.0b2.dist-info/RECORD +142 -0
- {vortex_nwp-2.0.0b1.dist-info → vortex_nwp-2.0.0b2.dist-info}/WHEEL +1 -1
- vortex/layout/appconf.py +0 -109
- vortex/layout/jobs.py +0 -1276
- vortex/layout/nodes.py +0 -1424
- vortex/layout/subjobs.py +0 -464
- vortex_nwp-2.0.0b1.dist-info/METADATA +0 -50
- vortex_nwp-2.0.0b1.dist-info/RECORD +0 -146
- {vortex_nwp-2.0.0b1.dist-info → vortex_nwp-2.0.0b2.dist-info}/LICENSE +0 -0
- {vortex_nwp-2.0.0b1.dist-info → vortex_nwp-2.0.0b2.dist-info}/top_level.txt +0 -0
vortex/nwp/util/diffpygram.py
CHANGED
|
@@ -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 =
|
|
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 (
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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
|
|
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(
|
|
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
|
|
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 +=
|
|
98
|
+
outstr += "HORIZONTAL GEOMETRY #{:d}\n\n".format(i)
|
|
93
99
|
outstr += str(g)
|
|
94
|
-
outstr +=
|
|
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(
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
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 (
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
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(
|
|
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
|
|
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[
|
|
161
|
-
fid[
|
|
162
|
-
fid[
|
|
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=
|
|
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(
|
|
170
|
-
|
|
171
|
-
|
|
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(
|
|
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(
|
|
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 =
|
|
207
|
-
_HEAD_COUNTER =
|
|
230
|
+
_FMT_COUNTER = "[{:04d}] "
|
|
231
|
+
_HEAD_COUNTER = " " * len(_FMT_COUNTER.format(0))
|
|
208
232
|
|
|
209
|
-
_FMT_SHORT =
|
|
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 = (
|
|
240
|
+
_ELTS_MIDDLE = ("data", "valid", "geo", "score")
|
|
215
241
|
|
|
216
|
-
_SPACER = (
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
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 =
|
|
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(
|
|
259
|
+
self._new = self.new_bundle("New")
|
|
230
260
|
self._new.read_grib(new)
|
|
231
|
-
self._ref = self.new_bundle(
|
|
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 = [
|
|
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 += (
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
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
|
|
328
|
+
if "paramId" in field.fid:
|
|
284
329
|
# GRIB1
|
|
285
|
-
sid = str(field.fid[
|
|
330
|
+
sid = str(field.fid["paramId"]) + "/" + field.fid["shortName"]
|
|
286
331
|
else:
|
|
287
332
|
# GRIB2
|
|
288
|
-
sid = (
|
|
289
|
-
|
|
290
|
-
|
|
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(
|
|
294
|
-
|
|
295
|
-
|
|
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:
|
|
301
|
-
return fmt.format(
|
|
302
|
-
|
|
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
|
|
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 +=
|
|
323
|
-
out +=
|
|
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(
|
|
326
|
-
|
|
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[
|
|
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[
|
|
399
|
+
ref = self.bundles["Ref"].fields[n]
|
|
333
400
|
out += self._embedded_counter(counter)
|
|
334
401
|
if detailed:
|
|
335
|
-
out +=
|
|
336
|
-
|
|
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(
|
|
340
|
-
|
|
341
|
-
|
|
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 +=
|
|
347
|
-
out +=
|
|
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 +=
|
|
350
|
-
out += self._FMT_MIDDLE.format(
|
|
351
|
-
out += self._str_field_summary(couple[0], new) +
|
|
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 +=
|
|
442
|
+
out += "LIST OF HORIZONTAL GEOMETRIES:\n\n"
|
|
355
443
|
out += str(self.hgeo_library)
|
|
356
444
|
return out
|
|
357
445
|
|