NREL-reV 0.8.7__py3-none-any.whl → 0.9.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 (43) hide show
  1. {NREL_reV-0.8.7.dist-info → NREL_reV-0.9.0.dist-info}/METADATA +13 -10
  2. {NREL_reV-0.8.7.dist-info → NREL_reV-0.9.0.dist-info}/RECORD +43 -43
  3. {NREL_reV-0.8.7.dist-info → NREL_reV-0.9.0.dist-info}/WHEEL +1 -1
  4. reV/SAM/SAM.py +217 -133
  5. reV/SAM/econ.py +18 -14
  6. reV/SAM/generation.py +611 -422
  7. reV/SAM/windbos.py +93 -79
  8. reV/bespoke/bespoke.py +681 -377
  9. reV/bespoke/cli_bespoke.py +2 -0
  10. reV/bespoke/place_turbines.py +187 -43
  11. reV/config/output_request.py +2 -1
  12. reV/config/project_points.py +218 -140
  13. reV/econ/econ.py +166 -114
  14. reV/econ/economies_of_scale.py +91 -45
  15. reV/generation/base.py +331 -184
  16. reV/generation/generation.py +326 -200
  17. reV/generation/output_attributes/lcoe_fcr_inputs.json +38 -3
  18. reV/handlers/__init__.py +0 -1
  19. reV/handlers/exclusions.py +16 -15
  20. reV/handlers/multi_year.py +57 -26
  21. reV/handlers/outputs.py +6 -5
  22. reV/handlers/transmission.py +44 -27
  23. reV/hybrids/hybrid_methods.py +30 -30
  24. reV/hybrids/hybrids.py +305 -189
  25. reV/nrwal/nrwal.py +262 -168
  26. reV/qa_qc/cli_qa_qc.py +14 -10
  27. reV/qa_qc/qa_qc.py +217 -119
  28. reV/qa_qc/summary.py +228 -146
  29. reV/rep_profiles/rep_profiles.py +349 -230
  30. reV/supply_curve/aggregation.py +349 -188
  31. reV/supply_curve/competitive_wind_farms.py +90 -48
  32. reV/supply_curve/exclusions.py +138 -85
  33. reV/supply_curve/extent.py +75 -50
  34. reV/supply_curve/points.py +735 -390
  35. reV/supply_curve/sc_aggregation.py +357 -248
  36. reV/supply_curve/supply_curve.py +604 -347
  37. reV/supply_curve/tech_mapping.py +144 -82
  38. reV/utilities/__init__.py +274 -16
  39. reV/utilities/pytest_utils.py +8 -4
  40. reV/version.py +1 -1
  41. {NREL_reV-0.8.7.dist-info → NREL_reV-0.9.0.dist-info}/LICENSE +0 -0
  42. {NREL_reV-0.8.7.dist-info → NREL_reV-0.9.0.dist-info}/entry_points.txt +0 -0
  43. {NREL_reV-0.8.7.dist-info → NREL_reV-0.9.0.dist-info}/top_level.txt +0 -0
reV/qa_qc/cli_qa_qc.py CHANGED
@@ -2,20 +2,24 @@
2
2
  """
3
3
  QA/QC CLI utility functions.
4
4
  """
5
- import click
6
5
  import logging
7
- import numpy as np
8
6
  import os
9
7
 
10
- from rex.utilities.cli_dtypes import STR, STRLIST, INT
8
+ import click
9
+ import numpy as np
10
+ from gaps.cli import CLICommandFromFunction, as_click_command
11
+ from rex.utilities.cli_dtypes import INT, STR, STRLIST
11
12
  from rex.utilities.loggers import init_logger
12
- from gaps.cli import as_click_command, CLICommandFromFunction
13
13
 
14
- from reV.utilities import ModuleName
15
- from reV.qa_qc.qa_qc import QaQc, QaQcModule
16
- from reV.qa_qc.summary import (SummarizeH5, SummarizeSupplyCurve,
17
- SupplyCurvePlot, ExclusionsMask)
18
14
  from reV import __version__
