artefacts-cli 0.10.2__tar.gz → 0.11.0__tar.gz

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 (131) hide show
  1. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/CHANGELOG.md +28 -5
  2. {artefacts_cli-0.10.2/artefacts_cli.egg-info → artefacts_cli-0.11.0}/PKG-INFO +8 -4
  3. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/README.md +4 -0
  4. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/api/project/get_config.py +42 -1
  5. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/models/job.py +20 -0
  6. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/models/project.py +20 -0
  7. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/cli/__init__.py +88 -37
  8. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/cli/app.py +32 -6
  9. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/cli/constants.py +3 -1
  10. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/cli/containers/docker_cm.py +4 -10
  11. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/cli/locales/art.pot +52 -51
  12. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/cli/locales/base.pot +55 -54
  13. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/cli/locales/click.pot +2 -2
  14. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/cli/locales/ja_JP/LC_MESSAGES/artefacts.po +126 -104
  15. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/cli/result_utils.py +2 -2
  16. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/cli/utils.py +0 -13
  17. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/cli/version.py +3 -3
  18. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0/artefacts_cli.egg-info}/PKG-INFO +8 -4
  19. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts_cli.egg-info/SOURCES.txt +1 -0
  20. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts_cli.egg-info/requires.txt +3 -3
  21. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/pyproject.toml +3 -4
  22. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/tests/cli/test_cli.py +51 -10
  23. artefacts_cli-0.11.0/tests/cli/test_init.py +89 -0
  24. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/tests/cli/test_warp.py +27 -0
  25. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/tests/cli/test_warp_run.py +145 -0
  26. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/.coveragerc +0 -0
  27. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/.pyre_configuration +0 -0
  28. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/README_INTERNAL.md +0 -0
  29. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/__init__.py +0 -0
  30. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/__init__.py +0 -0
  31. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/api/__init__.py +0 -0
  32. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/api/default/__init__.py +0 -0
  33. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/api/default/get_artifact.py +0 -0
  34. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/api/job/__init__.py +0 -0
  35. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/api/job/api_project_new_job.py +0 -0
  36. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/api/job/get_artifact_downloads.py +0 -0
  37. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/api/job/get_job_by_commit.py +0 -0
  38. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/api/job/get_job_test_results.py +0 -0
  39. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/api/job/post_update_job_results.py +0 -0
  40. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/api/job/put_update_job_results.py +0 -0
  41. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/api/project/__init__.py +0 -0
  42. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/api/project/api_project_info.py +0 -0
  43. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/api/project/create_remote.py +0 -0
  44. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/api/project/get_badge.py +0 -0
  45. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/api/project/get_last_jobs.py +0 -0
  46. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/api/project/upload_source.py +0 -0
  47. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/api/run/__init__.py +0 -0
  48. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/api/run/create_job_run.py +0 -0
  49. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/api/run/submit_run_results.py +0 -0
  50. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/client.py +0 -0
  51. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/errors.py +0 -0
  52. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/models/__init__.py +0 -0
  53. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/models/artifact_response.py +0 -0
  54. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/models/create_new_job.py +0 -0
  55. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/models/create_remote.py +0 -0
  56. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/models/create_remote_response.py +0 -0
  57. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/models/create_remote_response_upload_urls.py +0 -0
  58. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/models/error.py +0 -0
  59. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/models/error_errors.py +0 -0
  60. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/models/get_artifact_downloads_response.py +0 -0
  61. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/models/last_jobs_response.py +0 -0
  62. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/models/presigned_url.py +0 -0
  63. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/models/presigned_url_fields.py +0 -0
  64. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/models/register_run.py +0 -0
  65. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/models/register_run_tests_item.py +0 -0
  66. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/models/scenario_map_response.py +0 -0
  67. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/models/submit_run_results.py +2 -2
  68. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/models/submit_run_results_metrics.py +0 -0
  69. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/models/submit_run_results_response.py +0 -0
  70. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/models/submit_run_results_response_upload_urls.py +0 -0
  71. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/models/submit_run_results_tests_item.py +0 -0
  72. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/models/submit_run_results_uploads.py +0 -0
  73. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/models/update_job_results.py +0 -0
  74. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/models/upload_source_response.py +0 -0
  75. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/models/upload_source_response_upload_urls.py +0 -0
  76. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/api/types.py +0 -0
  77. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/cli/app_containers.py +0 -0
  78. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/cli/app_containers.pyi +0 -0
  79. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/cli/bagparser.py +0 -0
  80. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/cli/config.py +0 -0
  81. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/cli/containers/__init__.py +0 -0
  82. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/cli/containers/docker_utils.py +0 -0
  83. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/cli/containers/utils.py +0 -0
  84. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/cli/core/__init__.py +0 -0
  85. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/cli/core/code_environment.py +0 -0
  86. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/cli/errors.py +0 -0
  87. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/cli/helpers.py +0 -0
  88. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/cli/i18n.py +0 -0
  89. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/cli/logger.py +0 -0
  90. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/cli/other.py +0 -0
  91. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/cli/parameters.py +0 -0
  92. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/cli/reporter.py +0 -0
  93. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/cli/run_launch_test.py +0 -0
  94. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/cli/run_pytest.py +0 -0
  95. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts/copava/__init__.py +0 -0
  96. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts.yaml +0 -0
  97. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts_cli.egg-info/dependency_links.txt +0 -0
  98. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts_cli.egg-info/entry_points.txt +0 -0
  99. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/artefacts_cli.egg-info/top_level.txt +0 -0
  100. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/bin/release +0 -0
  101. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/infra-tests/test_run_remote.yaml +0 -0
  102. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/infra-tests/turtlesim2/launch_turtle.py +0 -0
  103. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/infra-tests/turtlesim2/sample_node.py +0 -0
  104. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/pytest.ini +0 -0
  105. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/scripts/whats_latest.rb +0 -0
  106. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/setup.cfg +0 -0
  107. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/tests/__init__.py +0 -0
  108. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/tests/cli/__init__.py +0 -0
  109. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/tests/cli/containers/__init__.py +0 -0
  110. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/tests/cli/containers/test_docker.py +0 -0
  111. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/tests/cli/containers/test_utils.py +0 -0
  112. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/tests/cli/core/test_code_environment.py +0 -0
  113. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/tests/cli/test_app_containers.py +0 -0
  114. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/tests/cli/test_config.py +0 -0
  115. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/tests/cli/test_config_validation.py +0 -0
  116. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/tests/cli/test_other.py +0 -0
  117. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/tests/cli/test_parameters.py +0 -0
  118. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/tests/cli/test_pytest.py +0 -0
  119. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/tests/cli/test_reporter.py +0 -0
  120. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/tests/cli/test_ros2.py +0 -0
  121. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/tests/cli/test_signals.py +0 -0
  122. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/tests/cli/test_utils.py +0 -0
  123. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/tests/cli/test_utils_ros.py +0 -0
  124. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/tests/conftest.py +0 -0
  125. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/tests/fixtures/artefacts-env-param.yaml +0 -0
  126. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/tests/fixtures/artefacts.yaml.template +0 -0
  127. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/tests/fixtures/artefacts_deprecated.yaml +0 -0
  128. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/tests/fixtures/bad_launch_test.py +0 -0
  129. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/tests/fixtures/sample_pytest_file.py +0 -0
  130. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/tests/fixtures/test_junit.xml +0 -0
  131. {artefacts_cli-0.10.2 → artefacts_cli-0.11.0}/tests/utils/docker_mock.py +0 -0
