RSPImageTag#

class nublado.models.images.RSPImageTag(*, tag, image_type, display_name, base=None, version=None, semantic=False, cycle=None, cycle_build=None, build=None, architecture=None, extra=None, date=None)#

Bases: object

A sortable image tag for a Rubin Science Platform image.

This class encodes the tag conventions documented in SQR-059. These conventions are specific to the Rubin Science Platform.

Parameters:

Attributes Summary

architecture

Architecture of image, if specified.

base

Base tag name for unknown and alias tags.

build

Version number of the RSP build machinery.

cycle

XML schema version implemented by this image (only for T&S builds).

cycle_build

XML schema build number (only for T&S builds).

date

When the image was created, or as close as we can get to that.

display_name

Human-readable display name.

extra

Additional information about the image.

image_type

Type (release series) of image identified by this tag.

semantic

Whether this tag has an underlying semantic version.

tag

The tag itself, unmodified.

version

Version information as a semantic version.

Methods Summary

alias(tag)

Create an alias tag.

from_str(tag)

Parse a tag into an RSPImageTag.

to_dict()

Serialize to a dictionary representation.

Attributes Documentation

architecture: Optional[str] = None#

Architecture of image, if specified.

base: Optional[str] = None#

Base tag name for unknown and alias tags.

build: Optional[int] = None#

Version number of the RSP build machinery.

cycle: Optional[int] = None#

XML schema version implemented by this image (only for T&S builds).

cycle_build: Optional[int] = None#

XML schema build number (only for T&S builds).

date: Optional[datetime] = None#

When the image was created, or as close as we can get to that.

For daily or weekly tags, this can be calculated within a day or week, which is good enough for filtering purposes. Other image types will have a value of None, since upload time is not always available and even when available is not necessarily when the image was created.

display_name: str = <dataclasses._MISSING_TYPE object>#

Human-readable display name.

extra: Optional[str] = None#

Additional information about the image.

image_type: RSPImageType = <dataclasses._MISSING_TYPE object>#

Type (release series) of image identified by this tag.

semantic: bool = False#

Whether this tag has an underlying semantic version.

tag: str = <dataclasses._MISSING_TYPE object>#

The tag itself, unmodified.

version: Optional[Version] = None#

Version information as a semantic version.

Methods Documentation

classmethod alias(tag)#

Create an alias tag.

Parameters:

tag (str) – Name of the alias tag.

Returns:

The corresponding RSPImageTag.

Return type:

RSPImageTag

classmethod from_str(tag)#

Parse a tag into an RSPImageTag.

Parameters:

tag (str) – The tag.

Returns:

The corresponding RSPImageTag object.

Return type:

RSPImageTag

to_dict()#

Serialize to a dictionary representation.

This method is used primarily for easy testing to allow comparisons with expected JSON output files.

Return type:

dict[str, Any]