vortex-nwp 2.0.0b1__py3-none-any.whl → 2.1.0__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 (141) hide show
  1. vortex/__init__.py +75 -47
  2. vortex/algo/__init__.py +3 -2
  3. vortex/algo/components.py +944 -618
  4. vortex/algo/mpitools.py +802 -497
  5. vortex/algo/mpitools_templates/__init__.py +1 -0
  6. vortex/algo/serversynctools.py +34 -33
  7. vortex/config.py +19 -22
  8. vortex/data/__init__.py +9 -3
  9. vortex/data/abstractstores.py +593 -655
  10. vortex/data/containers.py +217 -162
  11. vortex/data/contents.py +65 -39
  12. vortex/data/executables.py +93 -102
  13. vortex/data/flow.py +40 -34
  14. vortex/data/geometries.py +228 -132
  15. vortex/data/handlers.py +436 -227
  16. vortex/data/outflow.py +15 -15
  17. vortex/data/providers.py +185 -163
  18. vortex/data/resources.py +48 -42
  19. vortex/data/stores.py +540 -417
  20. vortex/data/sync_templates/__init__.py +0 -0
  21. vortex/gloves.py +114 -87
  22. vortex/layout/__init__.py +1 -8
  23. vortex/layout/contexts.py +150 -84
  24. vortex/layout/dataflow.py +353 -202
  25. vortex/layout/monitor.py +264 -128
  26. vortex/nwp/__init__.py +5 -2
  27. vortex/nwp/algo/__init__.py +14 -5
  28. vortex/nwp/algo/assim.py +205 -151
  29. vortex/nwp/algo/clim.py +683 -517
  30. vortex/nwp/algo/coupling.py +447 -225
  31. vortex/nwp/algo/eda.py +437 -229
  32. vortex/nwp/algo/eps.py +403 -231
  33. vortex/nwp/algo/forecasts.py +416 -275
  34. vortex/nwp/algo/fpserver.py +683 -307
  35. vortex/nwp/algo/ifsnaming.py +205 -145
  36. vortex/nwp/algo/ifsroot.py +215 -122
  37. vortex/nwp/algo/monitoring.py +137 -76
  38. vortex/nwp/algo/mpitools.py +330 -190
  39. vortex/nwp/algo/odbtools.py +637 -353
  40. vortex/nwp/algo/oopsroot.py +454 -273
  41. vortex/nwp/algo/oopstests.py +90 -56
  42. vortex/nwp/algo/request.py +287 -206
  43. vortex/nwp/algo/stdpost.py +878 -522
  44. vortex/nwp/data/__init__.py +22 -4
  45. vortex/nwp/data/assim.py +125 -137
  46. vortex/nwp/data/boundaries.py +121 -68
  47. vortex/nwp/data/climfiles.py +193 -211
  48. vortex/nwp/data/configfiles.py +73 -69
  49. vortex/nwp/data/consts.py +426 -401
  50. vortex/nwp/data/ctpini.py +59 -43
  51. vortex/nwp/data/diagnostics.py +94 -66
  52. vortex/nwp/data/eda.py +50 -51
  53. vortex/nwp/data/eps.py +195 -146
  54. vortex/nwp/data/executables.py +440 -434
  55. vortex/nwp/data/fields.py +63 -48
  56. vortex/nwp/data/gridfiles.py +183 -111
  57. vortex/nwp/data/logs.py +250 -217
  58. vortex/nwp/data/modelstates.py +180 -151
  59. vortex/nwp/data/monitoring.py +72 -99
  60. vortex/nwp/data/namelists.py +254 -202
  61. vortex/nwp/data/obs.py +400 -308
  62. vortex/nwp/data/oopsexec.py +22 -20
  63. vortex/nwp/data/providers.py +90 -65
  64. vortex/nwp/data/query.py +71 -82
  65. vortex/nwp/data/stores.py +49 -36
  66. vortex/nwp/data/surfex.py +136 -137
  67. vortex/nwp/syntax/__init__.py +1 -1
  68. vortex/nwp/syntax/stdattrs.py +173 -111
  69. vortex/nwp/tools/__init__.py +2 -2
  70. vortex/nwp/tools/addons.py +22 -17
  71. vortex/nwp/tools/agt.py +24 -12
  72. vortex/nwp/tools/bdap.py +16 -5
  73. vortex/nwp/tools/bdcp.py +4 -1
  74. vortex/nwp/tools/bdm.py +3 -0
  75. vortex/nwp/tools/bdmp.py +14 -9
  76. vortex/nwp/tools/conftools.py +728 -378
  77. vortex/nwp/tools/drhook.py +12 -8
  78. vortex/nwp/tools/grib.py +65 -39
  79. vortex/nwp/tools/gribdiff.py +22 -17
  80. vortex/nwp/tools/ifstools.py +82 -42
  81. vortex/nwp/tools/igastuff.py +167 -143
  82. vortex/nwp/tools/mars.py +14 -2
  83. vortex/nwp/tools/odb.py +234 -125
  84. vortex/nwp/tools/partitioning.py +61 -37
  85. vortex/nwp/tools/satrad.py +27 -12
  86. vortex/nwp/util/async.py +83 -55
  87. vortex/nwp/util/beacon.py +10 -10
  88. vortex/nwp/util/diffpygram.py +174 -86
  89. vortex/nwp/util/ens.py +144 -63
  90. vortex/nwp/util/hooks.py +30 -19
  91. vortex/nwp/util/taskdeco.py +28 -24
  92. vortex/nwp/util/usepygram.py +278 -172
  93. vortex/nwp/util/usetnt.py +31 -17
  94. vortex/sessions.py +72 -39
  95. vortex/syntax/__init__.py +1 -1
  96. vortex/syntax/stdattrs.py +410 -171
  97. vortex/syntax/stddeco.py +31 -22
  98. vortex/toolbox.py +327 -192
  99. vortex/tools/__init__.py +11 -2
  100. vortex/tools/actions.py +110 -121
  101. vortex/tools/addons.py +111 -92
  102. vortex/tools/arm.py +42 -22
  103. vortex/tools/compression.py +72 -69
  104. vortex/tools/date.py +11 -4
  105. vortex/tools/delayedactions.py +242 -132
  106. vortex/tools/env.py +75 -47
  107. vortex/tools/folder.py +342 -171
  108. vortex/tools/grib.py +341 -162
  109. vortex/tools/lfi.py +423 -216
  110. vortex/tools/listings.py +109 -40
  111. vortex/tools/names.py +218 -156
  112. vortex/tools/net.py +655 -299
  113. vortex/tools/parallelism.py +93 -61
  114. vortex/tools/prestaging.py +55 -31
  115. vortex/tools/schedulers.py +172 -105
  116. vortex/tools/services.py +403 -334
  117. vortex/tools/storage.py +293 -358
  118. vortex/tools/surfex.py +24 -24
  119. vortex/tools/systems.py +1234 -643
  120. vortex/tools/targets.py +156 -100
  121. vortex/util/__init__.py +1 -1
  122. vortex/util/config.py +378 -327
  123. vortex/util/empty.py +2 -2
  124. vortex/util/helpers.py +56 -24
  125. vortex/util/introspection.py +18 -12
  126. vortex/util/iosponge.py +8 -4
  127. vortex/util/roles.py +4 -6
  128. vortex/util/storefunctions.py +39 -13
  129. vortex/util/structs.py +3 -3
  130. vortex/util/worker.py +29 -17
  131. vortex_nwp-2.1.0.dist-info/METADATA +67 -0
  132. vortex_nwp-2.1.0.dist-info/RECORD +144 -0
  133. {vortex_nwp-2.0.0b1.dist-info → vortex_nwp-2.1.0.dist-info}/WHEEL +1 -1
  134. vortex/layout/appconf.py +0 -109
  135. vortex/layout/jobs.py +0 -1276
  136. vortex/layout/nodes.py +0 -1424
  137. vortex/layout/subjobs.py +0 -464
  138. vortex_nwp-2.0.0b1.dist-info/METADATA +0 -50
  139. vortex_nwp-2.0.0b1.dist-info/RECORD +0 -146
  140. {vortex_nwp-2.0.0b1.dist-info → vortex_nwp-2.1.0.dist-info/licenses}/LICENSE +0 -0
  141. {vortex_nwp-2.0.0b1.dist-info → vortex_nwp-2.1.0.dist-info}/top_level.txt +0 -0
