spl-core 9.1.2__tar.gz → 9.2.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.
- {spl_core-9.1.2 → spl_core-9.2.0}/PKG-INFO +1 -1
- {spl_core-9.1.2 → spl_core-9.2.0}/pyproject.toml +1 -1
- spl_core-9.2.0/src/spl_core/__init__.py +1 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/test_utils/artifacts_archiver.py +42 -7
- spl_core-9.1.2/src/spl_core/__init__.py +0 -1
- {spl_core-9.1.2 → spl_core-9.2.0}/LICENSE +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/README.md +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/__run.py +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/common/__init__.py +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/common/path.py +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/common.cmake +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/conan.cmake +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/config/KConfig +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/gcov_maid/__init__.py +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/gcov_maid/gcov_maid.py +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kconfig/__init__.py +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kconfig/kconfig.py +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kconfig.cmake +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/__init__.py +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/create.py +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/application/.vscode/cmake-variants.json +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/application/KConfig +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/application/src/greeter/CMakeLists.txt +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/application/src/greeter/doc/_images/screenshot.png +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/application/src/greeter/doc/index.md +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/application/src/greeter/src/greeter.c +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/application/src/greeter/src/greeter.h +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/application/src/greeter/test/test_greeter.cc +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/application/src/main/CMakeLists.txt +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/application/src/main/doc/index.md +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/application/src/main/src/main.c +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/application/test/EnglishVariant/test__EnglishVariant.py +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/application/test/German/test__GermanVariant.py +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/application/variants/EnglishVariant/config.cmake +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/application/variants/EnglishVariant/parts.cmake +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/application/variants/GermanVariant/config.cmake +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/application/variants/GermanVariant/config.txt +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/application/variants/GermanVariant/parts.cmake +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/project/.gitignore +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/project/.vscode/cmake-kits.json +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/project/.vscode/extensions.json +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/project/.vscode/launch.json +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/project/.vscode/settings.json +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/project/.vscode/tasks.json +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/project/CMakeLists.txt +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/project/README.md +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/project/bootstrap.json +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/project/build.bat +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/project/build.ps1 +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/project/conf.py +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/project/doc/common/index.md +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/project/doc/common/sphinx_configuration.md +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/project/doc/components/index.md +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/project/doc/software_architecture/index.md +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/project/doc/software_requirements/index.md +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/project/doc/test_report_template.txt +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/project/index.md +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/project/pypeline.yaml +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/project/pyproject.toml +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/project/pytest.ini +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/project/scoopfile.json +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/project/tools/toolchains/clang/toolchain.cmake +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/project/tools/toolchains/gcc/toolchain.cmake +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/main.py +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/report_generation/__init__.py +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/report_generation/spl_html_settings.py +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/report_generation/spl_sphinx.py +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/report_generation/spl_theme_extension.py +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/report_generation/static/spl_core_logo.png +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/report_generation/static/spl_custom.css +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/report_generation/ubproject.toml +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/spl.cmake +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/steps/collect_pr_changes.py +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/test_utils/archive_artifacts_collection.py +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/test_utils/base_variant_test_runner.py +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/test_utils/junit_merger.py +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/test_utils/pytest_plugin.py +0 -0
- {spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/test_utils/spl_build.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "9.2.0"
|
|
@@ -4,6 +4,7 @@ import re
|
|
|
4
4
|
import shutil
|
|
5
5
|
import subprocess
|
|
6
6
|
import tempfile
|
|
7
|
+
from collections.abc import Sequence
|
|
7
8
|
from dataclasses import dataclass
|
|
8
9
|
from datetime import UTC, datetime
|
|
9
10
|
from pathlib import Path
|
|
@@ -74,31 +75,63 @@ class ArtifactsArchive:
|
|
|
74
75
|
self.archive_name: str = archive_name
|
|
75
76
|
self.archive_artifacts: list[ArtifactsArchive.ArchiveArtifact] = []
|
|
76
77
|
|
|
77
|
-
def register(self, artifacts:
|
|
78
|
+
def register(self, artifacts: Sequence[Path | tuple[Path, Path]]) -> None:
|
|
78
79
|
"""
|
|
79
80
|
Register artifacts for archiving.
|
|
80
81
|
Args:
|
|
81
|
-
artifacts: List of
|
|
82
|
+
artifacts: List of artifacts to be archived. Each entry is either:
|
|
83
|
+
- a Path (file or directory), archived under its name/relative path
|
|
84
|
+
as before, or
|
|
85
|
+
- a (Path, archive_path_override) tuple, where ``archive_path_override``
|
|
86
|
+
overrides the path/name the artifact is stored under inside the archive.
|
|
87
|
+
This allows renaming files per artifact (e.g. link_out.elf -> application.elf).
|
|
88
|
+
It must be a relative path without ``..`` components.
|
|
89
|
+
If two entries map to the same archive path, the later one overwrites the
|
|
90
|
+
earlier one in the archive and a warning is logged.
|
|
91
|
+
Raises:
|
|
92
|
+
ValueError: If an ``archive_path_override`` is absolute, rooted, has a drive or contains ``..``.
|
|
82
93
|
"""
|
|
83
94
|
for artifact in artifacts:
|
|
84
|
-
|
|
95
|
+
if isinstance(artifact, tuple):
|
|
96
|
+
source, archive_path_override = artifact
|
|
97
|
+
self._add_artifact(source, archive_path_override=archive_path_override)
|
|
98
|
+
else:
|
|
99
|
+
self._add_artifact(artifact)
|
|
85
100
|
|
|
86
|
-
def _add_artifact(self, artifact_path: Path) -> None:
|
|
101
|
+
def _add_artifact(self, artifact_path: Path, archive_path_override: Path | None = None) -> None:
|
|
87
102
|
"""
|
|
88
103
|
Add an artifact (file or directory) to the archive list.
|
|
89
104
|
Args:
|
|
90
105
|
artifact_path: path to the artifact to be archived.
|
|
106
|
+
archive_path_override: optional path/name (relative to the archive root)
|
|
107
|
+
to store the artifact under. When provided, it takes precedence over
|
|
108
|
+
the path derived from out_dir. When None, the previous behavior is
|
|
109
|
+
preserved.
|
|
110
|
+
Raises:
|
|
111
|
+
ValueError: If ``archive_path_override`` is absolute, rooted, has a drive or contains ``..``.
|
|
91
112
|
"""
|
|
113
|
+
# anchor also catches "/foo" and "C:foo" on Windows, which is_absolute() misses.
|
|
114
|
+
# Such paths would make create_archive() copy the file outside the staging dir,
|
|
115
|
+
# so it would silently be missing from the archive.
|
|
116
|
+
if archive_path_override is not None and (archive_path_override.anchor or ".." in archive_path_override.parts):
|
|
117
|
+
raise ValueError(f"archive_path_override must be a relative path inside the archive without '..', got: {archive_path_override}")
|
|
118
|
+
|
|
92
119
|
# Convert to absolute path first
|
|
93
120
|
absolute_path = artifact_path.resolve() if not artifact_path.is_absolute() else artifact_path
|
|
94
121
|
|
|
95
122
|
# Calculate the relative path from out_dir for the archive
|
|
96
|
-
if
|
|
123
|
+
if archive_path_override is not None:
|
|
124
|
+
archive_path = archive_path_override
|
|
125
|
+
elif absolute_path.is_relative_to(self.out_dir.absolute()):
|
|
97
126
|
archive_path = absolute_path.relative_to(self.out_dir.absolute())
|
|
98
127
|
else:
|
|
99
128
|
# If not relative to out_dir, just use the name
|
|
100
129
|
archive_path = Path(absolute_path.name)
|
|
101
130
|
|
|
131
|
+
overwritten = next((artifact for artifact in reversed(self.archive_artifacts) if artifact.archive_path == archive_path), None)
|
|
132
|
+
if overwritten is not None:
|
|
133
|
+
logger.warning(f"Archive path '{archive_path}' is already registered for {overwritten.absolute_path}; {absolute_path} will overwrite it in the archive")
|
|
134
|
+
|
|
102
135
|
self.archive_artifacts.append(
|
|
103
136
|
self.ArchiveArtifact(
|
|
104
137
|
archive_path=archive_path,
|
|
@@ -201,12 +234,14 @@ class ArtifactsArchiver:
|
|
|
201
234
|
self._target_repos[archive_name] = target_repo
|
|
202
235
|
return archive
|
|
203
236
|
|
|
204
|
-
def register(self, artifacts:
|
|
237
|
+
def register(self, artifacts: Sequence[Path | tuple[Path, Path]], archive_name: str = "default") -> None:
|
|
205
238
|
"""
|
|
206
239
|
Register artifacts for archiving to a specific archive.
|
|
207
240
|
|
|
208
241
|
Args:
|
|
209
|
-
artifacts: List of
|
|
242
|
+
artifacts: List of artifacts (files or directories) to be archived. Each
|
|
243
|
+
entry is either a Path or a (Path, archive_path_override) tuple to store
|
|
244
|
+
the artifact under a custom name/relative path inside the archive.
|
|
210
245
|
archive_name: Name of the archive to register artifacts to (defaults to "default")
|
|
211
246
|
|
|
212
247
|
Raises:
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "9.1.2"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/application/src/main/doc/index.md
RENAMED
|
File without changes
|
{spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/application/src/main/src/main.c
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/project/.vscode/cmake-kits.json
RENAMED
|
File without changes
|
{spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/project/.vscode/extensions.json
RENAMED
|
File without changes
|
{spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/project/.vscode/launch.json
RENAMED
|
File without changes
|
{spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/project/.vscode/settings.json
RENAMED
|
File without changes
|
{spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/project/.vscode/tasks.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/project/doc/common/index.md
RENAMED
|
File without changes
|
|
File without changes
|
{spl_core-9.1.2 → spl_core-9.2.0}/src/spl_core/kickstart/templates/project/doc/components/index.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|