pittgoogle.registry

Pitt-Google registries.

ProjectIds([pittgoogle, pittgoogle_dev, ...])

Registry of Google Cloud Project IDs.

Schemas()

Registry of schemas used by Pitt-Google.


class pittgoogle.registry.ProjectIds(pittgoogle: Final[str] = 'ardent-cycling-243415', pittgoogle_dev: Final[str] = 'avid-heading-329016', elasticc: Final[str] = 'elasticc-challenge')[source]

Registry of Google Cloud Project IDs.

elasticc: Final[str]

Project running classifiers for ELAsTiCC alerts and reporting to DESC.

pittgoogle: Final[str]

Pitt-Google’s production project.

pittgoogle_dev: Final[str]

Pitt-Google’s testing and development project.

class pittgoogle.registry.Schemas[source]

Registry of schemas used by Pitt-Google.

Examples

# View list of registered schema names.
pittgoogle.Schemas().names

# Load a schema (choose a name from above and substitute it below).
schema = pittgoogle.Schemas().get(schema_name="ztf")

# View more information about all the schemas.
pittgoogle.Schemas().manifest

For Developers: Add a new schema to the registry


static get(schema_name: str | None) Schema[source]

Return the schema with name matching schema_name.

Returns:

Schema from the registry with name matching schema_name.

Return type:

Schema

Raises:
  • SchemaError – If a schema with name matching schema_name is not found in the registry.

  • SchemaError – If a schema definition cannot be loaded but one will be required to read the alert bytes.

property manifest: list[dict]

List of dicts containing the registration information of all known schemas.

property names: list[str]

Names of all registered schemas.

A name from this list can be used with the Schemas.get() method to load a schema. Capital letters between angle brackets indicate that you should substitute your own values. For example, to use the LSST schema listed here as "lsst.v<MAJOR>_<MINOR>.alert", choose your own major and minor versions and use like pittgoogle.Schemas.get("lsst.v7_1.alert"). View available schema versions by following the origin link in Schemas.manifest.