vortex-nwp 2.0.0b1__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 (146) hide show
  1. vortex/__init__.py +135 -0
  2. vortex/algo/__init__.py +12 -0
  3. vortex/algo/components.py +2136 -0
  4. vortex/algo/mpitools.py +1648 -0
  5. vortex/algo/mpitools_templates/envelope_wrapper_default.tpl +27 -0
  6. vortex/algo/mpitools_templates/envelope_wrapper_mpiauto.tpl +29 -0
  7. vortex/algo/mpitools_templates/wrapstd_wrapper_default.tpl +18 -0
  8. vortex/algo/serversynctools.py +170 -0
  9. vortex/config.py +115 -0
  10. vortex/data/__init__.py +13 -0
  11. vortex/data/abstractstores.py +1572 -0
  12. vortex/data/containers.py +780 -0
  13. vortex/data/contents.py +596 -0
  14. vortex/data/executables.py +284 -0
  15. vortex/data/flow.py +113 -0
  16. vortex/data/geometries.ini +2689 -0
  17. vortex/data/geometries.py +703 -0
  18. vortex/data/handlers.py +1021 -0
  19. vortex/data/outflow.py +67 -0
  20. vortex/data/providers.py +465 -0
  21. vortex/data/resources.py +201 -0
  22. vortex/data/stores.py +1271 -0
  23. vortex/gloves.py +282 -0
  24. vortex/layout/__init__.py +27 -0
  25. vortex/layout/appconf.py +109 -0
  26. vortex/layout/contexts.py +511 -0
  27. vortex/layout/dataflow.py +1069 -0
  28. vortex/layout/jobs.py +1276 -0
  29. vortex/layout/monitor.py +833 -0
  30. vortex/layout/nodes.py +1424 -0
  31. vortex/layout/subjobs.py +464 -0
  32. vortex/nwp/__init__.py +11 -0
  33. vortex/nwp/algo/__init__.py +12 -0
  34. vortex/nwp/algo/assim.py +483 -0
  35. vortex/nwp/algo/clim.py +920 -0
  36. vortex/nwp/algo/coupling.py +609 -0
  37. vortex/nwp/algo/eda.py +632 -0
  38. vortex/nwp/algo/eps.py +613 -0
  39. vortex/nwp/algo/forecasts.py +745 -0
  40. vortex/nwp/algo/fpserver.py +927 -0
  41. vortex/nwp/algo/ifsnaming.py +403 -0
  42. vortex/nwp/algo/ifsroot.py +311 -0
  43. vortex/nwp/algo/monitoring.py +202 -0
  44. vortex/nwp/algo/mpitools.py +554 -0
  45. vortex/nwp/algo/odbtools.py +974 -0
  46. vortex/nwp/algo/oopsroot.py +735 -0
  47. vortex/nwp/algo/oopstests.py +186 -0
  48. vortex/nwp/algo/request.py +579 -0
  49. vortex/nwp/algo/stdpost.py +1285 -0
  50. vortex/nwp/data/__init__.py +12 -0
  51. vortex/nwp/data/assim.py +392 -0
  52. vortex/nwp/data/boundaries.py +261 -0
  53. vortex/nwp/data/climfiles.py +539 -0
  54. vortex/nwp/data/configfiles.py +149 -0
  55. vortex/nwp/data/consts.py +929 -0
  56. vortex/nwp/data/ctpini.py +133 -0
  57. vortex/nwp/data/diagnostics.py +181 -0
  58. vortex/nwp/data/eda.py +148 -0
  59. vortex/nwp/data/eps.py +383 -0
  60. vortex/nwp/data/executables.py +1039 -0
  61. vortex/nwp/data/fields.py +96 -0
  62. vortex/nwp/data/gridfiles.py +308 -0
  63. vortex/nwp/data/logs.py +551 -0
  64. vortex/nwp/data/modelstates.py +334 -0
  65. vortex/nwp/data/monitoring.py +220 -0
  66. vortex/nwp/data/namelists.py +644 -0
  67. vortex/nwp/data/obs.py +748 -0
  68. vortex/nwp/data/oopsexec.py +72 -0
  69. vortex/nwp/data/providers.py +182 -0
  70. vortex/nwp/data/query.py +217 -0
  71. vortex/nwp/data/stores.py +147 -0
  72. vortex/nwp/data/surfex.py +338 -0
  73. vortex/nwp/syntax/__init__.py +9 -0
  74. vortex/nwp/syntax/stdattrs.py +375 -0
  75. vortex/nwp/tools/__init__.py +10 -0
  76. vortex/nwp/tools/addons.py +35 -0
  77. vortex/nwp/tools/agt.py +55 -0
  78. vortex/nwp/tools/bdap.py +48 -0
  79. vortex/nwp/tools/bdcp.py +38 -0
  80. vortex/nwp/tools/bdm.py +21 -0
  81. vortex/nwp/tools/bdmp.py +49 -0
  82. vortex/nwp/tools/conftools.py +1311 -0
  83. vortex/nwp/tools/drhook.py +62 -0
  84. vortex/nwp/tools/grib.py +268 -0
  85. vortex/nwp/tools/gribdiff.py +99 -0
  86. vortex/nwp/tools/ifstools.py +163 -0
  87. vortex/nwp/tools/igastuff.py +249 -0
  88. vortex/nwp/tools/mars.py +56 -0
  89. vortex/nwp/tools/odb.py +548 -0
  90. vortex/nwp/tools/partitioning.py +234 -0
  91. vortex/nwp/tools/satrad.py +56 -0
  92. vortex/nwp/util/__init__.py +6 -0
  93. vortex/nwp/util/async.py +184 -0
  94. vortex/nwp/util/beacon.py +40 -0
  95. vortex/nwp/util/diffpygram.py +359 -0
  96. vortex/nwp/util/ens.py +198 -0
  97. vortex/nwp/util/hooks.py +128 -0
  98. vortex/nwp/util/taskdeco.py +81 -0
  99. vortex/nwp/util/usepygram.py +591 -0
  100. vortex/nwp/util/usetnt.py +87 -0
  101. vortex/proxy.py +6 -0
  102. vortex/sessions.py +341 -0
  103. vortex/syntax/__init__.py +9 -0
  104. vortex/syntax/stdattrs.py +628 -0
  105. vortex/syntax/stddeco.py +176 -0
  106. vortex/toolbox.py +982 -0
  107. vortex/tools/__init__.py +11 -0
  108. vortex/tools/actions.py +457 -0
  109. vortex/tools/addons.py +297 -0
  110. vortex/tools/arm.py +76 -0
  111. vortex/tools/compression.py +322 -0
  112. vortex/tools/date.py +20 -0
  113. vortex/tools/ddhpack.py +10 -0
  114. vortex/tools/delayedactions.py +672 -0
  115. vortex/tools/env.py +513 -0
  116. vortex/tools/folder.py +663 -0
  117. vortex/tools/grib.py +559 -0
  118. vortex/tools/lfi.py +746 -0
  119. vortex/tools/listings.py +354 -0
  120. vortex/tools/names.py +575 -0
  121. vortex/tools/net.py +1790 -0
  122. vortex/tools/odb.py +10 -0
  123. vortex/tools/parallelism.py +336 -0
  124. vortex/tools/prestaging.py +186 -0
  125. vortex/tools/rawfiles.py +10 -0
  126. vortex/tools/schedulers.py +413 -0
  127. vortex/tools/services.py +871 -0
  128. vortex/tools/storage.py +1061 -0
  129. vortex/tools/surfex.py +61 -0
  130. vortex/tools/systems.py +3396 -0
  131. vortex/tools/targets.py +384 -0
  132. vortex/util/__init__.py +9 -0
  133. vortex/util/config.py +1071 -0
  134. vortex/util/empty.py +24 -0
  135. vortex/util/helpers.py +184 -0
  136. vortex/util/introspection.py +63 -0
  137. vortex/util/iosponge.py +76 -0
  138. vortex/util/roles.py +51 -0
  139. vortex/util/storefunctions.py +103 -0
  140. vortex/util/structs.py +26 -0
  141. vortex/util/worker.py +150 -0
  142. vortex_nwp-2.0.0b1.dist-info/LICENSE +517 -0
  143. vortex_nwp-2.0.0b1.dist-info/METADATA +50 -0
  144. vortex_nwp-2.0.0b1.dist-info/RECORD +146 -0
  145. vortex_nwp-2.0.0b1.dist-info/WHEEL +5 -0
  146. vortex_nwp-2.0.0b1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,539 @@