15
+ from reV.qa_qc.qa_qc import QaQc, QaQcModule
16
+ from reV.qa_qc.summary import (
17
+ ExclusionsMask,
18
+ SummarizeH5,
19
+ SummarizeSupplyCurve,
20
+ SupplyCurvePlot,
21
+ )
22
+ from reV.utilities import ModuleName, SupplyCurveField
19
23
 
20
24
  logger = logging.getLogger(__name__)
21
25
 
@@ -190,8 +194,8 @@ def supply_curve_table(ctx, sc_table, columns):
190
194
  show_default=True,
191
195
  help=(" plot_type of plot to create 'plot' or 'plotly', by "
192
196
  "default 'plot'"))
193
- @click.option('--lcoe', '-lcoe', type=STR, default='mean_lcoe',
194
- help="LCOE value to plot, by default 'mean_lcoe'")
197
+ @click.option('--lcoe', '-lcoe', type=STR, default=SupplyCurveField.MEAN_LCOE,
198
+ help="LCOE value to plot, by default %(default)s")
195
199
  @click.pass_context
196
200
  def supply_curve_plot(ctx, sc_table, plot_type, lcoe):
197
201
  """
reV/qa_qc/qa_qc.py CHANGED
@@ -2,20 +2,26 @@
2
2
  """
3
3
  reV quality assurance and control classes
4
4
  """
5
+
5
6
  import logging
6
- import numpy as np
7
7
  import os
8
- import pandas as pd
9
8
  from warnings import warn
10
9
 
11
- from reV.qa_qc.summary import (SummarizeH5, SummarizeSupplyCurve, SummaryPlots,
12
- SupplyCurvePlot, ExclusionsMask)
10
+ import numpy as np
11
+ import pandas as pd
12
+ from gaps.status import Status
13
+
14
+ from reV.qa_qc.summary import (
15
+ ExclusionsMask,
16
+ SummarizeH5,
17
+ SummarizeSupplyCurve,
18
+ SummaryPlots,
19
+ SupplyCurvePlot,
20
+ )
13
21
  from reV.supply_curve.exclusions import ExclusionMaskFromDict
14
- from reV.utilities import log_versions, ModuleName
22
+ from reV.utilities import ModuleName, SupplyCurveField, log_versions
15
23
  from reV.utilities.exceptions import PipelineError
16
24
 
17
- from gaps.status import Status
18
-
19
25
  logger = logging.getLogger(__name__)
20
26
 
21
27
 
@@ -23,6 +29,7 @@ class QaQc:
23
29
  """
24
30
  reV QA/QC
25
31
  """
32
+
26
33
  def __init__(self, out_dir):
27
34
  """
28
35
  Parameters
@@ -31,7 +38,7 @@ class QaQc:
31
38
  Directory path to save summary data and plots too
32
39
  """
33
40
  log_versions(logger)
34
- logger.info('QA/QC results to be saved to: {}'.format(out_dir))
41
+ logger.info("QA/QC results to be saved to: {}".format(out_dir))
35
42
  if not os.path.exists(out_dir):
36
43
  os.makedirs(out_dir, exist_ok=True)
37
44
 
@@ -49,8 +56,9 @@ class QaQc:
49
56
  return self._out_dir
50
57
 
51
58
  @staticmethod
52
- def _scatter_plot(summary_csv, out_root, plot_type='plotly',
53
- cmap='viridis', **kwargs):
59
+ def _scatter_plot(
60
+ summary_csv, out_root, plot_type="plotly", cmap="viridis", **kwargs
61
+ ):
54
62
  """
55
63
  Create scatter plot for all summary stats in summary table and save to
56
64
  out_dir
@@ -68,16 +76,19 @@ class QaQc:
68
76
  kwargs : dict
69
77
  Additional plotting kwargs
