artefacts-cli 0.6.19__py3-none-any.whl → 0.7.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.
- artefacts/__init__.py +4 -0
- artefacts/cli/app.py +16 -5
- artefacts/cli/utils.py +17 -0
- artefacts/cli/version.py +9 -4
- {artefacts_cli-0.6.19.dist-info → artefacts_cli-0.7.0.dist-info}/METADATA +1 -1
- {artefacts_cli-0.6.19.dist-info → artefacts_cli-0.7.0.dist-info}/RECORD +9 -8
- {artefacts_cli-0.6.19.dist-info → artefacts_cli-0.7.0.dist-info}/WHEEL +0 -0
- {artefacts_cli-0.6.19.dist-info → artefacts_cli-0.7.0.dist-info}/entry_points.txt +0 -0
- {artefacts_cli-0.6.19.dist-info → artefacts_cli-0.7.0.dist-info}/top_level.txt +0 -0
artefacts/__init__.py
ADDED
artefacts/cli/app.py
CHANGED
@@ -20,7 +20,7 @@ from gitignore_parser import parse_gitignore
|
|
20
20
|
from artefacts.cli import init_job, generate_scenarios, AuthenticationError, __version__
|
21
21
|
from artefacts.cli import app_containers as containers
|
22
22
|
from artefacts.cli.constants import DEPRECATED_FRAMEWORKS, SUPPORTED_FRAMEWORKS
|
23
|
-
from artefacts.cli.utils import
|
23
|
+
from artefacts.cli.utils import add_output_from_default, config_validation, read_config
|
24
24
|
|
25
25
|
HOME = os.path.expanduser("~")
|
26
26
|
CONFIG_DIR = f"{HOME}/.artefacts"
|
@@ -247,10 +247,10 @@ def hello(project_name):
|
|
247
247
|
help="[Experimental] Run the job using the image name passed here. Only used when running with --in-container set.",
|
248
248
|
)
|
249
249
|
@click.option(
|
250
|
-
"--rebuild
|
250
|
+
"--no-rebuild",
|
251
251
|
is_flag=True,
|
252
252
|
default=False,
|
253
|
-
help="[Experimental]
|
253
|
+
help="[Experimental] Override the default behaviour to always rebuild the container image (as we assume incremental testing).",
|
254
254
|
)
|
255
255
|
@click.option(
|
256
256
|
"--with-gui",
|
@@ -272,7 +272,7 @@ def run(
|
|
272
272
|
skip_validation=False,
|
273
273
|
in_container: bool = False,
|
274
274
|
with_image: str = "artefacts",
|
275
|
-
|
275
|
+
no_rebuild: bool = False,
|
276
276
|
with_gui: bool = False,
|
277
277
|
):
|
278
278
|
"""
|
@@ -282,10 +282,18 @@ def run(
|
|
282
282
|
* Inside a packaged container when using the --in-container option.
|
283
283
|
"""
|
284
284
|
if in_container:
|
285
|
-
|
285
|
+
image_exist = ctx.invoke(containers.check, name=with_image)
|
286
|
+
if not no_rebuild or not image_exist:
|
287
|
+
if image_exist:
|
288
|
+
announce = "Rebuilding container image to prepare the run..."
|
289
|
+
else:
|
290
|
+
announce = "Building container image to prepare the run..."
|
291
|
+
click.echo(announce)
|
286
292
|
ctx.invoke(
|
287
293
|
containers.build, path=".", dockerfile="Dockerfile", name=with_image
|
288
294
|
)
|
295
|
+
click.echo("Build complete.\n")
|
296
|
+
click.echo("Starting the container run...")
|
289
297
|
return ctx.invoke(
|
290
298
|
containers.run,
|
291
299
|
image=with_image,
|
@@ -419,6 +427,9 @@ def run(
|
|
419
427
|
if type(run.params.get("metrics", [])) is str:
|
420
428
|
run.log_metrics()
|
421
429
|
|
430
|
+
# Add for upload any default output generated by the run
|
431
|
+
add_output_from_default(run)
|
432
|
+
|
422
433
|
run.stop()
|
423
434
|
warpjob.log_tests_result(job_success)
|
424
435
|
click.echo("Done")
|
artefacts/cli/utils.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import os
|
2
|
+
from pathlib import Path
|
2
3
|
import subprocess
|
3
4
|
import sys
|
4
5
|
from typing import Union
|
@@ -6,6 +7,8 @@ from typing import Union
|
|
6
7
|
import click
|
7
8
|
|
8
9
|
import artefacts_copava as copava
|
10
|
+
from artefacts import ARTEFACTS_DEFAULT_OUTPUT_DIR
|
11
|
+
from artefacts.cli import WarpRun
|
9
12
|
|
10
13
|
|
11
14
|
def run_and_save_logs(
|
@@ -97,3 +100,17 @@ def pretty_print_config_error(
|
|
97
100
|
# Must not happen, so broad definition, but we want to know fast.
|
98
101
|
raise Exception(f"Unacceptable data type for config error formatting: {errors}")
|
99
102
|
return output
|
103
|
+
|
104
|
+
|
105
|
+
def add_output_from_default(run: WarpRun) -> None:
|
106
|
+
"""
|
107
|
+
Add every file found under ARTEFACTS_DEFAULT_OUTPUT_DIR to the set of files
|
108
|
+
uploaded to Artefacts for the run argument.
|
109
|
+
|
110
|
+
The default folder is created either directly, or more generally by Artefacts
|
111
|
+
toolkit libraries.
|
112
|
+
"""
|
113
|
+
if ARTEFACTS_DEFAULT_OUTPUT_DIR.exists() and ARTEFACTS_DEFAULT_OUTPUT_DIR.is_dir():
|
114
|
+
for root, dirs, files in os.walk(ARTEFACTS_DEFAULT_OUTPUT_DIR):
|
115
|
+
for file in files:
|
116
|
+
run.log_artifacts(Path(root) / Path(file))
|
artefacts/cli/version.py
CHANGED
@@ -1,8 +1,13 @@
|
|
1
|
-
# file generated by
|
1
|
+
# file generated by setuptools-scm
|
2
2
|
# don't change, don't track in version control
|
3
|
+
|
4
|
+
__all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
|
5
|
+
|
3
6
|
TYPE_CHECKING = False
|
4
7
|
if TYPE_CHECKING:
|
5
|
-
from typing import Tuple
|
8
|
+
from typing import Tuple
|
9
|
+
from typing import Union
|
10
|
+
|
6
11
|
VERSION_TUPLE = Tuple[Union[int, str], ...]
|
7
12
|
else:
|
8
13
|
VERSION_TUPLE = object
|
@@ -12,5 +17,5 @@ __version__: str
|
|
12
17
|
__version_tuple__: VERSION_TUPLE
|
13
18
|
version_tuple: VERSION_TUPLE
|
14
19
|
|
15
|
-
__version__ = version = '0.
|
16
|
-
__version_tuple__ = version_tuple = (0,
|
20
|
+
__version__ = version = '0.7.0'
|
21
|
+
__version_tuple__ = version_tuple = (0, 7, 0)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: artefacts_cli
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.7.0
|
4
4
|
Author-email: FD <fabian@artefacts.com>, AGC <alejandro@artefacts.com>, TN <tomo@artefacts.com>, EP <eric@artefacts.com>
|
5
5
|
Project-URL: Homepage, https://github.com/art-e-fact/artefacts-client
|
6
6
|
Project-URL: Bug Tracker, https://github.com/art-e-fact/artefacts-client/issues
|
@@ -1,5 +1,6 @@
|
|
1
|
+
artefacts/__init__.py,sha256=VLmogtpRQeJjQjAORV8ClSJ5qF-57Hxx3apvgy9H1zk,76
|
1
2
|
artefacts/cli/__init__.py,sha256=pt8OK66hMeQUxT9iLcvzYIIjFGrPS63ecWo8hS0T2qQ,11980
|
2
|
-
artefacts/cli/app.py,sha256=
|
3
|
+
artefacts/cli/app.py,sha256=tEknMMi7WhAPnq8NlGgLuLqqoCDWssZqs1lB3eNlVg4,22571
|
3
4
|
artefacts/cli/app_containers.py,sha256=dsyzN8UzGNwxkhV8BsFK7Sz9EOL6Se3YpeiUgzC2qic,3099
|
4
5
|
artefacts/cli/bagparser.py,sha256=FE_QaztC9pg4hQzTjGSdyve6mzZbHJbyqa3wqvZSbxE,3702
|
5
6
|
artefacts/cli/constants.py,sha256=bvsVDwqkAc49IZN7j6k6IL6EG87bECHd_VINtKJqbv8,320
|
@@ -9,15 +10,15 @@ artefacts/cli/other.py,sha256=7NvzlspvG0zF7sryR-QznwdLupXLln1BKWxHB9VuEcc,1160
|
|
9
10
|
artefacts/cli/parameters.py,sha256=msf2aG-tmw0ahxwrPpB2W6KqdMj5A-nw9DPG9flkHTg,788
|
10
11
|
artefacts/cli/ros1.py,sha256=rKepZckAuy5O_qraF2CW5GiTmTZHar7LRD4pvESy6T0,9622
|
11
12
|
artefacts/cli/ros2.py,sha256=9Ax_WQIOV_cohKz3H1eo1LnWiahiaqxO8r99doMmhEc,4466
|
12
|
-
artefacts/cli/utils.py,sha256=
|
13
|
+
artefacts/cli/utils.py,sha256=GJM2QdF_ewzPWr8NzO5BbrhyZdSSk9DNX12Nbwc4bnI,3814
|
13
14
|
artefacts/cli/utils_ros.py,sha256=3EFoMrzBdlhLc-wAL3mmS5sSw_pACkurYhssKHqYJsI,2089
|
14
|
-
artefacts/cli/version.py,sha256=
|
15
|
+
artefacts/cli/version.py,sha256=itvIHlqPKoO_13qf_yPD2pmcp0U4z1s19vvBGZM927Q,511
|
15
16
|
artefacts/cli/containers/__init__.py,sha256=K0efkJXNCqXH-qYBqhCE_8zVUCHbVmeuKH-y_fE8s4M,2254
|
16
17
|
artefacts/cli/containers/docker.py,sha256=fsGTzpj7Sj7ykCBxzaYlIt_so1yfWJ2j6ktxsWjvdvY,4073
|
17
18
|
artefacts/cli/containers/utils.py,sha256=bILX0uvazUJq7hoqKk4ztRzI_ZerYs04XQdKdx1ltjk,2002
|
18
19
|
artefacts/wrappers/artefacts_ros1_meta.launch,sha256=9tN7_0xLH8jW27KYFerhF3NuWDx2dED3ks_qoGVZAPw,1412
|
19
|
-
artefacts_cli-0.
|
20
|
-
artefacts_cli-0.
|
21
|
-
artefacts_cli-0.
|
22
|
-
artefacts_cli-0.
|
23
|
-
artefacts_cli-0.
|
20
|
+
artefacts_cli-0.7.0.dist-info/METADATA,sha256=bYCIMBdVBOLHHW38dmsUqXj-hoFczntRhszgykDm_eM,3034
|
21
|
+
artefacts_cli-0.7.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
22
|
+
artefacts_cli-0.7.0.dist-info/entry_points.txt,sha256=nlTXRzilNjccbi53FgaRWCQPkG-pv61HRkaCkrKjlec,58
|
23
|
+
artefacts_cli-0.7.0.dist-info/top_level.txt,sha256=FdaMV1C9m36MWa-2Stm5xVODv7hss_nRYNwR83j_7ow,10
|
24
|
+
artefacts_cli-0.7.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|