Skip to content
This repository was archived by the owner on Jun 13, 2024. It is now read-only.

Commit 285e95d

Browse files
authored
Allow dataset lists (#26)
* Allow dataset to be a list
1 parent b8f0f00 commit 285e95d

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393

9494
# General information about the project.
9595
project = "etos_client"
96-
copyright = "2020, Axis Communications AB"
96+
copyright = "Axis Communications AB"
9797

9898
# The version info for the project you're documenting, acts as replacement for
9999
# |version| and |release|, also used in various other places throughout the

src/etos_client/__main__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright 2020-2021 Axis Communications AB.
2+
# Copyright 2020-2022 Axis Communications AB.
33
#
44
# For a full list of individual contributors, please see the commit history.
55
#
@@ -119,7 +119,7 @@ def parse_args(args):
119119
)
120120
parser.add_argument(
121121
"--dataset",
122-
default="{}",
122+
action="append",
123123
help=(
124124
"Additional dataset information to the environment provider. "
125125
"Check with your provider which information can be supplied."
@@ -287,7 +287,7 @@ def main(args): # pylint:disable=too-many-statements
287287
etos.config.set(key, value)
288288

289289
etos.config.set("artifact_identifier", args.identity)
290-
etos.config.set("dataset", json.loads(args.dataset))
290+
etos.config.set("dataset", [json.loads(dataset) for dataset in args.dataset] or {})
291291

292292
with info(text="Checking connectivity to ETOS", spinner="dots") as spinner:
293293
spinner.info(f"Running in cluster: {args.cluster!r}")

src/etos_client/client.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2020-2021 Axis Communications AB.
1+
# Copyright 2020-2022 Axis Communications AB.
22
#
33
# For a full list of individual contributors, please see the commit history.
44
#
@@ -74,8 +74,11 @@ def is_packageurl(string):
7474
@property
7575
def data(self):
7676
"""ETOS request data."""
77+
dataset = self.etos.config.get("dataset")
78+
if len(dataset) == 1:
79+
dataset = dataset[0]
7780
data = {
78-
"dataset": self.etos.config.get("dataset"),
81+
"dataset": dataset,
7982
"iut_provider": self.etos.config.get("iut_provider"),
8083
"execution_space_provider": self.etos.config.get(
8184
"execution_space_provider"

0 commit comments

Comments
 (0)