70
78
  """
71
- out_dir = os.path.join(out_root,
72
- os.path.basename(summary_csv).rstrip('.csv'))
79
+ out_dir = os.path.join(
80
+ out_root, os.path.basename(summary_csv).rstrip(".csv")
81
+ )
73
82
  if not os.path.exists(out_dir):
74
83
  os.makedirs(out_dir, exist_ok=True)
75
84
 
76
- SummaryPlots.scatter_all(summary_csv, out_dir, plot_type=plot_type,
77
- cmap=cmap, **kwargs)
85
+ SummaryPlots.scatter_all(
86
+ summary_csv, out_dir, plot_type=plot_type, cmap=cmap, **kwargs
87
+ )
78
88
 
79
- def create_scatter_plots(self, plot_type='plotly', cmap='viridis',
80
- **kwargs):
89
+ def create_scatter_plots(
90
+ self, plot_type="plotly", cmap="viridis", **kwargs
91
+ ):
81
92
  """
82
93
  Create scatter plot for all compatible summary .csv files
83
94
 
@@ -91,18 +102,30 @@ class QaQc:
91
102
  Additional plotting kwargs
92
103
  """
93
104
  for file in os.listdir(self.out_dir):
94
- if file.endswith('.csv'):
105
+ if file.endswith(".csv"):
95
106
  summary_csv = os.path.join(self.out_dir, file)
96
107
  summary = pd.read_csv(summary_csv)
97
- if ('gid' in summary and 'latitude' in summary
98
- and 'longitude' in summary):
108
+ has_right_cols = ("gid" in summary
109
+ and SupplyCurveField.LATITUDE in summary
110
+ and SupplyCurveField.LONGITUDE in summary)
111
+ if has_right_cols:
99
112
  self._scatter_plot(summary_csv, self.out_dir,
100
113
  plot_type=plot_type, cmap=cmap,
101
114
  **kwargs)
102
115
 
103
116
  @classmethod
104
- def h5(cls, h5_file, out_dir, dsets=None, group=None, process_size=None,
105
- max_workers=None, plot_type='plotly', cmap='viridis', **kwargs):
117
+ def h5(
118
+ cls,
119
+ h5_file,
120
+ out_dir,
121
+ dsets=None,
122
+ group=None,
123
+ process_size=None,
124
+ max_workers=None,
125
+ plot_type="plotly",
126
+ cmap="viridis",
127
+ **kwargs,
128
+ ):
106
129
  """
107
130
  Run QA/QC by computing summary stats from dsets in h5_file and
108
131
  plotting scatters plots of compatible summary stats
@@ -131,22 +154,35 @@ class QaQc:
131
154
  """
132
155
  try:
133
156
  qa_qc = cls(out_dir)
134
- SummarizeH5.run(h5_file, out_dir, group=group,
135
- dsets=dsets, process_size=process_size,
136
- max_workers=max_workers)
137
- qa_qc.create_scatter_plots(plot_type=plot_type, cmap=cmap,
138
- **kwargs)
157
+ SummarizeH5.run(
158
+ h5_file,
159
+ out_dir,
160
+ group=group,
161
+ dsets=dsets,
162
+ process_size=process_size,
163
+ max_workers=max_workers,
164
+ )
165
+ qa_qc.create_scatter_plots(
166
+ plot_type=plot_type, cmap=cmap, **kwargs
167
+ )
139
168
  except Exception as e:
140
- logger.exception('QAQC failed on file: {}. Received exception:\n{}'
141
- .format(os.path.basename(h5_file), e))
169
+ logger.exception(
170
+ "QAQC failed on file: {}. Received exception:\n{}".format(
171
+ os.path.basename(h5_file), e
172
+ )
173
+ )
142
174
  raise e
143
175
  else:
144
- logger.info('Finished QAQC on file: {} output directory: {}'
145
- .format(os.path.basename(h5_file), out_dir))
176
+ logger.info(
177
+ "Finished QAQC on file: {} output directory: {}".format(
178
+ os.path.basename(h5_file), out_dir
179
+ )
180
+ )
146
181
 
147
182
  @classmethod
148
- def supply_curve(cls, sc_table, out_dir, columns=None, lcoe='mean_lcoe',
149
- plot_type='plotly', cmap='viridis', sc_plot_kwargs=None,
183
+ def supply_curve(cls, sc_table, out_dir, columns=None,
184
+ lcoe=SupplyCurveField.MEAN_LCOE, plot_type='plotly',
185
+ cmap='viridis', sc_plot_kwargs=None,
150
186
  scatter_plot_kwargs=None):
151
187
  """
