Skip to content

Commit

Permalink
Rename runtime_name to runtime_layer in output metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
ncoghlan committed Nov 14, 2024
1 parent fdbc5f6 commit 49acb26
Show file tree
Hide file tree
Showing 33 changed files with 61 additions and 60 deletions.
2 changes: 1 addition & 1 deletion docs/api/stacks/venvstacks.stacks.ArchiveBuildMetadata.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/api/stacks/venvstacks.stacks.ArchiveMetadata.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/api/stacks/venvstacks.stacks.ExportMetadata.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/api/stacks/venvstacks.stacks.LayerSpecMetadata.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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`).

8 changes: 4 additions & 4 deletions docs/file-formats.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.


Expand Down Expand Up @@ -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]
Expand Down
6 changes: 3 additions & 3 deletions src/venvstacks/stacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
{
Expand All @@ -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"
},
{
Expand All @@ -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"
}
],
Expand All @@ -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"
},
{
Expand All @@ -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"
},
{
Expand All @@ -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"
}
],
Expand All @@ -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"
},
{
Expand All @@ -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"
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
{
Expand All @@ -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"
}
],
Expand All @@ -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"
},
{
Expand All @@ -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"
},
{
Expand All @@ -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"
}
],
Expand All @@ -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"
},
{
Expand All @@ -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"
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Loading

0 comments on commit 49acb26

Please sign in to comment.