vortex/data/outflow.py CHANGED
@@ -17,13 +17,12 @@ __all__ = []
17
17
 
18
18
 
19
19
  class StaticResource(Resource):
20
-
21
20
  _abstract = True
22
21
  _footprint = dict(
23
- attr = dict(
24
- kind = dict(
25
- info = "The resource's kind.",
26
- doc_zorder = 90,
22
+ attr=dict(
23
+ kind=dict(
24
+ info="The resource's kind.",
25
+ doc_zorder=90,
27
26
  ),
28
27
  )
29
28
  )
@@ -36,19 +35,20 @@ class StaticGeoResource(StaticResource):
36
35
  _footprint = [
37
36
  hgeometry_deco,
38
37
  dict(
39
- attr = dict(
40
- clscontents = dict(
41
- default = FormatAdapter,
38
+ attr=dict(
39
+ clscontents=dict(
40
+ default=FormatAdapter,
42
41
  ),
43
42
  )
44
- )
43
+ ),
45
44
  ]
46
45
 
47
46
 
48
47
  class ModelResource(StaticResource):
49
-
50
48
  _abstract = True
51
- _footprint = [model_deco, ]
49
+ _footprint = [
50
+ model_deco,
51
+ ]
52
52
 
53
53
 
54
54
  class ModelGeoResource(ModelResource):
@@ -58,10 +58,10 @@ class ModelGeoResource(ModelResource):
58
58
  _footprint = [
59
59
  hgeometry_deco,
60
60
  dict(
61
- attr = dict(
62
- clscontents = dict(
63
- default = FormatAdapter,
61
+ attr=dict(
62
+ clscontents=dict(
63
+ default=FormatAdapter,
64
64
  ),
65
65
  )
66
- )
66
+ ),
67
67
  ]
vortex/data/providers.py CHANGED
@@ -6,30 +6,26 @@ Of course, the :class:`Vortex` abstract provider is a must see. It has three
6
6
  declinations depending on the experiment indentifier type.
7
7
  """
8
8
 
9
- import collections
10
- import operator
11
9
  import os.path
12
- import re
13
10
  from urllib import parse as urlparse
14
11
  import warnings
15
12
 
16
13
  from bronx.fancies import loggers
17
- from bronx.syntax.parsing import StringDecoder
18
14
  import footprints
19
15
  from footprints import proxy as fpx
20
- from footprints.stdtypes import FPDict
21
16
 
22
- from vortex import sessions
23
17
  from vortex import config
24
- from vortex.syntax.stdattrs import xpid, legacy_xpid, free_xpid, opsuites, \
25
- demosuites, scenario, member, block
26
- from vortex.syntax.stdattrs import LegacyXPid, any_vortex_xpid
27
- from vortex.syntax.stdattrs import namespacefp, Namespace, FmtInt
18
+ from vortex.syntax.stdattrs import (
19
+ xpid,
20
+ scenario,
21
+ member,
22
+ block,
23
+ )
24
+ from vortex.syntax.stdattrs import namespacefp, FmtInt
28
25
  from vortex.tools import net, names
29
- from vortex.util.config import GenericConfigParser
30
26
 
31
27
  #: No automatic export
32
- __all__ = ['Provider']
28
+ __all__ = ["Provider"]
33
29
 
34
30
  logger = loggers.getLogger(__name__)
35
31
 
@@ -38,48 +34,48 @@ class Provider(footprints.FootprintBase):
38
34
  """Abstract class for any Provider."""
39
35
 
40
36
  _abstract = True
41
- _collector = ('provider',)
37
+ _collector = ("provider",)
42
38
  _footprint = dict(
43
- info = 'Abstract root provider',
44
- attr = dict(
45
- vapp = dict(
46
- info = "The application's identifier.",
47
- alias = ('application',),
48
- optional = True,
49
- default = '[glove::vapp]',
50
- doc_zorder = -10
39
+ info="Abstract root provider",
40
+ attr=dict(
41
+ vapp=dict(
42
+ info="The application's identifier.",
43
+ alias=("application",),
44
+ optional=True,
45
+ default="[glove::vapp]",
46
+ doc_zorder=-10,
51
47
  ),
52
- vconf = dict(
53
- info = "The configuration's identifier.",
54
- alias = ('configuration',),
55
- optional = True,
56
- default = '[glove::vconf]',
57
- doc_zorder = -10
48
+ vconf=dict(
49
+ info="The configuration's identifier.",
50
+ alias=("configuration",),
51
+ optional=True,
52
+ default="[glove::vconf]",
53
+ doc_zorder=-10,
58
54
  ),
59
- username = dict(
60
- info = "The username that will be used whenever necessary.",
61
- optional = True,
62
- default = None,
63
- alias = ('user', 'logname')
55
+ username=dict(
56
+ info="The username that will be used whenever necessary.",
57
+ optional=True,
58
+ default=None,
59
+ alias=("user", "logname"),
64
60
  ),
65
61
  ),
66
- fastkeys = {'namespace'},
62
+ fastkeys={"namespace"},
67
63
  )
68
64
 
69
65
  def __init__(self, *args, **kw):
70
- logger.debug('Abstract provider init %s', self.__class__)
66
+ logger.debug("Abstract provider init %s", self.__class__)
71
67
  super().__init__(*args, **kw)
72
68
 
73
69
  def _str_more(self):
74
70
  """Additional information to print representation."""
75
71
  try:
76
- return 'namespace=\'{:s}\''.format(self.namespace)
72
+ return "namespace='{:s}'".format(self.namespace)
77
73
  except AttributeError:
78
74
  return super()._str_more()
79
75
 
80
76
  @property
81
77
  def realkind(self):
82
- return 'provider'
78
+ return "provider"
83
79
 
84
80
  def scheme(self, resource):
85
81
  """Abstract method."""
@@ -123,61 +119,67 @@ class Provider(footprints.FootprintBase):
123
119
  The different operations of the algorithm can be redefined by subclasses.
124
120
  """
125
121
  username = self.netuser_name(resource)
126
- fullnetloc = ('{:s}@{:s}'.format(username, self.netloc(resource)) if username
127
- else self.netloc(resource))
122
+ fullnetloc = (
123
+ "{:s}@{:s}".format(username, self.netloc(resource))
124
+ if username
125
+ else self.netloc(resource)
126
+ )
128
127
  logger.debug(
129
- 'scheme %s netloc %s normpath %s urlquery %s',
128
+ "scheme %s netloc %s normpath %s urlquery %s",
130
129
  self.scheme(resource),
131
130
  fullnetloc,
132
- os.path.normpath(self.pathname(resource) + '/' + self.basename(resource)),
133
- self.urlquery(resource)
131
+ os.path.normpath(
132
+ self.pathname(resource) + "/" + self.basename(resource)
133
+ ),
134
+ self.urlquery(resource),
134
135
  )
135
136
 
136
- return net.uriunparse((
137
- self.scheme(resource),
138
- fullnetloc,
139
- os.path.normpath(self.pathname(resource) + '/' + self.basename(resource)),
140
- None,
141
- self.urlquery(resource),
142
- None
143
- ))
137
+ return net.uriunparse(
138
+ (
139
+ self.scheme(resource),
140
+ fullnetloc,
141
+ os.path.normpath(
142
+ self.pathname(resource) + "/" + self.basename(resource)
143
+ ),
144
+ None,
145
+ self.urlquery(resource),
146
+ None,
147
+ )
148
+ )
144
149
 
145
150
 
146
151
  class Magic(Provider):
147
-
148
152
  _footprint = [
149
153
  xpid,
150
154
  dict(
151
- info = 'Magic provider that always returns the same URI.',
152
- attr = dict(
153
- fake = dict(
154
- info = "Enable this magic provider.",
155
- alias = ('nowhere', 'noprovider'),
156
- type = bool,
157
- optional = True,
158
- default = True,
155
+ info="Magic provider that always returns the same URI.",
156
+ attr=dict(
157
+ fake=dict(
158
+ info="Enable this magic provider.",
159
+ alias=("nowhere", "noprovider"),
160
+ type=bool,
161
+ optional=True,
162
+ default=True,
159
163
  ),
160
- magic = dict(
161
- info = "The URI returned by this provider."
164
+ magic=dict(info="The URI returned by this provider."),
165
+ experiment=dict(
166
+ optional=True,
167
+ doc_visibility=footprints.doc.visibility.ADVANCED,
162
168
  ),
163
- experiment = dict(
164
- optional = True,
165
- doc_visibility = footprints.doc.visibility.ADVANCED,
169
+ vapp=dict(
170
+ doc_visibility=footprints.doc.visibility.GURU,
166
171
  ),
167
- vapp = dict(
168
- doc_visibility = footprints.doc.visibility.GURU,
169
- ),
170
- vconf = dict(
171
- doc_visibility = footprints.doc.visibility.GURU,
172
+ vconf=dict(
173
+ doc_visibility=footprints.doc.visibility.GURU,
172
174
  ),
173
175
  ),
174
- fastkeys = {'magic'},
175
- )
176
+ fastkeys={"magic"},
177
+ ),
176
178
  ]
177
179
 
178
180
  @property
179
181
  def realkind(self):
180
- return 'magic'
182
+ return "magic"
181
183
 
182
184
  def uri(self, resource):
183
185
  """URI is supposed to be the magic value !"""
@@ -185,47 +187,46 @@ class Magic(Provider):
185
187
 
186
188
 
187
189
  class Remote(Provider):
188
-
189
190
  _footprint = dict(
190
- info = 'Provider that manipulates data given a real path',
191
- attr = dict(
192
- remote = dict(
193
- info = 'The path to the data.',
194
- alias = ('remfile', 'rempath'),
195
- doc_zorder = 50
191
+ info="Provider that manipulates data given a real path",
192
+ attr=dict(
193
+ remote=dict(
194
+ info="The path to the data.",
195
+ alias=("remfile", "rempath"),
196
+ doc_zorder=50,
196
197
  ),
197
- hostname = dict(
198
- info = 'The hostname that holds the data.',
199
- optional = True,
200
- default = 'localhost'
198
+ hostname=dict(
199
+ info="The hostname that holds the data.",
200
+ optional=True,
201
+ default="localhost",
201
202
  ),
202
- tube = dict(
203
- info = "The protocol used to access the data.",
204
- optional = True,
205
- values = ['scp', 'ftp', 'rcp', 'file', 'symlink'],
206
- default = 'file',
203
+ tube=dict(
204
+ info="The protocol used to access the data.",
205
+ optional=True,
206
+ values=["scp", "ftp", "rcp", "file", "symlink"],
207
+ default="file",
207
208
  ),
208
- vapp = dict(
209
- doc_visibility = footprints.doc.visibility.GURU,
209
+ vapp=dict(
210
+ doc_visibility=footprints.doc.visibility.GURU,
210
211
  ),
211
- vconf = dict(
212
- doc_visibility = footprints.doc.visibility.GURU,
212
+ vconf=dict(
213
+ doc_visibility=footprints.doc.visibility.GURU,
213
214
  ),
214
215
  ),
215
- fastkeys = {'remote'},
216
+ fastkeys={"remote"},
216
217
  )
217
218
 
218
219
  def __init__(self, *args, **kw):
219
- logger.debug('Remote provider init %s', self.__class__)
220
+ logger.debug("Remote provider init %s", self.__class__)
220
221
  super().__init__(*args, **kw)
221
222
 
222
223
  @property
223
224
  def realkind(self):
224
- return 'remote'
225
+ return "remote"
225
226
 
226
227
  def _str_more(self):
227
228
  """Additional information to print representation."""
228
- return 'path=\'{:s}\''.format(self.remote)
229
+ return "path='{:s}'".format(self.remote)
229
230
 
230
231
  def scheme(self, resource):
231
232
  """The Remote scheme is its tube."""
@@ -245,10 +246,10 @@ class Remote(Provider):
245
246
 
246
247
  def urlquery(self, resource):
247
248
  """Check for relative path or not."""
248
- if self.remote.startswith('/'):
249
+ if self.remote.startswith("/"):
249
250
  return None
250
251
  else:
251
- return 'relative=1'
252
+ return "relative=1"
252
253
 
253
254
 
254
255
  def set_namespace_from_cache_settings(usecache, usearchive):
@@ -285,72 +286,81 @@ class Vortex(Provider):
285
286
  scenario,
286
287
  namespacefp,
287
288
  dict(
288
- info = 'Vortex provider',
289
- attr = dict(
290
- experiment = dict(
291
- info = "Provider experiment id",
292
- type = str,
293
- optional = False,
294
- access = "rwx",
289
+ info="Vortex provider",
290
+ attr=dict(
291
+ experiment=dict(
292
+ info="Provider experiment id",
293
+ type=str,
294
+ optional=False,
295
+ access="rwx",
295
296
  ),
296
- member = dict(
297
- type = FmtInt,
298
- args = dict(fmt = '03'),
297
+ member=dict(
298
+ type=FmtInt,
299
+ args=dict(fmt="03"),
299
300
  ),
300
- namespace = dict(
301
- values = [
302
- 'vortex.cache.fr', 'vortex.archive.fr', 'vortex.multi.fr', 'vortex.stack.fr',
303
- 'open.cache.fr', 'open.archive.fr', 'open.multi.fr', 'open.stack.fr',
301
+ namespace=dict(
302
+ values=[
303
+ "vortex.cache.fr",
304
+ "vortex.archive.fr",
305
+ "vortex.multi.fr",
306
+ "vortex.stack.fr",
307
+ "open.cache.fr",
308
+ "open.archive.fr",
309
+ "open.multi.fr",
310
+ "open.stack.fr",
304
311
  ],
305
- remap = {
306
- 'open.cache.fr': 'vortex.cache.fr',
307
- 'open.archive.fr': 'vortex.archive.fr',
308
- 'open.multi.fr': 'vortex.multi.fr',
309
- 'open.stack.fr': 'vortex.stack.fr',
312
+ remap={
313
+ "open.cache.fr": "vortex.cache.fr",
314
+ "open.archive.fr": "vortex.archive.fr",
315
+ "open.multi.fr": "vortex.multi.fr",
316
+ "open.stack.fr": "vortex.stack.fr",
310
317
  },
311
- optional = True,
312
- default = None,
313
- access = "rwx",
318
+ optional=True,
319
+ default=None,
320
+ access="rwx",
314
321
  ),
315
- cache = dict(
316
- info = "Whether or not to use the cache",
317
- type = bool,
318
- optional = True,
319
- default = None,
322
+ cache=dict(
323
+ info="Whether or not to use the cache",
324
+ type=bool,
325
+ optional=True,
326
+ default=None,
320
327
  ),
321
- archive = dict(
322
- info = "Whether or not to use the archive",
323
- type = bool,
324
- optional = True,
325
- default = None,
328
+ archive=dict(
329
+ info="Whether or not to use the archive",
330
+ type=bool,
331
+ optional=True,
332
+ default=None,
326
333
  ),
327
- namebuild = dict(
328
- info = "The object responsible for building filenames.",
329
- optional = True,
330
- doc_visibility = footprints.doc.visibility.ADVANCED,
334
+ namebuild=dict(
335
+ info="The object responsible for building filenames.",
336
+ optional=True,
337
+ doc_visibility=footprints.doc.visibility.ADVANCED,
331
338
  ),
332
- expected = dict(
333
- info = "Is the resource expected ?",
334
- alias = ('promised',),
335
- type = bool,
336
- optional = True,
337
- default = False,
338
- doc_zorder = -5,
339
+ expected=dict(
340
+ info="Is the resource expected ?",
341
+ alias=("promised",),
342
+ type=bool,
343
+ optional=True,
344
+ default=False,
345
+ doc_zorder=-5,
339
346
  ),
340
347
  ),
341
- fastkeys = {'block', 'experiment'},
342
- )
348
+ fastkeys={"block", "experiment"},
349
+ ),
343
350
  ]
344
351
 
345
352
  def __init__(self, *args, **kw):
346
- logger.debug('Vortex experiment provider init %s', self.__class__)
353
+ logger.debug("Vortex experiment provider init %s", self.__class__)
347
354
  super().__init__(*args, **kw)
348
355
  if self.namebuild is not None:
349
356
  if self.namebuild not in self._CUSTOM_NAME_BUILDERS:
350
357
  builder = fpx.vortexnamebuilder(name=self.namebuild)
351
358
  if builder is None:
352
- raise ValueError("The << {:s} >> name builder does not exists."
353
- .format(self.namebuild))
359
+ raise ValueError(
360
+ "The << {:s} >> name builder does not exists.".format(
361
+ self.namebuild
362
+ )
363
+ )
354
364
  self._CUSTOM_NAME_BUILDERS[self.namebuild] = builder
355
365
  self._namebuilder = self._CUSTOM_NAME_BUILDERS[self.namebuild]
356
366
  else:
@@ -368,23 +378,26 @@ class Vortex(Provider):
368
378
  # are specified, 'namespace' is ignored
369
379
  if self.namespace and (self.cache or self.archive):
370
380
  logger.warning(
371
- f"Ignoring attribute \"namespace\" set to {self.namespace} "
381
+ f'Ignoring attribute "namespace" set to {self.namespace} '
372
382
  "as attribute(s) cache and/or archive are specified"
373
383
  )
374
- if self.namespace and ((self.cache is None) and (self.archive is None)):
384
+ if self.namespace and (
385
+ (self.cache is None) and (self.archive is None)
386
+ ):
375
387
  warnings.warn(
376
- "Using attribute \"namespace\" is deprecated, use \"cache\""
377
- "and/or \"archive\" instead.",
388
+ 'Using attribute "namespace" is deprecated, use "cache"'
389
+ 'and/or "archive" instead.',
378
390
  category=DeprecationWarning,
379
391
  )
380
392
  else:
381
393
  self.namespace = set_namespace_from_cache_settings(
382
- self.cache, self.archive,
383
- )
394
+ self.cache,
395
+ self.archive,
396
+ )
384
397
  if not self.namespace:
385
398
  raise ValueError(
386
- "Attributes \"cache\" and \"archive\" cannot be "
387
- "both specified as \"False\"."
399
+ 'Attributes "cache" and "archive" cannot be '
400
+ 'both specified as "False".'
388
401
  )
389
402
 
390
403
  @property
@@ -393,7 +406,7 @@ class Vortex(Provider):
393
406
 
394
407
  @property
395
408
  def realkind(self):
396
- return 'vortex'
409
+ return "vortex"
397
410
 
398
411
  def actual_experiment(self, resource):
399
412
  return self.experiment
@@ -401,13 +414,15 @@ class Vortex(Provider):
401
414
  def _str_more(self):
402
415
  """Additional information to print representation."""
403
416
  try:
404
- return 'namespace=\'{:s}\' block=\'{:s}\''.format(self.namespace, self.block)
417
+ return "namespace='{:s}' block='{:s}'".format(
418
+ self.namespace, self.block
419
+ )
405
420
  except AttributeError:
406
421
  return super()._str_more()
407
422
 
408
423
  def scheme(self, resource):
409
424
  """Default: ``vortex``."""
410
- return 'x' + self.realkind if self.expected else self.realkind
425
+ return "x" + self.realkind if self.expected else self.realkind
411
426
 
412
427
  def netloc(self, resource):
413
428
  """Returns the current ``namespace``."""
@@ -450,16 +465,23 @@ class Vortex(Provider):
450
465
  stackres, keepmember = resource.stackedstorage_resource()
451
466
  if stackres:
452
467
  stackpathinfo = self._pathname_info(stackres)
453
- stackpathinfo['block'] = 'stacks'
468
+ stackpathinfo["block"] = "stacks"
454
469
  if not keepmember:
455
- stackpathinfo['member'] = None
456
- uqs['stackpath'] = [(self.namebuilder.pack_pathname(stackpathinfo) + '/' +
457
- self.basename(stackres)), ]
458
- uqs['stackfmt'] = [stackres.nativefmt, ]
470
+ stackpathinfo["member"] = None
471
+ uqs["stackpath"] = [
472
+ (
473
+ self.namebuilder.pack_pathname(stackpathinfo)
474
+ + "/"
475
+ + self.basename(stackres)
476
+ ),
477
+ ]
478
+ uqs["stackfmt"] = [
479
+ stackres.nativefmt,
480
+ ]
459
481
  return urlparse.urlencode(sorted(uqs.items()), doseq=True)
460
482
 
461
483
 
462
484
  # Activate the footprint's fasttrack on the resources collector
463
- fcollect = footprints.collectors.get(tag='provider')
464
- fcollect.fasttrack = ('namespace', )
485
+ fcollect = footprints.collectors.get(tag="provider")
486
+ fcollect.fasttrack = ("namespace",)
465
487
  del fcollect