wwt_api_client/constellations/data.py: define the new scene AstroPix info

This commit is contained in:
Peter Williams 2024-06-19 18:19:43 -04:00
Родитель 3e96734c5a
Коммит 2a772dacc3
2 изменённых файлов: 47 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,35 @@
SceneAstroPix
=============
.. currentmodule:: wwt_api_client.constellations.data
.. autoclass:: SceneAstroPix
:show-inheritance:
.. rubric:: Attributes Summary
.. autosummary::
~SceneAstroPix.dataclass_json_config
.. rubric:: Methods Summary
.. autosummary::
~SceneAstroPix.from_dict
~SceneAstroPix.from_json
~SceneAstroPix.schema
~SceneAstroPix.to_dict
~SceneAstroPix.to_json
.. rubric:: Attributes Documentation
.. autoattribute:: dataclass_json_config
.. rubric:: Methods Documentation
.. automethod:: from_dict
.. automethod:: from_json
.. automethod:: schema
.. automethod:: to_dict
.. automethod:: to_json

Просмотреть файл

@ -33,6 +33,7 @@ ImageStorage
ImageSummary
ImageUpdate
ImageWwt
SceneAstroPix
SceneContent
SceneContentHydrated
SceneContentUpdate
@ -271,6 +272,16 @@ class ScenePreviews:
thumbnail: Optional[str] = None
@dataclass_json(undefined="EXCLUDE")
@dataclass
class SceneAstroPix:
"""Information about an association between a Constellations scene and an
AstroPix image."""
publisher_id: str
image_id: str
@dataclass_json(undefined="EXCLUDE")
@dataclass
class SceneHydrated:
@ -288,6 +299,7 @@ class SceneHydrated:
text: str
previews: ScenePreviews
published: bool
astropix: Optional[SceneAstroPix] = None
@dataclass_json(undefined="EXCLUDE")