152
188
  Plot supply curve
@@ -161,7 +197,7 @@ class QaQc:
161
197
  Column(s) to summarize, if None summarize all numeric columns,
162
198
  by default None
163
199
  lcoe : str, optional
164
- LCOE value to plot, by default 'mean_lcoe'
200
+ LCOE value to plot, by default :obj:`SupplyCurveField.MEAN_LCOE`
165
201
  plot_type : str, optional
166
202
  plot_type of plot to create 'plot' or 'plotly', by default 'plotly'
167
203
  cmap : str, optional
@@ -180,22 +216,48 @@ class QaQc:
180
216
  try:
181
217
  qa_qc = cls(out_dir)
182
218
  SummarizeSupplyCurve.run(sc_table, out_dir, columns=columns)
183
- SupplyCurvePlot.plot(sc_table, out_dir, plot_type=plot_type,
184
- lcoe=lcoe, **sc_plot_kwargs)
185
- qa_qc._scatter_plot(sc_table, out_dir, plot_type=plot_type,
186
- cmap=cmap, **scatter_plot_kwargs)
219
+ SupplyCurvePlot.plot(
220
+ sc_table,
221
+ out_dir,
222
+ plot_type=plot_type,
223
+ lcoe=lcoe,
224
+ **sc_plot_kwargs,
225
+ )
226
+ qa_qc._scatter_plot(
227
+ sc_table,
228
+ out_dir,
229
+ plot_type=plot_type,
230
+ cmap=cmap,
231
+ **scatter_plot_kwargs,
232
+ )
187
233
  except Exception as e:
188
- logger.exception('QAQC failed on file: {}. Received exception:\n{}'
189
- .format(os.path.basename(sc_table), e))
234
+ logger.exception(
235
+ "QAQC failed on file: {}. Received exception:\n{}".format(
236
+ os.path.basename(sc_table), e
237
+ )
238
+ )
190
239
  raise e
191
240
  else:
192
- logger.info('Finished QAQC on file: {} output directory: {}'
193
- .format(os.path.basename(sc_table), out_dir))
241
+ logger.info(
242
+ "Finished QAQC on file: {} output directory: {}".format(
243
+ os.path.basename(sc_table), out_dir
244
+ )
245
+ )
194
246
 
195
247
  @classmethod
196
- def exclusions_mask(cls, excl_h5, out_dir, layers_dict=None, min_area=None,
197
- kernel='queen', hsds=False, plot_type='plotly',
198
- cmap='viridis', plot_step=100, **kwargs):
248
+ def exclusions_mask(
249
+ cls,
250
+ excl_h5,
251
+ out_dir,
252
+ layers_dict=None,
253
+ min_area=None,
254
+ kernel="queen",
255
+ hsds=False,
256
+ plot_type="plotly",
257
+ cmap="viridis",
258
+ plot_step=100,
259
+ **kwargs,
260
+ ):
199
261
  """
200
262
  Create inclusion mask from given layers dictionary, dump to disk and
201
263
  plot
@@ -224,26 +286,40 @@ class QaQc:
224
286
  """
225
287
  try:
226
288
  cls(out_dir)
227
- excl_mask = ExclusionMaskFromDict.run(excl_h5,
228
- layers_dict=layers_dict,
229
- min_area=min_area,
230
- kernel=kernel,
231
- hsds=hsds)
232
- excl_mask = np.round(excl_mask * 100).astype('uint8')
233
-
234
- out_file = os.path.basename(excl_h5).replace('.h5', '_mask.npy')
289
+ excl_mask = ExclusionMaskFromDict.run(
290
+ excl_h5,
291
+ layers_dict=layers_dict,
292
+ min_area=min_area,
293
+ kernel=kernel,
294
+ hsds=hsds,
295
+ )
296
+ excl_mask = np.round(excl_mask * 100).astype("uint8")
297
+
298
+ out_file = os.path.basename(excl_h5).replace(".h5", "_mask.npy")
235
299
  out_file = os.path.join(out_dir, out_file)
