diff --git a/docs/api/stacks/venvstacks.stacks.ArchiveBuildMetadata.rst b/docs/api/stacks/venvstacks.stacks.ArchiveBuildMetadata.rst index 8b003ce..13ab918 100644 --- a/docs/api/stacks/venvstacks.stacks.ArchiveBuildMetadata.rst +++ b/docs/api/stacks/venvstacks.stacks.ArchiveBuildMetadata.rst @@ -14,7 +14,7 @@ venvstacks.stacks.ArchiveBuildMetadata ~ArchiveBuildMetadata.requirements_hash ~ArchiveBuildMetadata.lock_version ~ArchiveBuildMetadata.locked_at - ~ArchiveBuildMetadata.runtime_name + ~ArchiveBuildMetadata.runtime_layer ~ArchiveBuildMetadata.required_layers ~ArchiveBuildMetadata.app_launch_module ~ArchiveBuildMetadata.app_launch_module_hash diff --git a/docs/api/stacks/venvstacks.stacks.ArchiveMetadata.rst b/docs/api/stacks/venvstacks.stacks.ArchiveMetadata.rst index 8326f81..4a47c17 100644 --- a/docs/api/stacks/venvstacks.stacks.ArchiveMetadata.rst +++ b/docs/api/stacks/venvstacks.stacks.ArchiveMetadata.rst @@ -14,7 +14,7 @@ venvstacks.stacks.ArchiveMetadata ~ArchiveMetadata.requirements_hash ~ArchiveMetadata.lock_version ~ArchiveMetadata.locked_at - ~ArchiveMetadata.runtime_name + ~ArchiveMetadata.runtime_layer ~ArchiveMetadata.required_layers ~ArchiveMetadata.app_launch_module ~ArchiveMetadata.app_launch_module_hash diff --git a/docs/api/stacks/venvstacks.stacks.ExportMetadata.rst b/docs/api/stacks/venvstacks.stacks.ExportMetadata.rst index 6dd1df0..26c58e0 100644 --- a/docs/api/stacks/venvstacks.stacks.ExportMetadata.rst +++ b/docs/api/stacks/venvstacks.stacks.ExportMetadata.rst @@ -14,7 +14,7 @@ venvstacks.stacks.ExportMetadata ~ExportMetadata.requirements_hash ~ExportMetadata.lock_version ~ExportMetadata.locked_at - ~ExportMetadata.runtime_name + ~ExportMetadata.runtime_layer ~ExportMetadata.required_layers ~ExportMetadata.app_launch_module ~ExportMetadata.app_launch_module_hash diff --git a/docs/api/stacks/venvstacks.stacks.LayerSpecMetadata.rst b/docs/api/stacks/venvstacks.stacks.LayerSpecMetadata.rst index 9bc61cd..05449d9 100644 --- a/docs/api/stacks/venvstacks.stacks.LayerSpecMetadata.rst +++ b/docs/api/stacks/venvstacks.stacks.LayerSpecMetadata.rst @@ -14,7 +14,7 @@ venvstacks.stacks.LayerSpecMetadata ~LayerSpecMetadata.requirements_hash ~LayerSpecMetadata.lock_version ~LayerSpecMetadata.locked_at - ~LayerSpecMetadata.runtime_name + ~LayerSpecMetadata.runtime_layer ~LayerSpecMetadata.required_layers ~LayerSpecMetadata.app_launch_module ~LayerSpecMetadata.app_launch_module_hash diff --git a/docs/changelog.d/20241112_134636_ncoghlan_discourage_at_symbol_in_layer_names.rst b/docs/changelog.d/20241112_134636_ncoghlan_discourage_at_symbol_in_layer_names.rst index bd9c48e..3a9ddc9 100644 --- a/docs/changelog.d/20241112_134636_ncoghlan_discourage_at_symbol_in_layer_names.rst +++ b/docs/changelog.d/20241112_134636_ncoghlan_discourage_at_symbol_in_layer_names.rst @@ -3,5 +3,6 @@ Changed - Updated docs to actively discourage using ``@`` in layers names (part of :issue:`78`). - Renamed ``fully_versioned_name`` runtime layer specification field to ``python_implementation`` (part of :issue:`78`). -- Simplified ``runtime_name`` in layer metadata to always refer to the runtime install target (part of :issue:`78`). +- Renamed ``runtime_name`` to ``runtime_layer`` in the layer metadata (to align with the ``required_layers`` field), + and simplified it to always refer to the runtime layer's install target name (part of :issue:`78`). diff --git a/docs/file-formats.rst b/docs/file-formats.rst index e29cdc8..58733dd 100644 --- a/docs/file-formats.rst +++ b/docs/file-formats.rst @@ -155,7 +155,7 @@ Framework layer specifications must contain the following additional field: * ``runtime`` (:toml:`string`): the name of the runtime layer that this framework layer uses. The ``install_target`` and ``python_implementation`` attributes of the specified -runtime are respectively recorded in the ``runtime_name`` +runtime are respectively recorded in the ``runtime_layer`` and ``python_implementation`` fields of the layer output metadata. ``bound_to_implementation`` is an additional boolean field in the frame layer @@ -192,7 +192,7 @@ Application layer specifications must contain the following additional field: The ``runtime`` dependency for application layers is not specified directly. Instead, all of the declared framework dependencies *must* depend on the same runtime layer, and that base runtime also becomes the base runtime for the application layer using those frameworks. -``runtime_name``, ``python_implementation``, and ``bound_to_implementation`` in the layer +``runtime_layer``, ``python_implementation``, and ``bound_to_implementation`` in the layer output metadata are set to the same values as they are for the underlying frameworks. @@ -309,12 +309,12 @@ layer archives or locally exporting layer environments: locked_at: str # ISO formatted date/time value # Fields that are populated after the layer metadata has initially been defined - # "runtime_name" is set to the underlying runtime's deployed environment name + # "runtime_layer" is set to the underlying runtime's deployed environment name # "python_implementation" is set to the underlying runtime's implementation name # "bound_to_implementation" means that the layered environment includes # copies of some files from the runtime implementation, and hence will # need updating even for runtime maintenance releases - runtime_name: NotRequired[str] + runtime_layer: NotRequired[str] python_implementation: NotRequired[str] bound_to_implementation: NotRequired[bool] diff --git a/src/venvstacks/stacks.py b/src/venvstacks/stacks.py index 192c4fd..99ccd3b 100755 --- a/src/venvstacks/stacks.py +++ b/src/venvstacks/stacks.py @@ -1888,10 +1888,10 @@ def load(cls, fname: StrPath) -> Self: if name in frameworks: msg = f"Framework names must be distinct ({name!r} already defined)" raise LayerSpecError(msg) - runtime_name = fw["runtime"] - runtime = runtimes.get(runtime_name) + runtime_layer_spec_name = fw["runtime"] + runtime = runtimes.get(runtime_layer_spec_name) if runtime is None: - msg = f"Framework {name!r} references unknown runtime {runtime_name!r}" + msg = f"Framework {name!r} references unknown runtime {runtime_layer_spec_name!r}" raise LayerSpecError(msg) fw["runtime"] = runtime ensure_optional_env_spec_fields(fw) diff --git a/tests/sample_project/expected_manifests/linux_x86_64/env_metadata/app-scipy-client.json b/tests/sample_project/expected_manifests/linux_x86_64/env_metadata/app-scipy-client.json index bded178..f024763 100644 --- a/tests/sample_project/expected_manifests/linux_x86_64/env_metadata/app-scipy-client.json +++ b/tests/sample_project/expected_manifests/linux_x86_64/env_metadata/app-scipy-client.json @@ -18,6 +18,6 @@ "framework-http-client" ], "requirements_hash": "sha256:fb8a843c694d03d7ee74b457cdac2bd82b6b439de0ed308d72fe698c6c9c6cf4", - "runtime_name": "cpython-3.11", + "runtime_layer": "cpython-3.11", "target_platform": "linux_x86_64" } diff --git a/tests/sample_project/expected_manifests/linux_x86_64/env_metadata/app-scipy-import.json b/tests/sample_project/expected_manifests/linux_x86_64/env_metadata/app-scipy-import.json index d43298e..4625054 100644 --- a/tests/sample_project/expected_manifests/linux_x86_64/env_metadata/app-scipy-import.json +++ b/tests/sample_project/expected_manifests/linux_x86_64/env_metadata/app-scipy-import.json @@ -17,6 +17,6 @@ "framework-scipy@1" ], "requirements_hash": "sha256:36b0dbfec94b7de6507f348f0823cd02fdca2ea79eeafe92d571c26ae347d150", - "runtime_name": "cpython-3.11", + "runtime_layer": "cpython-3.11", "target_platform": "linux_x86_64" } diff --git a/tests/sample_project/expected_manifests/linux_x86_64/env_metadata/app-sklearn-import.json b/tests/sample_project/expected_manifests/linux_x86_64/env_metadata/app-sklearn-import.json index 4ff14d5..9477a2f 100644 --- a/tests/sample_project/expected_manifests/linux_x86_64/env_metadata/app-sklearn-import.json +++ b/tests/sample_project/expected_manifests/linux_x86_64/env_metadata/app-sklearn-import.json @@ -17,6 +17,6 @@ "framework-sklearn" ], "requirements_hash": "sha256:600b3bc658d940b756d5917e6fb7dec3431c5ce4ebc878f5d031e74f3ebdb7a9", - "runtime_name": "cpython-3.12", + "runtime_layer": "cpython-3.12", "target_platform": "linux_x86_64" } diff --git a/tests/sample_project/expected_manifests/linux_x86_64/env_metadata/cpython-3.11.json b/tests/sample_project/expected_manifests/linux_x86_64/env_metadata/cpython-3.11.json index 429b3b2..645c2a2 100644 --- a/tests/sample_project/expected_manifests/linux_x86_64/env_metadata/cpython-3.11.json +++ b/tests/sample_project/expected_manifests/linux_x86_64/env_metadata/cpython-3.11.json @@ -12,6 +12,6 @@ "lock_version": 1, "locked_at": "2024-11-12T04:08:28.555508+00:00", "requirements_hash": "sha256:212b342db7bea93548f01f93e4c91b870e9f7218cbec61e55c16c82fa50f1cd4", - "runtime_name": "cpython-3.11", + "runtime_layer": "cpython-3.11", "target_platform": "linux_x86_64" } diff --git a/tests/sample_project/expected_manifests/linux_x86_64/env_metadata/cpython-3.12.json b/tests/sample_project/expected_manifests/linux_x86_64/env_metadata/cpython-3.12.json index 473e4c1..aea6c9d 100644 --- a/tests/sample_project/expected_manifests/linux_x86_64/env_metadata/cpython-3.12.json +++ b/tests/sample_project/expected_manifests/linux_x86_64/env_metadata/cpython-3.12.json @@ -12,6 +12,6 @@ "lock_version": 1, "locked_at": "2024-11-12T04:08:28.835508+00:00", "requirements_hash": "sha256:212b342db7bea93548f01f93e4c91b870e9f7218cbec61e55c16c82fa50f1cd4", - "runtime_name": "cpython-3.12", + "runtime_layer": "cpython-3.12", "target_platform": "linux_x86_64" } diff --git a/tests/sample_project/expected_manifests/linux_x86_64/env_metadata/framework-http-client.json b/tests/sample_project/expected_manifests/linux_x86_64/env_metadata/framework-http-client.json index 65c2b52..4295925 100644 --- a/tests/sample_project/expected_manifests/linux_x86_64/env_metadata/framework-http-client.json +++ b/tests/sample_project/expected_manifests/linux_x86_64/env_metadata/framework-http-client.json @@ -12,6 +12,6 @@ "lock_version": 1, "locked_at": "2024-10-15T10:23:43.145588+00:00", "requirements_hash": "sha256:c9668bc44dcd9728f98686cb7d72b4cdfc3c3ed44512d29b279a484723c9525a", - "runtime_name": "cpython-3.11", + "runtime_layer": "cpython-3.11", "target_platform": "linux_x86_64" } diff --git a/tests/sample_project/expected_manifests/linux_x86_64/env_metadata/framework-scipy.json b/tests/sample_project/expected_manifests/linux_x86_64/env_metadata/framework-scipy.json index 36212a2..1e174c7 100644 --- a/tests/sample_project/expected_manifests/linux_x86_64/env_metadata/framework-scipy.json +++ b/tests/sample_project/expected_manifests/linux_x86_64/env_metadata/framework-scipy.json @@ -12,6 +12,6 @@ "lock_version": 1, "locked_at": "2024-10-15T10:23:42.825586+00:00", "requirements_hash": "sha256:36b0dbfec94b7de6507f348f0823cd02fdca2ea79eeafe92d571c26ae347d150", - "runtime_name": "cpython-3.11", + "runtime_layer": "cpython-3.11", "target_platform": "linux_x86_64" } diff --git a/tests/sample_project/expected_manifests/linux_x86_64/env_metadata/framework-sklearn.json b/tests/sample_project/expected_manifests/linux_x86_64/env_metadata/framework-sklearn.json index 7b7c80b..628391a 100644 --- a/tests/sample_project/expected_manifests/linux_x86_64/env_metadata/framework-sklearn.json +++ b/tests/sample_project/expected_manifests/linux_x86_64/env_metadata/framework-sklearn.json @@ -12,6 +12,6 @@ "lock_version": 1, "locked_at": "2024-10-15T10:23:43.001587+00:00", "requirements_hash": "sha256:600b3bc658d940b756d5917e6fb7dec3431c5ce4ebc878f5d031e74f3ebdb7a9", - "runtime_name": "cpython-3.12", + "runtime_layer": "cpython-3.12", "target_platform": "linux_x86_64" } diff --git a/tests/sample_project/expected_manifests/linux_x86_64/venvstacks.json b/tests/sample_project/expected_manifests/linux_x86_64/venvstacks.json index ab54b55..7191d59 100644 --- a/tests/sample_project/expected_manifests/linux_x86_64/venvstacks.json +++ b/tests/sample_project/expected_manifests/linux_x86_64/venvstacks.json @@ -20,7 +20,7 @@ "framework-scipy@1" ], "requirements_hash": "sha256:36b0dbfec94b7de6507f348f0823cd02fdca2ea79eeafe92d571c26ae347d150", - "runtime_name": "cpython-3.11", + "runtime_layer": "cpython-3.11", "target_platform": "linux_x86_64" }, { @@ -43,7 +43,7 @@ "framework-http-client" ], "requirements_hash": "sha256:fb8a843c694d03d7ee74b457cdac2bd82b6b439de0ed308d72fe698c6c9c6cf4", - "runtime_name": "cpython-3.11", + "runtime_layer": "cpython-3.11", "target_platform": "linux_x86_64" }, { @@ -65,7 +65,7 @@ "framework-sklearn" ], "requirements_hash": "sha256:600b3bc658d940b756d5917e6fb7dec3431c5ce4ebc878f5d031e74f3ebdb7a9", - "runtime_name": "cpython-3.12", + "runtime_layer": "cpython-3.12", "target_platform": "linux_x86_64" } ], @@ -84,7 +84,7 @@ "lock_version": 1, "locked_at": "2024-10-15T10:23:42.825586+00:00", "requirements_hash": "sha256:36b0dbfec94b7de6507f348f0823cd02fdca2ea79eeafe92d571c26ae347d150", - "runtime_name": "cpython-3.11", + "runtime_layer": "cpython-3.11", "target_platform": "linux_x86_64" }, { @@ -101,7 +101,7 @@ "lock_version": 1, "locked_at": "2024-10-15T10:23:43.001587+00:00", "requirements_hash": "sha256:600b3bc658d940b756d5917e6fb7dec3431c5ce4ebc878f5d031e74f3ebdb7a9", - "runtime_name": "cpython-3.12", + "runtime_layer": "cpython-3.12", "target_platform": "linux_x86_64" }, { @@ -118,7 +118,7 @@ "lock_version": 1, "locked_at": "2024-10-15T10:23:43.145588+00:00", "requirements_hash": "sha256:c9668bc44dcd9728f98686cb7d72b4cdfc3c3ed44512d29b279a484723c9525a", - "runtime_name": "cpython-3.11", + "runtime_layer": "cpython-3.11", "target_platform": "linux_x86_64" } ], @@ -137,7 +137,7 @@ "lock_version": 1, "locked_at": "2024-11-12T04:08:28.555508+00:00", "requirements_hash": "sha256:212b342db7bea93548f01f93e4c91b870e9f7218cbec61e55c16c82fa50f1cd4", - "runtime_name": "cpython-3.11", + "runtime_layer": "cpython-3.11", "target_platform": "linux_x86_64" }, { @@ -154,7 +154,7 @@ "lock_version": 1, "locked_at": "2024-11-12T04:08:28.835508+00:00", "requirements_hash": "sha256:212b342db7bea93548f01f93e4c91b870e9f7218cbec61e55c16c82fa50f1cd4", - "runtime_name": "cpython-3.12", + "runtime_layer": "cpython-3.12", "target_platform": "linux_x86_64" } ] diff --git a/tests/sample_project/expected_manifests/macosx_arm64/env_metadata/app-scipy-client.json b/tests/sample_project/expected_manifests/macosx_arm64/env_metadata/app-scipy-client.json index 12496d6..7e2792e 100644 --- a/tests/sample_project/expected_manifests/macosx_arm64/env_metadata/app-scipy-client.json +++ b/tests/sample_project/expected_manifests/macosx_arm64/env_metadata/app-scipy-client.json @@ -18,6 +18,6 @@ "framework-http-client" ], "requirements_hash": "sha256:fb8a843c694d03d7ee74b457cdac2bd82b6b439de0ed308d72fe698c6c9c6cf4", - "runtime_name": "cpython-3.11", + "runtime_layer": "cpython-3.11", "target_platform": "macosx_arm64" } diff --git a/tests/sample_project/expected_manifests/macosx_arm64/env_metadata/app-scipy-import.json b/tests/sample_project/expected_manifests/macosx_arm64/env_metadata/app-scipy-import.json index a77c113..8ec9c42 100644 --- a/tests/sample_project/expected_manifests/macosx_arm64/env_metadata/app-scipy-import.json +++ b/tests/sample_project/expected_manifests/macosx_arm64/env_metadata/app-scipy-import.json @@ -17,6 +17,6 @@ "framework-scipy@1" ], "requirements_hash": "sha256:36b0dbfec94b7de6507f348f0823cd02fdca2ea79eeafe92d571c26ae347d150", - "runtime_name": "cpython-3.11", + "runtime_layer": "cpython-3.11", "target_platform": "macosx_arm64" } diff --git a/tests/sample_project/expected_manifests/macosx_arm64/env_metadata/cpython-3.11.json b/tests/sample_project/expected_manifests/macosx_arm64/env_metadata/cpython-3.11.json index 17c1760..122354c 100644 --- a/tests/sample_project/expected_manifests/macosx_arm64/env_metadata/cpython-3.11.json +++ b/tests/sample_project/expected_manifests/macosx_arm64/env_metadata/cpython-3.11.json @@ -12,6 +12,6 @@ "lock_version": 1, "locked_at": "2024-11-12T07:31:21.515343+00:00", "requirements_hash": "sha256:212b342db7bea93548f01f93e4c91b870e9f7218cbec61e55c16c82fa50f1cd4", - "runtime_name": "cpython-3.11", + "runtime_layer": "cpython-3.11", "target_platform": "macosx_arm64" } diff --git a/tests/sample_project/expected_manifests/macosx_arm64/env_metadata/cpython-3.12.json b/tests/sample_project/expected_manifests/macosx_arm64/env_metadata/cpython-3.12.json index 164e582..c3f38bd 100644 --- a/tests/sample_project/expected_manifests/macosx_arm64/env_metadata/cpython-3.12.json +++ b/tests/sample_project/expected_manifests/macosx_arm64/env_metadata/cpython-3.12.json @@ -12,6 +12,6 @@ "lock_version": 1, "locked_at": "2024-11-12T07:31:21.594574+00:00", "requirements_hash": "sha256:212b342db7bea93548f01f93e4c91b870e9f7218cbec61e55c16c82fa50f1cd4", - "runtime_name": "cpython-3.12", + "runtime_layer": "cpython-3.12", "target_platform": "macosx_arm64" } diff --git a/tests/sample_project/expected_manifests/macosx_arm64/env_metadata/framework-http-client.json b/tests/sample_project/expected_manifests/macosx_arm64/env_metadata/framework-http-client.json index 1504dcb..952e79f 100644 --- a/tests/sample_project/expected_manifests/macosx_arm64/env_metadata/framework-http-client.json +++ b/tests/sample_project/expected_manifests/macosx_arm64/env_metadata/framework-http-client.json @@ -12,6 +12,6 @@ "lock_version": 1, "locked_at": "2024-10-15T10:23:33.094515+00:00", "requirements_hash": "sha256:c9668bc44dcd9728f98686cb7d72b4cdfc3c3ed44512d29b279a484723c9525a", - "runtime_name": "cpython-3.11", + "runtime_layer": "cpython-3.11", "target_platform": "macosx_arm64" } diff --git a/tests/sample_project/expected_manifests/macosx_arm64/env_metadata/framework-scipy.json b/tests/sample_project/expected_manifests/macosx_arm64/env_metadata/framework-scipy.json index b4513a3..3e7b032 100644 --- a/tests/sample_project/expected_manifests/macosx_arm64/env_metadata/framework-scipy.json +++ b/tests/sample_project/expected_manifests/macosx_arm64/env_metadata/framework-scipy.json @@ -12,6 +12,6 @@ "lock_version": 1, "locked_at": "2024-10-15T10:23:32.960668+00:00", "requirements_hash": "sha256:36b0dbfec94b7de6507f348f0823cd02fdca2ea79eeafe92d571c26ae347d150", - "runtime_name": "cpython-3.11", + "runtime_layer": "cpython-3.11", "target_platform": "macosx_arm64" } diff --git a/tests/sample_project/expected_manifests/macosx_arm64/env_metadata/framework-sklearn.json b/tests/sample_project/expected_manifests/macosx_arm64/env_metadata/framework-sklearn.json index a4ee307..1d972fe 100644 --- a/tests/sample_project/expected_manifests/macosx_arm64/env_metadata/framework-sklearn.json +++ b/tests/sample_project/expected_manifests/macosx_arm64/env_metadata/framework-sklearn.json @@ -12,6 +12,6 @@ "lock_version": 1, "locked_at": "2024-10-15T10:23:33.041734+00:00", "requirements_hash": "sha256:600b3bc658d940b756d5917e6fb7dec3431c5ce4ebc878f5d031e74f3ebdb7a9", - "runtime_name": "cpython-3.12", + "runtime_layer": "cpython-3.12", "target_platform": "macosx_arm64" } diff --git a/tests/sample_project/expected_manifests/macosx_arm64/venvstacks.json b/tests/sample_project/expected_manifests/macosx_arm64/venvstacks.json index 33ac5bf..8a05bc2 100644 --- a/tests/sample_project/expected_manifests/macosx_arm64/venvstacks.json +++ b/tests/sample_project/expected_manifests/macosx_arm64/venvstacks.json @@ -20,7 +20,7 @@ "framework-scipy@1" ], "requirements_hash": "sha256:36b0dbfec94b7de6507f348f0823cd02fdca2ea79eeafe92d571c26ae347d150", - "runtime_name": "cpython-3.11", + "runtime_layer": "cpython-3.11", "target_platform": "macosx_arm64" }, { @@ -43,7 +43,7 @@ "framework-http-client" ], "requirements_hash": "sha256:fb8a843c694d03d7ee74b457cdac2bd82b6b439de0ed308d72fe698c6c9c6cf4", - "runtime_name": "cpython-3.11", + "runtime_layer": "cpython-3.11", "target_platform": "macosx_arm64" } ], @@ -62,7 +62,7 @@ "lock_version": 1, "locked_at": "2024-10-15T10:23:32.960668+00:00", "requirements_hash": "sha256:36b0dbfec94b7de6507f348f0823cd02fdca2ea79eeafe92d571c26ae347d150", - "runtime_name": "cpython-3.11", + "runtime_layer": "cpython-3.11", "target_platform": "macosx_arm64" }, { @@ -79,7 +79,7 @@ "lock_version": 1, "locked_at": "2024-10-15T10:23:33.041734+00:00", "requirements_hash": "sha256:600b3bc658d940b756d5917e6fb7dec3431c5ce4ebc878f5d031e74f3ebdb7a9", - "runtime_name": "cpython-3.12", + "runtime_layer": "cpython-3.12", "target_platform": "macosx_arm64" }, { @@ -96,7 +96,7 @@ "lock_version": 1, "locked_at": "2024-10-15T10:23:33.094515+00:00", "requirements_hash": "sha256:c9668bc44dcd9728f98686cb7d72b4cdfc3c3ed44512d29b279a484723c9525a", - "runtime_name": "cpython-3.11", + "runtime_layer": "cpython-3.11", "target_platform": "macosx_arm64" } ], @@ -115,7 +115,7 @@ "lock_version": 1, "locked_at": "2024-11-12T07:31:21.515343+00:00", "requirements_hash": "sha256:212b342db7bea93548f01f93e4c91b870e9f7218cbec61e55c16c82fa50f1cd4", - "runtime_name": "cpython-3.11", + "runtime_layer": "cpython-3.11", "target_platform": "macosx_arm64" }, { @@ -132,7 +132,7 @@ "lock_version": 1, "locked_at": "2024-11-12T07:31:21.594574+00:00", "requirements_hash": "sha256:212b342db7bea93548f01f93e4c91b870e9f7218cbec61e55c16c82fa50f1cd4", - "runtime_name": "cpython-3.12", + "runtime_layer": "cpython-3.12", "target_platform": "macosx_arm64" } ] diff --git a/tests/sample_project/expected_manifests/win_amd64/env_metadata/app-scipy-client.json b/tests/sample_project/expected_manifests/win_amd64/env_metadata/app-scipy-client.json index ae2fd07..9fd13ff 100644 --- a/tests/sample_project/expected_manifests/win_amd64/env_metadata/app-scipy-client.json +++ b/tests/sample_project/expected_manifests/win_amd64/env_metadata/app-scipy-client.json @@ -18,6 +18,6 @@ "framework-http-client" ], "requirements_hash": "sha256:3bff0428616a2f1724732e78e7788e753dd5f1aa10aa5d3b87707b8dbde121de", - "runtime_name": "cpython-3.11", + "runtime_layer": "cpython-3.11", "target_platform": "win_amd64" } diff --git a/tests/sample_project/expected_manifests/win_amd64/env_metadata/app-scipy-import.json b/tests/sample_project/expected_manifests/win_amd64/env_metadata/app-scipy-import.json index 4f80616..129aa4b 100644 --- a/tests/sample_project/expected_manifests/win_amd64/env_metadata/app-scipy-import.json +++ b/tests/sample_project/expected_manifests/win_amd64/env_metadata/app-scipy-import.json @@ -17,6 +17,6 @@ "framework-scipy@1" ], "requirements_hash": "sha256:9aba38b5efe287f35d58825dce6b1c47ed556b930056e6edc00ca9e1a165796b", - "runtime_name": "cpython-3.11", + "runtime_layer": "cpython-3.11", "target_platform": "win_amd64" } diff --git a/tests/sample_project/expected_manifests/win_amd64/env_metadata/cpython-3.11.json b/tests/sample_project/expected_manifests/win_amd64/env_metadata/cpython-3.11.json index 733f3a9..21bd8e8 100644 --- a/tests/sample_project/expected_manifests/win_amd64/env_metadata/cpython-3.11.json +++ b/tests/sample_project/expected_manifests/win_amd64/env_metadata/cpython-3.11.json @@ -12,6 +12,6 @@ "lock_version": 1, "locked_at": "2024-11-12T07:33:26.947601+00:00", "requirements_hash": "sha256:7306d3600f1528b8ad25eae3e51e282c2f5503a014433fb17e31da00789c84f3", - "runtime_name": "cpython-3.11", + "runtime_layer": "cpython-3.11", "target_platform": "win_amd64" } diff --git a/tests/sample_project/expected_manifests/win_amd64/env_metadata/cpython-3.12.json b/tests/sample_project/expected_manifests/win_amd64/env_metadata/cpython-3.12.json index 02e8da7..01cd465 100644 --- a/tests/sample_project/expected_manifests/win_amd64/env_metadata/cpython-3.12.json +++ b/tests/sample_project/expected_manifests/win_amd64/env_metadata/cpython-3.12.json @@ -12,6 +12,6 @@ "lock_version": 1, "locked_at": "2024-11-12T07:33:27.121883+00:00", "requirements_hash": "sha256:930cc6512e0b5c12785a190a0a70439bf609ffdaad03ed4495191969bb587b84", - "runtime_name": "cpython-3.12", + "runtime_layer": "cpython-3.12", "target_platform": "win_amd64" } diff --git a/tests/sample_project/expected_manifests/win_amd64/env_metadata/framework-http-client.json b/tests/sample_project/expected_manifests/win_amd64/env_metadata/framework-http-client.json index 54c2923..09686a6 100644 --- a/tests/sample_project/expected_manifests/win_amd64/env_metadata/framework-http-client.json +++ b/tests/sample_project/expected_manifests/win_amd64/env_metadata/framework-http-client.json @@ -12,6 +12,6 @@ "lock_version": 1, "locked_at": "2024-10-15T10:24:36.316012+00:00", "requirements_hash": "sha256:71ba32717956dcf9c0d4e18b69061efbe53816f4b591ceb50553d6d3d12e1960", - "runtime_name": "cpython-3.11", + "runtime_layer": "cpython-3.11", "target_platform": "win_amd64" } diff --git a/tests/sample_project/expected_manifests/win_amd64/env_metadata/framework-scipy.json b/tests/sample_project/expected_manifests/win_amd64/env_metadata/framework-scipy.json index 13533c6..ac3efc9 100644 --- a/tests/sample_project/expected_manifests/win_amd64/env_metadata/framework-scipy.json +++ b/tests/sample_project/expected_manifests/win_amd64/env_metadata/framework-scipy.json @@ -12,6 +12,6 @@ "lock_version": 1, "locked_at": "2024-10-15T10:24:35.999197+00:00", "requirements_hash": "sha256:9aba38b5efe287f35d58825dce6b1c47ed556b930056e6edc00ca9e1a165796b", - "runtime_name": "cpython-3.11", + "runtime_layer": "cpython-3.11", "target_platform": "win_amd64" } diff --git a/tests/sample_project/expected_manifests/win_amd64/env_metadata/framework-sklearn.json b/tests/sample_project/expected_manifests/win_amd64/env_metadata/framework-sklearn.json index 6931217..0ce5e64 100644 --- a/tests/sample_project/expected_manifests/win_amd64/env_metadata/framework-sklearn.json +++ b/tests/sample_project/expected_manifests/win_amd64/env_metadata/framework-sklearn.json @@ -12,6 +12,6 @@ "lock_version": 1, "locked_at": "2024-10-15T10:24:36.193328+00:00", "requirements_hash": "sha256:52d03445e70ccc0f6f3fe8523185f9f4b0b2795b83927d8703fba35fdc82bf62", - "runtime_name": "cpython-3.12", + "runtime_layer": "cpython-3.12", "target_platform": "win_amd64" } diff --git a/tests/sample_project/expected_manifests/win_amd64/venvstacks.json b/tests/sample_project/expected_manifests/win_amd64/venvstacks.json index 6175e8e..b80cb26 100644 --- a/tests/sample_project/expected_manifests/win_amd64/venvstacks.json +++ b/tests/sample_project/expected_manifests/win_amd64/venvstacks.json @@ -20,7 +20,7 @@ "framework-scipy@1" ], "requirements_hash": "sha256:9aba38b5efe287f35d58825dce6b1c47ed556b930056e6edc00ca9e1a165796b", - "runtime_name": "cpython-3.11", + "runtime_layer": "cpython-3.11", "target_platform": "win_amd64" }, { @@ -43,7 +43,7 @@ "framework-http-client" ], "requirements_hash": "sha256:3bff0428616a2f1724732e78e7788e753dd5f1aa10aa5d3b87707b8dbde121de", - "runtime_name": "cpython-3.11", + "runtime_layer": "cpython-3.11", "target_platform": "win_amd64" } ], @@ -62,7 +62,7 @@ "lock_version": 1, "locked_at": "2024-10-15T10:24:35.999197+00:00", "requirements_hash": "sha256:9aba38b5efe287f35d58825dce6b1c47ed556b930056e6edc00ca9e1a165796b", - "runtime_name": "cpython-3.11", + "runtime_layer": "cpython-3.11", "target_platform": "win_amd64" }, { @@ -79,7 +79,7 @@ "lock_version": 1, "locked_at": "2024-10-15T10:24:36.193328+00:00", "requirements_hash": "sha256:52d03445e70ccc0f6f3fe8523185f9f4b0b2795b83927d8703fba35fdc82bf62", - "runtime_name": "cpython-3.12", + "runtime_layer": "cpython-3.12", "target_platform": "win_amd64" }, { @@ -96,7 +96,7 @@ "lock_version": 1, "locked_at": "2024-10-15T10:24:36.316012+00:00", "requirements_hash": "sha256:71ba32717956dcf9c0d4e18b69061efbe53816f4b591ceb50553d6d3d12e1960", - "runtime_name": "cpython-3.11", + "runtime_layer": "cpython-3.11", "target_platform": "win_amd64" } ], @@ -115,7 +115,7 @@ "lock_version": 1, "locked_at": "2024-11-12T07:33:26.947601+00:00", "requirements_hash": "sha256:7306d3600f1528b8ad25eae3e51e282c2f5503a014433fb17e31da00789c84f3", - "runtime_name": "cpython-3.11", + "runtime_layer": "cpython-3.11", "target_platform": "win_amd64" }, { @@ -132,7 +132,7 @@ "lock_version": 1, "locked_at": "2024-11-12T07:33:27.121883+00:00", "requirements_hash": "sha256:930cc6512e0b5c12785a190a0a70439bf609ffdaad03ed4495191969bb587b84", - "runtime_name": "cpython-3.12", + "runtime_layer": "cpython-3.12", "target_platform": "win_amd64" } ] diff --git a/tests/support.py b/tests/support.py index 01db783..0e431d6 100644 --- a/tests/support.py +++ b/tests/support.py @@ -337,8 +337,8 @@ def check_deployed_environments( # Frameworks are expected to reference *at least* their base runtime environment self.check_env_sys_path(env_path, env_sys_path) # Framework and runtime should both appear in sys.path - runtime_name = fw_env["runtime_name"] - short_runtime_name = ".".join(runtime_name.split(".")[:2]) + runtime_layer = fw_env["runtime_layer"] + short_runtime_name = ".".join(runtime_layer.split(".")[:2]) self.assertSysPathEntry(env_name, env_sys_path) self.assertSysPathEntry(short_runtime_name, env_sys_path) for app_env in layered_metadata["applications"]: @@ -347,8 +347,8 @@ def check_deployed_environments( # Applications are expected to reference *at least* their base runtime environment self.check_env_sys_path(env_path, env_sys_path) # Application, frameworks and runtime should all appear in sys.path - runtime_name = app_env["runtime_name"] - short_runtime_name = ".".join(runtime_name.split(".")[:2]) + runtime_layer = app_env["runtime_layer"] + short_runtime_name = ".".join(runtime_layer.split(".")[:2]) self.assertSysPathEntry(env_name, env_sys_path) self.assertTrue( any(env_name in path_entry for path_entry in env_sys_path),