Skip to content

Commit 2040a7c

Browse files
committed
Consistent naming
1 parent 2d62605 commit 2040a7c

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

metaflow/plugins/aws/batch/batch.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def create_job(
188188
host_volumes=None,
189189
efs_volumes=None,
190190
use_tmpfs=None,
191-
aws_tags=None,
191+
aws_batch_tags=None,
192192
cli_aws_batch_tags=None,
193193
tmpfs_tempdir=None,
194194
tmpfs_size=None,
@@ -344,8 +344,8 @@ def create_job(
344344
for tag in cli_aws_batch_tags:
345345
job.tag(tag['key'], tag['value'])
346346

347-
if aws_tags is not None:
348-
for tag in aws_tags:
347+
if aws_batch_tags is not None:
348+
for tag in aws_batch_tags:
349349
job.tag(tag['key'], tag['value'])
350350

351351
return job
@@ -417,7 +417,7 @@ def launch_job(
417417
host_volumes=host_volumes,
418418
efs_volumes=efs_volumes,
419419
use_tmpfs=use_tmpfs,
420-
aws_tags=aws_tags,
420+
aws_batch_tags=aws_tags,
421421
tmpfs_tempdir=tmpfs_tempdir,
422422
tmpfs_size=tmpfs_size,
423423
tmpfs_path=tmpfs_path,

metaflow/plugins/aws/step_functions/step_functions.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def __init__(
4848
event_logger,
4949
monitor,
5050
tags=None,
51-
aws_tags=None,
51+
aws_batch_tags=None,
5252
namespace=None,
5353
username=None,
5454
max_workers=None,
@@ -68,7 +68,7 @@ def __init__(
6868
self.event_logger = event_logger
6969
self.monitor = monitor
7070
self.tags = tags
71-
self.aws_tags = aws_tags
71+
self.aws_batch_tags = aws_batch_tags
7272
self.namespace = namespace
7373
self.username = username
7474
self.max_workers = max_workers
@@ -834,8 +834,8 @@ def _batch(self, node):
834834
swappiness=resources["swappiness"],
835835
efa=resources["efa"],
836836
use_tmpfs=resources["use_tmpfs"],
837-
aws_tags=resources["aws_tags"],
838-
cli_aws_batch_tags=self.aws_tags,
837+
aws_batch_tags=resources["aws_batch_tags"],
838+
cli_aws_batch_tags=self.aws_batch_tags,
839839
tmpfs_tempdir=resources["tmpfs_tempdir"],
840840
tmpfs_size=resources["tmpfs_size"],
841841
tmpfs_path=resources["tmpfs_path"],

metaflow/plugins/aws/step_functions/step_functions_cli.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ def step_functions(obj, name=None):
9999
"times to attach multiple tags.",
100100
)
101101
@click.option(
102-
"--aws-tags",
103-
"aws_tags",
102+
"--aws-batch-tags",
103+
"aws_batch_tags",
104104
multiple=True,
105105
default=None,
106106
help="AWS tags.")
@@ -150,7 +150,7 @@ def step_functions(obj, name=None):
150150
def create(
151151
obj,
152152
tags=None,
153-
aws_tags=None,
153+
aws_batch_tags=None,
154154
user_namespace=None,
155155
only_json=False,
156156
authorize=None,
@@ -204,7 +204,7 @@ def create(
204204
token,
205205
obj.state_machine_name,
206206
tags,
207-
aws_tags,
207+
aws_batch_tags,
208208
user_namespace,
209209
max_workers,
210210
workflow_timeout,
@@ -324,7 +324,7 @@ def make_flow(
324324
token,
325325
name,
326326
tags,
327-
aws_tags,
327+
aws_batch_tags,
328328
namespace,
329329
max_workers,
330330
workflow_timeout,
@@ -348,15 +348,15 @@ def make_flow(
348348
)[0]
349349

350350

351-
if aws_tags is not None:
352-
if not all(isinstance(item, str) for item in aws_tags):
351+
if aws_batch_tags is not None:
352+
if not all(isinstance(item, str) for item in aws_batch_tags):
353353
raise MetaflowException("AWS Step Functions --aws-tags all items in list must be strings")
354-
for item in aws_tags:
354+
for item in aws_batch_tags:
355355
if len(item.split('=')) != 2:
356356
raise MetaflowException("AWS Step Functions --aws-tags strings must be in format 'key=value'")
357357
aws_tags_list = [
358358
{'key': item.split('=')[0],
359-
'value': item.split('=')[1]} for item in aws_tags
359+
'value': item.split('=')[1]} for item in aws_batch_tags
360360
]
361361
for tag in aws_tags_list:
362362
validate_aws_tag(tag)
@@ -377,7 +377,7 @@ def make_flow(
377377
obj.event_logger,
378378
obj.monitor,
379379
tags=tags,
380-
aws_tags=aws_tags_list,
380+
aws_batch_tags=aws_tags_list,
381381
namespace=namespace,
382382
max_workers=max_workers,
383383
username=get_username(),

0 commit comments

Comments
 (0)