236
300
  np.save(out_file, excl_mask)
237
301
 
238
- ExclusionsMask.plot(excl_mask, out_dir, plot_type=plot_type,
239
- cmap=cmap, plot_step=plot_step, **kwargs)
302
+ ExclusionsMask.plot(
303
+ excl_mask,
304
+ out_dir,
305
+ plot_type=plot_type,
306
+ cmap=cmap,
307
+ plot_step=plot_step,
308
+ **kwargs,
309
+ )
240
310
  except Exception as e:
241
- logger.exception('QAQC failed on file: {}. Received exception:\n{}'
242
- .format(os.path.basename(excl_h5), e))
311
+ logger.exception(
312
+ "QAQC failed on file: {}. Received exception:\n{}".format(
313
+ os.path.basename(excl_h5), e
314
+ )
315
+ )
243
316
  raise e
244
317
  else:
245
- logger.info('Finished QAQC on file: {} output directory: {}'
246
- .format(os.path.basename(excl_h5), out_dir))
318
+ logger.info(
319
+ "Finished QAQC on file: {} output directory: {}".format(
320
+ os.path.basename(excl_h5), out_dir
321
+ )
322
+ )
247
323
 
248
324
 
249
325
  class QaQcModule:
@@ -257,16 +333,19 @@ class QaQcModule:
257
333
  Dictionary with pre-extracted config input group.
258
334
  """
259
335
  if not isinstance(config, dict):
260
- raise TypeError('Config input must be a dict but received: {}'
261
- .format(type(config)))
336
+ raise TypeError(
337
+ "Config input must be a dict but received: {}".format(
338
+ type(config)
339
+ )
340
+ )
262
341
 
263
342
  self._name = module_name
264
343
  self._config = config
265
344
  self._out_root = out_root
266
- self._default_plot_type = 'plotly'
267
- self._default_cmap = 'viridis'
345
+ self._default_plot_type = "plotly"
346
+ self._default_cmap = "viridis"
268
347
  self._default_plot_step = 100
269
- self._default_lcoe = 'mean_lcoe'
348
+ self._default_lcoe = SupplyCurveField.MEAN_LCOE
270
349
  self._default_area_filter_kernel = 'queen'
271
350
 
272
351
  @property
@@ -279,20 +358,23 @@ class QaQcModule:
279
358
  One or more filepaths output by current module being QA'd
280
359
  """
281
360
 
282
- fpath = self._config['fpath']
361
+ fpath = self._config["fpath"]
283
362
 
284
- if fpath == 'PIPELINE':
363
+ if fpath == "PIPELINE":
285
364
  target_modules = [self._name]
286
365
  for target_module in target_modules:
287
366
  fpath = Status.parse_step_status(self._out_root, target_module)
288
367
  if fpath:
289
368
  break
290
369
  else:
291
- raise PipelineError('Could not parse fpath from previous '
292
- 'pipeline jobs.')
370
+ raise PipelineError(
371
+ "Could not parse fpath from previous pipeline jobs."
372
+ )
293
373
  fpath = fpath[0]
294
- logger.info('QA/QC using the following '
295
- 'pipeline input for fpath: {}'.format(fpath))
374
+ logger.info(
375
+ "QA/QC using the following "
376
+ "pipeline input for fpath: {}".format(fpath)
377
+ )
296
378
 
297
379
  return fpath
298
380
 
@@ -301,141 +383,157 @@ class QaQcModule:
301
383
  """
302
384
  QA/QC sub directory for this module's outputs
303
385
  """
304
- return self._config.get('sub_dir', None)
386
+ return self._config.get("sub_dir", None)
305
387
 
306
388
  @property
307
389
  def plot_type(self):
308
390
  """Get the QA/QC plot type: either 'plot' or 'plotly'"""
309
- return self._config.get('plot_type', self._default_plot_type)
391
+ return self._config.get("plot_type", self._default_plot_type)
310
392
 
311
393
  @property