1
+ """
2
+ Various resources to handle climatology files used in NWP models.
3
+ """
4
+
5
+ from vortex.data.geometries import LonlatGeometry
6
+ from vortex.data.outflow import StaticGeoResource, ModelGeoResource
7
+ from vortex.syntax.stdattrs import month_deco
8
+ from vortex.syntax.stddeco import namebuilding_insert, namebuilding_append
9
+ from ..syntax.stdattrs import gvar, gdomain
10
+
11
+ #: No automatic export
12
+ __all__ = []
13
+
14
+
15
+ @namebuilding_insert('radical', lambda s: 'clim')
16
+ class GenericClim(ModelGeoResource):
17
+ """Abstract class for a model climatology.
18
+
19
+ An HorizontalGeometry object is needed. A Genvkey can be given.
20
+ """
21
+ _abstract = True
22
+ _footprint = [
23
+ gvar,
24
+ dict(
25
+ info = 'Model climatology',
26
+ attr = dict(
27
+ kind = dict(
28
+ values = ['clim_model']
29
+ ),
30
+ nativefmt = dict(
31
+ values = ['fa'],
32
+ default = 'fa',
33
+ ),
34
+ )
35
+ )
36
+ ]
37
+
38
+ @property
39
+ def realkind(self):
40
+ return 'clim_model'
41
+
42
+ @property
43
+ def truncation(self):
44
+ """Returns geometry's truncation."""
45
+ return self.geometry.truncation
46
+
47
+ def olive_basename(self):
48
+ """OLIVE specific naming convention."""
49
+ return 'Const.Clim'
50
+
51
+
52
+ class GlobalClim(GenericClim):
53
+ """Class for a model climatology of a global model.
54
+
55
+ A SpectralGeometry object is needed. A Genvkey can be given.
56
+ """
57
+ _footprint = dict(
58
+ info = 'Model climatology for Global Models',
59
+ attr = dict(
60
+ model = dict(
61
+ values = ['arpege']
62
+ ),
63
+ gvar = dict(
64
+ default = 'clim_[model]_[geometry::gco_grid_def]'
65
+ ),
66
+ )
67
+ )
68
+
69
+
70
+ class MonthlyGlobalClim(GlobalClim):
71
+ """Class for a monthly model climatology of a global model.
72
+
73
+ A SpectralGeometry object is needed. A Genvkey can be given.
74
+ """
75
+
76
+ _footprint = [
77
+ month_deco,
78
+ dict(
79
+ info = 'Monthly model climatology for Global Models',
80
+ )
81
+ ]
82
+
83
+
84
+ class ClimLAM(GenericClim):
85
+ """Class for a model climatology of a Local Area Model.
86
+
87
+ A SpectralGeometry object is needed. A Genvkey can be given
88
+ with a default name retrieved thanks to a GenvDomain object.
89
+ """
90
+ _footprint = [
91
+ gdomain,
92
+ dict(
93
+ info = 'Model climatology for Local Area Models',
94
+ attr = dict(
95
+ model = dict(
96
+ values = ['aladin', 'arome', 'alaro', 'harmoniearome']
97
+ ),
98
+ gvar = dict(
99
+ default = 'clim_[geometry::gco_grid_def]'
100
+ ),
101
+ )
102
+ )
103
+ ]
104
+
105
+
106
+ class MonthlyClimLAM(ClimLAM):
107
+ """Class for a monthly model climatology of a Local Area Model.
108
+
109
+ A SpectralGeometry object is needed. A Genvkey can be given
110
+ with a default name retrieved thanks to a GenvDomain object.
111
+ """
112
+
113
+ _footprint = [
114
+ month_deco,
115
+ dict(
116
+ info = 'Monthly model climatology for Local Area Models',
117
+ )
118
+ ]
119
+
120
+
121
+ class ClimBDAP(GenericClim):
122
+ """Class for a climatology of a BDAP domain.
123
+
124
+ A LonlatGeometry object is needed. A Genvkey can be given
125
+ with a default name retrieved thanks to a GenvDomain object.
126
+ """
127
+ _footprint = [
128
+ gdomain,
129
+ dict(
130
+ info = 'Bdap climatology',
131
+ attr = dict(
132
+ kind = dict(
133
+ values = ['clim_bdap']
134
+ ),
135
+ geometry = dict(
136
+ type = LonlatGeometry,
137
+ ),
138
+ gvar = dict(
139
+ default = 'clim_dap_[gdomain]'
140
+ ),
141
+ )
142
+ )
143
+ ]
144
+
145
+ @property
146
+ def realkind(self):
147
+ return 'clim_bdap'
148
+
149
+
150
+ class MonthlyClimBDAP(ClimBDAP):
151
+ """Class for a monthly climatology of a BDAP domain.
152
+
153
+ A LonlatGeometry object is needed. A Genvkey can be given
154
+ with a default name retrieved thanks to a GenvDomain object.
155
+ """
156
+
157
+ _footprint = [
158
+ month_deco,
159
+ dict(
160
+ info = 'Monthly Bdap climatology',
161
+ )
162
+ ]
163
+
164
+
165
+ # Databases to generate clim files
166
+ class GTOPO30DerivedDB(StaticGeoResource):
167
+ """
168
+ Class of a tar-zip file containing parameters derived from
169
+ GTOPO30 database, generated with old stuff.
170
+
171
+ A Genvkey can be given.
172
+ """
173
+ _footprint = [
174
+ gvar,
175
+ dict(
176
+ info = 'Database for GTOPO30-derived parameters.',
177
+ attr = dict(
178
+ kind = dict(
179
+ values = ['misc_orography'],
180
+ ),
181
+ source = dict(
182
+ values = ['GTOPO30'],
183
+ ),
184
+ geometry = dict(
185
+ values = ['global2m5'],
186
+ ),
187
+ gvar = dict(
188
+ default = '[source]_[kind]'
189
+ ),
190
+ )
191
+ )
192
+ ]
193
+
194
+ @property
195
+ def realkind(self):
196
+ return 'misc_orography'
197
+
198
+
199
+ class UrbanisationDB(StaticGeoResource):
200
+ """Class of a binary file containing urbanisation database.
201
+
202
+ A Genvkey can be given.
203
+ """
204
+ _footprint = [
205
+ gvar,
206
+ dict(
207
+ info = 'Database for urbanisation.',
208
+ attr = dict(
209
+ kind = dict(
210
+ values = ['urbanisation'],
211
+ ),
212
+ source = dict(
213
+ type = str,
214
+ ),
215
+ geometry = dict(
216
+ values = ['global2m5'],
217
+ ),
218
+ gvar = dict(
219
+ default = '[source]_[kind]'
220
+ ),
221
+ )
222
+ )
223
+ ]
224
+
225
+ @property
226
+ def realkind(self):
227
+ return 'urbanisation'
228
+
229
+
230
+ class WaterPercentageDB(StaticGeoResource):
231
+ """Class of a binary file containing water percentage database.
232
+
233
+ A Genvkey can be given.
234
+ """
235
+ _footprint = [
236
+ gvar,
237
+ dict(
238
+ info = 'Database for water percentage.',
239
+ attr = dict(
240
+ kind = dict(
241
+ values = ['water_percentage'],
242
+ ),
243
+ source = dict(
244
+ type = str,
245
+ ),
246
+ geometry = dict(
247
+ values = ['global2m5'],
248
+ ),
249
+ gvar = dict(
250
+ default = '[source]_[kind]'
251
+ ),
252
+ )
253
+ )
254
+ ]
255
+
256
+ @property
257
+ def realkind(self):
258
+ return 'water_percentage'
259
+
260
+
261
+ class SoilANdVegDB(StaticGeoResource):
262
+ """Class of a tar-zip file containing parameters derived from various databases.
263
+
264
+ A Genvkey can be given.
265
+ """
266
+ _footprint = [
267
+ gvar,
268
+ dict(
269
+ info = 'Database for Soil and Vegetation.',
270
+ attr = dict(
271
+ kind = dict(
272
+ values = ['soil_and_veg'],
273
+ ),
274
+ source = dict(
275
+ type = str,
276
+ ),
277
+ geometry = dict(
278
+ values = ['global1dg', 'europeb01'],
279
+ ),
280
+ gvar = dict(
281
+ default = '[source]_[kind]'
282
+ ),
283
+ )
284
+ )
285
+ ]
286
+
287
+ @property
288
+ def realkind(self):
289
+ return 'soil_and_veg'
290
+
291
+
292
+ class MonthlyLAIDB(StaticGeoResource):
293
+ """Class of a binary file containing monthly LAI derived from various databases.
294
+
295
+ A Genvkey can be given.
296
+ """
297
+ _footprint = [
298
+ gvar,
299
+ month_deco,
300
+ dict(
301
+ info = 'Database for monthly LAI.',
302
+ attr = dict(
303
+ kind = dict(
304
+ values = ['LAI'],
305
+ ),
306
+ source = dict(
307
+ type = str,
308
+ ),
309
+ geometry = dict(
310
+ values = ['global1dg', 'europeb01'],
311
+ ),
312
+ gvar = dict(
313
+ default = '[source]_[kind]'
314
+ ),
315
+ )
316
+ )
317
+ ]
318
+
319
+ @property
320
+ def realkind(self):
321
+ return 'LAI'
322
+
323
+
324
+ class MonthlyVegDB(StaticGeoResource):
325
+ """Class of a binary file containing monthly vegetation derived from various databases.
326
+
327
+ A Genvkey can be given.
328
+ """
329
+ _footprint = [
330
+ gvar,
331
+ month_deco,
332
+ dict(
333
+ info = 'Database for monthly vegetation.',
334
+ attr = dict(
335
+ kind = dict(
336
+ values = ['vegetation'],
337
+ ),
338
+ source = dict(
339
+ type = str,
340
+ ),
341
+ geometry = dict(
342
+ values = ['global1dg', 'europeb01'],
343
+ ),
344
+ gvar = dict(
345
+ default = '[source]_[kind]'
346
+ ),
347
+ )
348
+ )
349
+ ]
350
+
351
+ @property
352
+ def realkind(self):
353
+ return 'vegetation'
354
+
355
+
356
+ class SoilClimatologyDB(StaticGeoResource):
357
+ """
358
+ Class of a binary file containing climatologic soil parameters
359
+ (temperature, moisture, snow, ice) derived from various databases.
360
+
361
+ A Genvkey can be given.
362
+ """
363
+ _footprint = [
364
+ gvar,
365
+ dict(
366
+ info = 'Database for soil climatology parameters.',
367
+ attr = dict(
368
+ kind = dict(
369
+ values = ['soil_clim'],
370
+ ),
371
+ source = dict(
372
+ type = str,
373
+ ),
374
+ geometry = dict(
375
+ values = ['globaln108', 'global1dg'],
376
+ ),
377
+ gvar = dict(
378
+ default = '[source]_[kind]'
379
+ ),
380
+ )
381
+ )
382
+ ]
383
+
384
+ @property
385
+ def realkind(self):
386
+ return 'soil_clim'
387
+
388
+
389
+ class SurfGeopotentialDB(StaticGeoResource):
390
+ """
391
+ Class of a binary file containing Surface Geopotential derived from
392
+ various databases.
393
+
394
+ A Genvkey can be given.
395
+ """
396
+ _footprint = [
397
+ gvar,
398
+ dict(
399
+ info = 'Database for surface geopotential.',
400
+ attr = dict(
401
+ kind = dict(
402
+ values = ['surfgeopotential'],
403
+ ),
404
+ source = dict(
405
+ type = str,
406
+ ),
407
+ geometry = dict(
408
+ values = ['global1dg'],
409
+ ),
410
+ gvar = dict(
411
+ default = '[source]_[kind]'
412
+ ),
413
+ )
414
+ )
415
+ ]
416
+
417
+ @property
418
+ def realkind(self):
419
+ return 'surfgeopotential'
420
+
421
+
422
+ class MonthlySoilClimatologyDB(SoilClimatologyDB):
423
+ """
424
+ Class of a binary file containing monthly climatologic soil parameters
425
+ (temperature, moisture, snow, ice) derived from various databases.
426
+
427
+ A Genvkey can be given.
428
+ """
429
+ _footprint = [
430
+ month_deco,
431
+ dict(
432
+ info = 'Database for monthly soil climatology parameters.',
433
+ )
434
+ ]
435
+
436
+
437
+ class MonthlyChemicalDB(StaticGeoResource):
438
+ """
439
+ Class of a binary file containing climatologic chemicals (ozone, aerosols)
440
+ parameters derived from various databases.
441
+
442
+ A Genvkey can be given.
443
+ """
444
+ _footprint = [
445
+ gvar,
446
+ month_deco,
447
+ dict(
448
+ info = 'Database for monthly chemicals.',
449
+ attr = dict(
450
+ kind = dict(
451
+ values = ['ozone', 'aerosols'],
452
+ ),
453
+ source = dict(
454
+ type = str,
455
+ ),
456
+ geometry = dict(
457
+ values = ['global2dg5', 'global5x4'],
458
+ ),
459
+ gvar = dict(
460
+ default = '[source]_[kind]'
461
+ ),
462
+ )
463
+ )
464
+ ]
465
+
466
+ @property
467
+ def realkind(self):
468
+ return self.kind
469
+
470
+
471
+ class GeometryIllustration(StaticGeoResource):
472
+ """Illustration of a domain geographic coverage."""
473
+
474
+ _footprint = dict(
475
+ info = 'Illustration of a domain geographic coverage.',
476
+ attr = dict(
477
+ kind = dict(
478
+ values = ['geometry_plot'],
479
+ ),
480
+ nativefmt = dict(
481
+ values = ['png', 'pdf'],
482
+ ),
483
+ )
484
+ )
485
+
486
+ @property
487
+ def realkind(self):
488
+ return 'geometry_plot'
489
+
490
+
491
+ @namebuilding_append('src', lambda s: [s.stat, s.level, s.nbfiles])
492
+ class Stabal(ModelGeoResource):
493
+ """Spectral covariance operators.
494
+
495
+ Explanations for the ``stat`` attribute:
496
+ * bal: cross-variables balances
497
+ * cv: auto-correlations of the control variable
498
+ * cvt: ???
499
+
500
+ A GenvKey can be given.
501
+ """
502
+
503
+ _footprint = [
504
+ gvar,
505
+ dict(
506
+ info = 'Spectral covariance operators',
507
+ attr = dict(
508
+ kind = dict(
509
+ values = ['stabal'],
510
+ ),
511
+ stat = dict(
512
+ values = ['bal', 'cv', 'cvt'],
513
+ ),
514
+ level = dict(
515
+ type = int,
516
+ optional = True,
517
+ default = 96,
518
+ values = [41, 96],
519
+ ),
520
+ nbfiles = dict(
521
+ default = 0,
522
+ optional = True,
523
+ type = int,
524
+ ),
525
+ gvar = dict(
526
+ default = 'stabal[level]_[stat]'
527
+ ),
528
+ )
529
+ )
530
+ ]
531
+
532
+ @property
533
+ def realkind(self):
534
+ return 'stabal'
535
+
536
+ @property
537
+ def truncation(self):
538
+ """Returns geometry's truncation."""
539
+ return self.geometry.truncation
@@ -0,0 +1,149 @@
1
+ """
2
+ Various configuration files (Namelists excepted).
3
+ """
4
+
5
+ from vortex.data.outflow import StaticResource
6
+ from ..syntax.stdattrs import gvar
7
+ from vortex.data.contents import JsonDictContent, DataRaw
8
+ from vortex.syntax.stddeco import namebuilding_append
9
+
10
+ #: No automatic export
11
+ __all__ = []
12
+
13
+
14
+ @namebuilding_append('src', lambda self: [self.scope, self.source])
15
+ class GenericConfig(StaticResource):
16
+ """Generic class to access a pack of configuration files."""
17
+
18
+ _abstract = True
19
+ _footprint = [
20
+ gvar,
21
+ dict(
22
+ info = 'Configuration file from a pack',
23
+ attr = dict(
24
+ kind = dict(
25
+ values = ['config']
26
+ ),
27
+ gvar = dict(
28
+ default = 'config_[scope]'
29
+ ),
30
+ scope=dict(
31
+ info = "The configuration pack purpose"
32
+ ),
33
+ source = dict(
34
+ info = 'The config name within the config pack.',
35
+ ),
36
+ )
37
+ )
38
+ ]
39
+
40
+ @property
41
+ def realkind(self):
42
+ return 'config'
43
+
44
+ def gget_urlquery(self):
45
+ """GGET specific query : ``extract``."""
46
+ return 'extract=' + self.source
47
+
48
+
49
+ class AsciiConfig(GenericConfig):
50
+ """Generic class to access a pack of ASCII configuration files."""
51
+ _footprint = dict(
52
+ info = 'ASCII Configuration file from a pack',
53
+ attr = dict(
54
+ nativefmt = dict(
55
+ values = ['ascii', ]
56
+ ),
57
+ clscontents = dict(
58
+ default = DataRaw
59
+ ),
60
+ )
61
+ )
62
+
63
+
64
+ class IniConfig(GenericConfig):
65
+ """Generic class to access a ini configuration file (e.g. for mkjob)."""
66
+ _footprint = dict(
67
+ info = 'Ini configuration file',
68
+ attr = dict(
69
+ nativefmt = dict(
70
+ values = ['ini', ]
71
+ ),
72
+ )
73
+ )
74
+
75
+
76
+ class JsonConfig(GenericConfig):
77
+ """Generic class to access a pack of JSON configuration files."""
78
+ _footprint = dict(
79
+ info = 'JSON Configuration file from a pack',
80
+ attr = dict(
81
+ scope=dict(
82
+ outcast = ['oops', ]
83
+ ),
84
+ nativefmt = dict(
85
+ values = ['json', ]
86
+ ),
87
+ clscontents = dict(
88
+ default = JsonDictContent
89
+ ),
90
+ )
91
+ )
92
+
93
+
94
+ class OopsJsonConfig(JsonConfig):
95
+ """Configuration files for OOPS, defining the oops objects to be built"""
96
+ _footprint = dict(
97
+ info = 'OOPS JSON Configuration file from a pack',
98
+ attr = dict(
99
+ scope=dict(
100
+ values = ['oops', ],
101
+ outcast = []
102
+ ),
103
+ objects = dict(
104
+ info = 'The OOPS objects to be built.',
105
+ ),
106
+ source = dict(
107
+ info = 'The config name within the config pack.',
108
+ optional = True,
109
+ default = '[objects].json',
110
+ ),
111
+ )
112
+ )
113
+
114
+
115
+ class YamlConfig(GenericConfig):
116
+ """Generic class to access a pack of YAML configuration files."""
117
+ _footprint = dict(
118
+ info = 'YAML Configuration file from a pack',
119
+ attr = dict(
120
+ nativefmt = dict(
121
+ values = ['yaml', ]
122
+ ),
123
+ )
124
+ )
125
+
126
+
127
+ class Bundle(StaticResource):
128
+ """Contains bundling of source codes."""
129
+ _footprint = [
130
+ gvar,
131
+ dict(
132
+ info = 'Contains bundling of source codes.',
133
+ attr = dict(
134
+ kind = dict(
135
+ values = ['bundle']
136
+ ),
137
+ gvar = dict(
138
+ default = 'bundle',
139
+ ),
140
+ nativefmt = dict(
141
+ values = ['yml', 'yaml']
142
+ ),
143
+ )
144
+ )
145
+ ]
146
+
147
+ @property
148
+ def realkind(self):
149
+ return 'bundle'