@@ -7,12 +7,34 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
- ## [0.10.2] - 2025-12-17
10
+ ## [0.11.0] - 2025-12-17
11
+
12
+ ### Added
13
+
14
+ - CLI now checks your project API key is valid when running `artefacts config add` (#374)
15
+ - CLI exit handler to ensure sub-processes are closed completely (sometimes Gazebo lingers after exit) (#129)
16
+
17
+ ### Changed
18
+
19
+ - CLI now depends on the `docker` package, transparently even if you do not use containers. This allows container runs to work correctly with wrappers like `uv tool` and others (#416)
20
+
21
+ ### Deprecated
22
+
23
+ - `output_path` in artefacts.yaml no longer used. If set, artefacts will ignore it, and default behaviour (Creating its own temp directory for logs / test results) will apply. This affects:
24
+ 1. User created uploads (please use `output_dirs` instead)
25
+ 2. When using `metrics:` in artefacts.yaml, value should be `path/to/metrics.json` (`output_path` is not required, nor used)
11
26
 
12
27
  ### Fixed
13
28
 
29
+ - Upgraded Artefacts Xray to 0.2.0 to include a fix that breaks the API protocol when using resource tracking (#413)
30
+ - Fixes issue where if a rosbag is recorded, and `metrics` is provided as json file, cli would attempt to iterate through filepath string looking for nonexisting topics in the rosbag (#425)
31
+ - Fixes issue where if non-numeric metric value is recorded, the cli would error out rather than skip the non-supported value type (#425)
14
32
  - Sets minimum requirement of `attrs` to 21.3.0 (when import name `attrs` was introduced) #435
15
33
 
34
+ ### Removed
35
+
36
+ - `log_post_process_metrics()` - Unused function (#405)
37
+
16
38
  ## [0.10.0] - 2025-11-14
17
39
 
18
40
  ### Added
@@ -22,6 +44,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
22
44
  ### Changed
23
45
 
24
46
  - Internal code migration to using a new SDK to the Artefacts API, now following OpenAPI standards (#356)
47
+ - Deprecating Iron, Adding support for Jazzy
25
48
 
26
49
  ### Fixed
27
50
 
@@ -200,12 +223,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
200
223
 
201
224
  - Beginning of semantic versioning.
202
225
  - Local metrics errors do not block publication of results.
203
- - Introduction of Black formatting.
226
+ - Introduction of Black formatting.
204
227
 
205
- [unreleased]: https://github.com/art-e-fact/artefacts-client/compare/0.10.2...HEAD
206
- [0.10.2]: https://github.com/art-e-fact/artefacts-client/releases/tag/0.10.2
228
+ [unreleased]: https://github.com/art-e-fact/artefacts-client/compare/0.11.0...HEAD
229
+ [0.11.0]: https://github.com/art-e-fact/artefacts-client/releases/tag/0.11.0
230
+ [0.10.1]: https://github.com/art-e-fact/artefacts-client/releases/tag/0.10.1
207
231
  [0.9.9]: https://github.com/art-e-fact/artefacts-client/releases/tag/0.9.9
208
- [0.9.7]: https://github.com/art-e-fact/artefacts-client/releases/tag/0.9.7
209
232
  [0.8.0]: https://github.com/art-e-fact/artefacts-client/releases/tag/0.8.0
210
233
  [0.7.0]: https://github.com/art-e-fact/artefacts-client/releases/tag/0.7.0
211
234
  [0.5.8]: https://github.com/art-e-fact/artefacts-client/releases/tag/0.5.8
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: artefacts_cli
3
- Version: 0.10.2
3
+ Version: 0.11.0
4
4
  Author-email: FD <fabian@artefacts.com>, AGC <alejandro@artefacts.com>, TN <tomo@artefacts.com>, EP <eric@artefacts.com>
5
5
  License-Expression: Apache-2.0
6
6
  Project-URL: Homepage, https://github.com/art-e-fact/artefacts-client
@@ -11,9 +11,10 @@ Classifier: Operating System :: OS Independent
11
11
  Requires-Python: >=3.10
12
12
  Description-Content-Type: text/markdown
13
13
  Requires-Dist: artefacts-c2d>=1.7.1
14
- Requires-Dist: artefacts-copava>=0.1.12
14
+ Requires-Dist: artefacts-copava>=0.1.15
15
15
  Requires-Dist: artefacts-click
16
- Requires-Dist: artefacts-xray>=0.1.7
16
+ Requires-Dist: artefacts-xray>=0.2.0
17
+ Requires-Dist: docker==7.1.0
17
18
  Requires-Dist: gitignore_parser>=0.1.11
18
19
  Requires-Dist: junitparser>=2.5
19
20
  Requires-Dist: mcap
@@ -31,7 +32,6 @@ Provides-Extra: dev
31
32
  Requires-Dist: awscli; extra == "dev"
32
33
  Requires-Dist: babel==2.17.0; extra == "dev"
33
34
  Requires-Dist: build; extra == "dev"
34
- Requires-Dist: docker; extra == "dev"
35
35
  Requires-Dist: lark; extra == "dev"
36
36
  Requires-Dist: mkdocs-click==0.8.0; extra == "dev"
37
37
  Requires-Dist: mkdocs-material==8.5.6; extra == "dev"
@@ -58,6 +58,10 @@ CLI to the Artefacts platform.
58
58
  [![Documentation](https://img.shields.io/badge/documentation-blue.svg?style=flat-square)](https://docs.artefacts.com/)
59
59
  [![Ruff Style](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
60
60
 
61
+ ## Status
62
+
63
+ [![Local Runs](https://github.com/art-e-fact/artefacts-client/actions/workflows/check-local-runs.yaml/badge.svg)](https://github.com/art-e-fact/artefacts-client/actions/workflows/check-local-runs.yaml)
64
+
61
65
  ## Requirements
62
66
 
63
67
  * Currently working partially where Python can run.
@@ -5,6 +5,10 @@ CLI to the Artefacts platform.
5
5
  [![Documentation](https://img.shields.io/badge/documentation-blue.svg?style=flat-square)](https://docs.artefacts.com/)
6
6
  [![Ruff Style](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
7
7
 
8
+ ## Status
9
+
10
+ [![Local Runs](https://github.com/art-e-fact/artefacts-client/actions/workflows/check-local-runs.yaml/badge.svg)](https://github.com/art-e-fact/artefacts-client/actions/workflows/check-local-runs.yaml)
11
+
8
12
  ## Requirements
9
13
 
10
14
  * Currently working partially where Python can run.
@@ -4,22 +4,35 @@ from typing import Any, cast
4
4
  import httpx
5
5
 
6
6
  from ...client import AuthenticatedClient, Client
7
- from ...types import Response
7
+ from ...types import Response, UNSET
8
8
  from ... import errors
9
9
 
10
10
  from ...models.error import Error
11
+ from ...types import Unset
11
12
 
12
13
 
13
14
  def _get_kwargs(
14
15
  organization_slug: str,
15
16
  project_name: str,
17
+ *,
18
+ framework: str | Unset = UNSET,
19
+ simulator: str | Unset = UNSET,
16
20
  ) -> dict[str, Any]:
21
+ params: dict[str, Any] = {}
22
+
23
+ params["framework"] = framework
24
+
25
+ params["simulator"] = simulator
26
+
27
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
28
+
17
29
  _kwargs: dict[str, Any] = {
18
30
  "method": "get",
19
31
  "url": "/{organization_slug}/{project_name}/artefacts.yaml".format(
20
32
  organization_slug=organization_slug,
21
33
  project_name=project_name,
22
34
  ),
35
+ "params": params,
23
36
  }
24
37
 
25
38
  return _kwargs
@@ -32,6 +45,10 @@ def _parse_response(
32
45
  response_200 = cast(Any, None)
33
46
  return response_200
34
47
 
48
+ if response.status_code == 400:
49
+ response_400 = cast(Any, None)
50
+ return response_400
51
+
35
52
  if response.status_code == 401:
36
53
  response_401 = Error.from_dict(response.json())
37
54
 
@@ -68,12 +85,16 @@ def sync_detailed(
68
85
  project_name: str,
69
86
  *,
70
87
  client: AuthenticatedClient | Client,
88
+ framework: str | Unset = UNSET,
89
+ simulator: str | Unset = UNSET,
71
90
  ) -> Response[Any | Error]:
72
91
  """Generates a basic artefacts.yaml example for the given project
73
92
 
74
93
  Args:
75
94
  organization_slug (str):
76
95
  project_name (str):
96
+ framework (str | Unset):
97
+ simulator (str | Unset):
77
98
 
78
99
  Raises:
79
100
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -86,6 +107,8 @@ def sync_detailed(
86
107
  kwargs = _get_kwargs(
87
108
  organization_slug=organization_slug,
88
109
  project_name=project_name,
110
+ framework=framework,
111
+ simulator=simulator,
89
112
  )
90
113
 
91
114
  response = client.get_httpx_client().request(
@@ -100,12 +123,16 @@ def sync(
100
123
  project_name: str,
101
124
  *,
102
125
  client: AuthenticatedClient | Client,
126
+ framework: str | Unset = UNSET,
127
+ simulator: str | Unset = UNSET,
103
128
  ) -> Any | Error | None:
104
129
  """Generates a basic artefacts.yaml example for the given project
105
130
 
106
131
  Args:
107
132
  organization_slug (str):
108
133
  project_name (str):
134
+ framework (str | Unset):
135
+ simulator (str | Unset):
109
136
 
110
137
  Raises:
111
138
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -119,6 +146,8 @@ def sync(
119
146
  organization_slug=organization_slug,
120
147
  project_name=project_name,
121
148
  client=client,
149
+ framework=framework,
150
+ simulator=simulator,
122
151
  ).parsed
123
152
 
124
153
 
@@ -127,12 +156,16 @@ async def asyncio_detailed(
127
156
  project_name: str,
128
157
  *,
129
158
  client: AuthenticatedClient | Client,
159
+ framework: str | Unset = UNSET,
160
+ simulator: str | Unset = UNSET,
130
161
  ) -> Response[Any | Error]:
131
162
  """Generates a basic artefacts.yaml example for the given project
132
163
 
133
164
  Args:
134
165
  organization_slug (str):
135
166
  project_name (str):
167
+ framework (str | Unset):
168
+ simulator (str | Unset):
136
169
 
137
170
  Raises:
138
171
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -145,6 +178,8 @@ async def asyncio_detailed(
145
178
  kwargs = _get_kwargs(
146
179
  organization_slug=organization_slug,
147
180
  project_name=project_name,
181
+ framework=framework,
182
+ simulator=simulator,
148
183
  )
149
184
 
150
185
  response = await client.get_async_httpx_client().request(**kwargs)
@@ -157,12 +192,16 @@ async def asyncio(
157
192
  project_name: str,
158
193
  *,
159
194
  client: AuthenticatedClient | Client,
195
+ framework: str | Unset = UNSET,
196
+ simulator: str | Unset = UNSET,
160
197
  ) -> Any | Error | None:
161
198
  """Generates a basic artefacts.yaml example for the given project
162
199
 
163
200
  Args:
164
201
  organization_slug (str):
165
202
  project_name (str):
203
+ framework (str | Unset):
204
+ simulator (str | Unset):
166
205
 
167
206
  Raises:
168
207
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -177,5 +216,7 @@ async def asyncio(
177
216
  organization_slug=organization_slug,
178
217
  project_name=project_name,
179
218
  client=client,
219
+ framework=framework,
220
+ simulator=simulator,
180
221
  )
181
222
  ).parsed
@@ -33,6 +33,7 @@ class Job:
33
33
  commit (None | str | Unset):
34
34
  commit_ref (None | str | Unset):
35
35
  ref (None | str | Unset):
36
+ notes (None | str | Unset):
36
37
  creator (str | Unset):
37
38
  success (bool | None | Unset):
38
39
  """
@@ -53,6 +54,7 @@ class Job:
53
54
  commit: None | str | Unset = UNSET
54
55
  commit_ref: None | str | Unset = UNSET
55
56
  ref: None | str | Unset = UNSET
57
+ notes: None | str | Unset = UNSET
56
58
  creator: str | Unset = UNSET
57
59
  success: bool | None | Unset = UNSET
58
60
 
@@ -125,6 +127,12 @@ class Job:
125
127
  else:
126
128
  ref = self.ref
127
129
 
130
+ notes: None | str | Unset
131
+ if isinstance(self.notes, Unset):
132
+ notes = UNSET
133
+ else:
134
+ notes = self.notes
135
+
128
136
  creator = self.creator
129
137
 
130
138
  success: bool | None | Unset
@@ -168,6 +176,8 @@ class Job:
168
176
  field_dict["commit_ref"] = commit_ref
169
177
  if ref is not UNSET:
170
178
  field_dict["ref"] = ref
179
+ if notes is not UNSET:
180
+ field_dict["notes"] = notes
171
181
  if creator is not UNSET:
172
182
  field_dict["creator"] = creator
173
183
  if success is not UNSET:
@@ -273,6 +283,15 @@ class Job:
273
283
 
274
284
  ref = _parse_ref(d.pop("ref", UNSET))
275
285
 
286
+ def _parse_notes(data: object) -> None | str | Unset:
287
+ if data is None:
288
+ return data
289
+ if isinstance(data, Unset):
290
+ return data
291
+ return cast(None | str | Unset, data)
292
+
293
+ notes = _parse_notes(d.pop("notes", UNSET))
294
+
276
295
  creator = d.pop("creator", UNSET)
277
296
 
278
297
  def _parse_success(data: object) -> bool | None | Unset:
@@ -301,6 +320,7 @@ class Job:
301
320
  commit=commit,
302
321
  commit_ref=commit_ref,
303
322
  ref=ref,
323
+ notes=notes,
304
324
  creator=creator,
305
325
  success=success,
306
326
  )
@@ -5,6 +5,8 @@ from typing import Any, TypeVar
5
5
 
6
6
  from attrs import define as _attrs_define
7
7
 
8
+ from ..types import UNSET, Unset
9
+
8
10
 
9
11
  T = TypeVar("T", bound="Project")
10
12
 
@@ -15,16 +17,24 @@ class Project:
15
17
  Attributes:
16
18
  organization (str):
17
19
  name (str):
20
+ framework (str | Unset):
21
+ simulator (str | Unset):
18
22
  """
19
23
 
20
24
  organization: str
21
25
  name: str
26
+ framework: str | Unset = UNSET
27
+ simulator: str | Unset = UNSET
22
28
 
23
29
  def to_dict(self) -> dict[str, Any]:
24
30
  organization = self.organization
25
31
 
26
32
  name = self.name
27
33
 
34
+ framework = self.framework
35
+
36
+ simulator = self.simulator
37
+
28
38
  field_dict: dict[str, Any] = {}
29
39
 
30
40
  field_dict.update(
@@ -33,6 +43,10 @@ class Project:
33
43
  "name": name,
34
44
  }
35
45
  )
46
+ if framework is not UNSET:
47
+ field_dict["framework"] = framework
48
+ if simulator is not UNSET:
49
+ field_dict["simulator"] = simulator
36
50
 
37
51
  return field_dict
38
52
 
@@ -43,9 +57,15 @@ class Project:
43
57
 
44
58
  name = d.pop("name")
45
59
 
60
+ framework = d.pop("framework", UNSET)
61
+
62
+ simulator = d.pop("simulator", UNSET)
63
+
46
64
  project = cls(
47
65
  organization=organization,
48
66
  name=name,
67
+ framework=framework,
68
+ simulator=simulator,
49
69
  )
50
70
 
51
71
  return project
@@ -1,3 +1,4 @@
1
+ import atexit
1
2
  from datetime import datetime, timezone
2
3
  from functools import partial
3
4
  from importlib.metadata import PackageNotFoundError, version
@@ -16,6 +17,7 @@ import textwrap
16
17
  import traceback
17
18
 
18
19
  import click
20
+ import psutil
19
21
 
20
22
  from artefacts.api.api.job import api_project_new_job, post_update_job_results
21
23
  from artefacts.api.api.run import create_job_run, submit_run_results
@@ -29,10 +31,60 @@ from .config import APIConf
29
31
  from .i18n import localise
30
32
  from .logger import logger
31
33
  from .parameters import iter_grid
32
- from .utils import ClickNetWatch, new_version_available, project_info_from
34
+ from .utils import (
35
+ ClickNetWatch,
36
+ new_version_available,
37
+ project_info_from,
38
+ )
33
39
 
34
40
  from axray.tracker import TrackerConf
35
41
 
42
+
43
+ def child_process_cleanup(wait_time_s: int = 3) -> dict:
44
+ """
45
+ Procedure to cleanup any child process still executing as CLI exit been ordered.
46
+
47
+ This proceeds in three stages:
48
+ 1. Send SIGTERM
49
+ 2. Wait a short time to ensure clean teardown.
50
+ 3. If any child remains after wait time, SIGKILL
51
+
52
+ A dictionary is returned with detail of what cleanup happened if any:
53
+ {
54
+ "found": int,
55
+ "terminated": int,
56
+ "killed": int,
57
+ }
58
+ """
59
+ # Get the list of all known children.
60
+ children = psutil.Process().children()
61
+
62
+ # 1. SIGTERM
63
+ for p in children:
64
+ p.terminate()
65
+
66
+ # 2. Wait
67
+ terminated, alive = psutil.wait_procs(children, timeout=wait_time_s)
68
+
69
+ # 3. Forced cleanup
70
+ for p in alive:
71
+ click.echo(
72
+ "Process {proc} could not be terminated normally. Forcibly ending it...".format(
73
+ proc=p
74
+ )
75
+ )
76
+ p.kill()
77
+
78
+ return {
79
+ "found": len(children),
80
+ "terminated": len(terminated),
81
+ "killed": len(alive),
82
+ }
83
+
84
+
85
+ atexit.register(child_process_cleanup)
86
+
87
+
36
88
  try:
37
89
  __version__ = version("artefacts-cli")
38
90
  except PackageNotFoundError:
@@ -140,11 +192,13 @@ class Job:
140
192
  )
141
193
  self.job_id = response.parsed.job_id
142
194
 
143
- self.output_path = self.params.get("output_path", None)
144
- if self.output_path:
145
- os.makedirs(self.output_path, exist_ok=True)
146
- else:
147
- self.output_path = tempfile.mkdtemp(prefix=f"artefacts_job_{self.job_id}_")
195
+ self.output_path = tempfile.mkdtemp(prefix=f"artefacts_job_{self.job_id}_")
196
+ if self.params.get("output_path") is not None:
197
+ logger.warning(
198
+ localise(
199
+ f"As of 0.11.0, 'output_path' can no longer be user-specified. Logs and test results will be saved to temp file {self.output_path} instead."
200
+ )
201
+ )
148
202
 
149
203
  return
150
204
 
@@ -198,9 +252,7 @@ class Run:
198
252
  self.params = params
199
253
  self.metrics = {}
200
254
  self.run_n = run_n
201
- self.output_path: str = self.params.get(
202
- "output_path", f"{self.job.output_path}/{self.run_n}"
203
- )
255
+ self.output_path: str = f"{self.job.output_path}/{self.run_n}"
204
256
  self.test_results = []
205
257
  self.success = False
206
258
  self.logger = logger
@@ -246,9 +298,18 @@ class Run:
246
298
  Args:
247
299
  name: Name of the metric
248
300
  value: Value of the metric,
249
- non-numeric currently result in server-side error.
250
301
  """
251
- self.metrics[name] = value
302
+ # Only numeric metrics currently accepted
303
+ if isinstance(value, (int, float)):
304
+ self.metrics[name] = value
305
+ else:
306
+ self.logger.warning(
307
+ localise(
308
+ "At present, only numeric metric values are accepted. Skipping metric {metric} with value {value}.".format(
309
+ metric=name, value=value
310
+ )
311
+ )
312
+ )
252
313
 
253
314
  def log_metrics(self) -> None: # maybe better method name?
254
315
  """Processes metrics as json filepath.
@@ -258,28 +319,27 @@ class Run:
258
319
 
259
320
  Failure does not raise error, but logs a warning.
260
321
  """
261
- metrics = self.params.get("metrics")
262
- if not isinstance(metrics, str):
322
+ metrics_file_path = self.params.get("metrics")
323
+ if not isinstance(metrics_file_path, str):
263
324
  return
264
- filepath = os.path.join(self.output_path, metrics)
265
- if not os.path.exists(filepath):
266
- logger.warning(
325
+ if not os.path.exists(metrics_file_path):
326
+ self.logger.warning(
267
327
  localise(
268
328
  "metrics file not found, does it exist? looking for: {metrics}".format(
269
- metrics=metrics
329
+ metrics=metrics_file_path
270
330
  )
271
331
  )
272
332
  )
273
333
  return
274
334
 
275
- with open(filepath) as f:
335
+ with open(metrics_file_path) as f:
276
336
  try:
277
337
  metric_values = json.load(f)
278
338
  except json.JSONDecodeError as e:
279
- logger.warning(
339
+ self.logger.warning(
280
340
  localise(
281
341
  "Failed to parse json of file: {metrics}\n".format(
282
- metrics=metrics
342
+ metrics=metrics_file_path
283
343
  )
284
344
  ),
285
345
  *map(localise, traceback.format_exception(e)),
@@ -288,32 +348,23 @@ class Run:
288
348
  for k, v in metric_values.items():
289
349
  self.log_metric(k, v)
290
350
 
291
- def log_post_process_metrics(self, post_process_folder):
292
- try:
293
- with open(f"{post_process_folder}/metrics.json") as f:
294
- metric_values = json.load(f)
295
- for k, v in metric_values.items():
296
- self.log_metric(k, v)
297
- except FileNotFoundError:
298
- # if the metrics.json file does not exist, do nothing
299
- pass
300
-
301
351
  def log_tests_results(self, test_results, success):
302
352
  self.test_results = test_results
303
353
  self.success = success
304
354
 
305
355
  def log_artifacts(self, output_path, prefix=None):
306
- """log all files within folder output_path"""
356
+ """
357
+ Register for upload all files within `output_path`.
358
+ """
307
359
 
308
- def _get_filename(root_path, full_path):
360
+ def _make_key(root_path, full_path):
309
361
  filename = full_path.split(f"{root_path}/")[-1]
310
- # print(root_path, full_path, filename)
311
362
  return filename
312
363
 
313
364
  files = [
314
365
  f
315
366
  for f in glob.glob(f"{output_path}/**", recursive=True)
316
- if "." in f and f[-1] != "/"
367
+ if os.path.isfile(f)
317
368
  ]
318
369
  # careful: glob with recursive sometimes returns non existent paths!
319
370
  # https://stackoverflow.com/questions/72366844/unexpected-result-with-recursive-glob-glob-using-pattern
@@ -323,14 +374,14 @@ class Run:
323
374
  # Note: filename must not be empty string (happened when '.ros' in root path)
324
375
  if prefix is not None:
325
376
  self.uploads.update(
326
- {f"{prefix}/{_get_filename(output_path, f)}": f for f in files}
377
+ {f"{prefix}/{_make_key(output_path, f)}": f for f in files}
327
378
  )
328
379
  else:
329
380
  self.uploads.update(
330
381
  {
331
- _get_filename(output_path, f): f
382
+ _make_key(output_path, f): f
332
383
  for f in files
333
- if _get_filename(output_path, f) != ""
384
+ if _make_key(output_path, f) != ""
334
385
  }
335
386
  )
336
387
 
@@ -173,15 +173,39 @@ def add(project_name):
173
173
 
174
174
  add_key_to_conf(project_name, api_key)
175
175
  click.echo(localise("API KEY saved for {project}").format(project=project_name))
176
+
177
+ # Get credentials only now, as API key set just before.
178
+ api_conf = APIConf(project_name, __version__)
179
+ org, proj = project_info_from(project_name)
180
+
181
+ click.echo(localise("Checking your key is working... "), nl=False)
182
+ try:
183
+ response = api_conf.sdk(
184
+ api_project_info,
185
+ organization_slug=org,
186
+ project_name=proj,
187
+ )
188
+ # Note all status >= 400 are handled by the SDK wrapper
189
+ # and lead to a click.ClickException.
190
+ if response.status_code == 200:
191
+ click.echo("✅")
192
+ except click.ClickException:
193
+ click.echo("❌")
194
+ click.echo(
195
+ localise(
196
+ "We could not verify the API key is valid. Please ensure the value in {config_file} matches the value received from your dashboard (all characters are needed). Sorry for the inconvenience.".format(
197
+ config_file=CONFIG_PATH
198
+ )
199
+ )
200
+ )
201
+ return
202
+
176
203
  if click.confirm(
177
204
  localise(
178
205
  "Would you like to download a pregenerated artefacts.yaml file? This will overwrite any existing config file in the current directory."
179
206
  )
180
207
  ):
181
208
  config_file_name = "artefacts.yaml"
182
- # Get credentials only now, as API key set just before.
183
- api_conf = APIConf(project_name, __version__)
184
- org, proj = project_info_from(project_name)
185
209
  config_response = api_conf.sdk(
186
210
  get_config,
187
211
  handle_errors=False,
@@ -576,8 +600,10 @@ def run(
576
600
  with resource_tracking(csv_report=track_resources, show=show_stats) as tracker:
577
601
  # Only use tracker for uploads when --track-resources is enabled
578
602
  # Note: There is probably a more elegant way to do this.
579
- if not track_resources:
580
- tracker = None
603
+ if track_resources:
604
+ _tracker = tracker
605
+ else:
606
+ _tracker = None
581
607
  click.echo(
582
608
  f"[{jobname}] "
583
609
  + localise("Starting scenario {sid}/{num}: {name}").format(
@@ -585,7 +611,7 @@ def run(
585
611
  )
586
612
  )
587
613
  try:
588
- run = job.new_run(scenario, tracker=tracker)
614
+ run = job.new_run(scenario, tracker=_tracker)
589
615
  except AuthenticationError:
590
616
  click.secho(
591
617
  f"[{jobname}] "
@@ -5,8 +5,8 @@ import os
5
5
  DEFAULT_API_URL = "https://app.artefacts.com/api"
6
6
 
7
7
  SUPPORTED_FRAMEWORKS = [
8
- "ros2:iron",
9
8
  "ros2:humble",
9
+ "ros2:jazzy",
10
10
  "ros2:galactic",
11
11
  "maniskill:challenge2022",
12
12
  "None",
@@ -15,8 +15,10 @@ SUPPORTED_FRAMEWORKS = [
15
15
  None,
16
16
  ]
17
17
 
18
+ # With recommended up from deprecated version
18
19
  DEPRECATED_FRAMEWORKS = {
19
20
  "ros2:0": "ros2:galactic",
21
+ "ros2:iron": "ros2:humble", # due to same OS version, however the logical upgrade by release date might be jazzy
20
22
  }
21
23
 
22
24
  HOME = os.path.expanduser("~")