312
394
  def dsets(self):
313
395
  """Get the reV_h5 dsets to QA/QC"""
314
- return self._config.get('dsets', None)
396
+ return self._config.get("dsets", None)
315
397
 
316
398
  @property
317
399
  def group(self):
318
400
  """Get the reV_h5 group to QA/QC"""
319
- return self._config.get('group', None)
401
+ return self._config.get("group", None)
320
402
 
321
403
  @property
322
404
  def process_size(self):
323
405
  """Get the reV_h5 process_size for QA/QC"""
324
- return self._config.get('process_size', None)
406
+ return self._config.get("process_size", None)
325
407
 
326
408
  @property
327
409
  def cmap(self):
328
410
  """Get the QA/QC plot colormap"""
329
- return self._config.get('cmap', self._default_cmap)
411
+ return self._config.get("cmap", self._default_cmap)
330
412
 
331
413
  @property
332
414
  def plot_step(self):
333
415
  """Get the QA/QC step between exclusion mask points to plot"""
334
- return self._config.get('cmap', self._default_plot_step)
416
+ return self._config.get("cmap", self._default_plot_step)
335
417
 
336
418
  @property
337
419
  def columns(self):
338
420
  """Get the supply_curve columns to QA/QC"""
339
- return self._config.get('columns', None)
421
+ return self._config.get("columns", None)
340
422
 
341
423
  @property
342
424
  def lcoe(self):
343
425
  """Get the supply_curve lcoe column to plot"""
344
- return self._config.get('lcoe', self._default_lcoe)
426
+ return self._config.get("lcoe", self._default_lcoe)
345
427
 
346
428
  @property
347
429
  def excl_fpath(self):
348
430
  """Get the source exclusions filepath"""
349
- excl_fpath = self._config.get('excl_fpath', 'PIPELINE')
431
+ excl_fpath = self._config.get("excl_fpath", "PIPELINE")
350
432
 
351
- if excl_fpath == 'PIPELINE':
433
+ if excl_fpath == "PIPELINE":
352
434
  target_module = ModuleName.SUPPLY_CURVE_AGGREGATION
353
- excl_fpath = Status.parse_step_status(self._out_root,
354
- target_module,
355
- key='excl_fpath')
435
+ excl_fpath = Status.parse_step_status(
436
+ self._out_root, target_module, key="excl_fpath"
437
+ )
356
438
  if not excl_fpath:
357
439
  excl_fpath = None
358
- msg = ('Could not parse excl_fpath from previous '
359
- 'pipeline jobs, defaulting to: {}'.format(excl_fpath))
440
+ msg = (
441
+ "Could not parse excl_fpath from previous "
442
+ "pipeline jobs, defaulting to: {}".format(excl_fpath)
443
+ )
360
444
  logger.warning(msg)
361
445
  warn(msg)
362
446
  else:
363
447
  excl_fpath = excl_fpath[0]
364
- logger.info('QA/QC using the following '
365
- 'pipeline input for excl_fpath: {}'
366
- .format(excl_fpath))
448
+ logger.info(
449
+ "QA/QC using the following "
450
+ "pipeline input for excl_fpath: {}".format(excl_fpath)
451
+ )
367
452
 
368
453
  return excl_fpath
369
454
 
370
455
  @property
371
456
  def excl_dict(self):
372
457
  """Get the exclusions dictionary"""
373
- excl_dict = self._config.get('excl_dict', 'PIPELINE')
458
+ excl_dict = self._config.get("excl_dict", "PIPELINE")
374
459
 
375
- if excl_dict == 'PIPELINE':
460
+ if excl_dict == "PIPELINE":
376
461
  target_module = ModuleName.SUPPLY_CURVE_AGGREGATION
377
- excl_dict = Status.parse_step_status(self._out_root, target_module,
378
- key='excl_dict')
462
+ excl_dict = Status.parse_step_status(
463
+ self._out_root, target_module, key="excl_dict"
464
+ )
379
465
  if not excl_dict:
380
466
  excl_dict = None
381
- msg = ('Could not parse excl_dict from previous '
382
- 'pipeline jobs, defaulting to: {}'.format(excl_dict))
467
+ msg = (
468
+ "Could not parse excl_dict from previous "
469
+ "pipeline jobs, defaulting to: {}".format(excl_dict)
470
+ )
383
471
  logger.warning(msg)
384
472
  warn(msg)
385
473
  else:
386
474
  excl_dict = excl_dict[0]
387
- logger.info('QA/QC using the following '
388
- 'pipeline input for excl_dict: {}'
389
- .format(excl_dict))
475
+ logger.info(
476
+ "QA/QC using the following "
477
+ "pipeline input for excl_dict: {}".format(excl_dict)
478
+ )
390
479
 
391
480
  return excl_dict
392
481
 
393
482
  @property
394
483
  def area_filter_kernel(self):
395
484
  """Get the minimum area filter kernel name ('queen' or 'rook')."""
396
- area_filter_kernel = self._config.get('area_filter_kernel', 'PIPELINE')
485
+ area_filter_kernel = self._config.get("area_filter_kernel", "PIPELINE")
397
486
 
398
- if area_filter_kernel == 'PIPELINE':
487
+ if area_filter_kernel == "PIPELINE":
399
488
  target_module = ModuleName.SUPPLY_CURVE_AGGREGATION
400
- key = 'area_filter_kernel'
401
- area_filter_kernel = Status.parse_step_status(self._out_root,
402
- target_module,
403
- key=key)
489
+ key = "area_filter_kernel"
490
+ area_filter_kernel = Status.parse_step_status(
491
+ self._out_root, target_module, key=key
492
+ )
404
493
  if not area_filter_kernel:
405
494
  area_filter_kernel = self._default_area_filter_kernel
406
- msg = ('Could not parse area_filter_kernel from previous '
407
- 'pipeline jobs, defaulting to: {}'
408
- .format(area_filter_kernel))
495
+ msg = (
496
+ "Could not parse area_filter_kernel from previous "
497
+ "pipeline jobs, defaulting to: {}".format(
498
+ area_filter_kernel
499
+ )
500
+ )
409
501
  logger.warning(msg)
410
502
  warn(msg)
411
503
  else:
412
504
  area_filter_kernel = area_filter_kernel[0]
413
- logger.info('QA/QC using the following '
414
- 'pipeline input for area_filter_kernel: {}'
415
- .format(area_filter_kernel))
505
+ logger.info(
506
+ "QA/QC using the following "
507
+ "pipeline input for area_filter_kernel: {}".format(
508
+ area_filter_kernel
509
+ )
510
+ )
416
511
 
417
512
  return area_filter_kernel
418
513
 
419
514
  @property
420
515
  def min_area(self):
421
516
  """Get the minimum area filter minimum area in km2."""
422
- min_area = self._config.get('min_area', 'PIPELINE')
517
+ min_area = self._config.get("min_area", "PIPELINE")
423
518
 
424
- if min_area == 'PIPELINE':
519
+ if min_area == "PIPELINE":
425
520
  target_module = ModuleName.SUPPLY_CURVE_AGGREGATION
426
- min_area = Status.parse_step_status(self._out_root, target_module,
427
- key='min_area')
521
+ min_area = Status.parse_step_status(
522
+ self._out_root, target_module, key="min_area"
523
+ )
428
524
  if not min_area:
429
525
  min_area = None
430
- msg = ('Could not parse min_area from previous '
431
- 'pipeline jobs, defaulting to: {}'
432
- .format(min_area))
526
+ msg = (
527
+ "Could not parse min_area from previous "
528
+ "pipeline jobs, defaulting to: {}".format(min_area)
529
+ )
433
530
  logger.warning(msg)
434
531
  warn(msg)
435
532
  else:
436
533
  min_area = min_area[0]
437
- logger.info('QA/QC using the following '
438
- 'pipeline input for min_area: {}'
439
- .format(min_area))
534
+ logger.info(
535
+ "QA/QC using the following "
536
+ "pipeline input for min_area: {}".format(min_area)
537
+ )
440
538
 
441
539
  return min_area