Skip to content

Commit 32a4899

Browse files
committed
Add stage to provider manifest
1 parent 2286e02 commit 32a4899

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

music_assistant_models/enums.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,3 +628,33 @@ class HidePlayerOption(StrEnum):
628628
def _missing_(cls, value: object) -> HidePlayerOption: # noqa: ARG003
629629
"""Set default enum member if an unknown value is provided."""
630630
return cls.NEVER
631+
632+
633+
class ProviderStage(StrEnum):
634+
"""Enum with possible Provider (development/stability) stages."""
635+
636+
# alpha: early development stage, not ready for production use
637+
ALPHA = "alpha"
638+
639+
# beta: feature complete, but not fully tested, may contain bugs
640+
BETA = "beta"
641+
642+
# stable: fully tested and ready for production use
643+
STABLE = "stable"
644+
645+
# experimental: not stable, may change at any time, not recommended for production use
646+
# often indicates a provider that is in heavy development or is based on reverse engineering
647+
# or breaks often due to upstream changes
648+
EXPERIMENTAL = "experimental"
649+
650+
# unmaintained: no longer maintained, no longer receiving updates or support
651+
# looking for a community maintainer - the provider may not work in the future
652+
UNMAINTAINED = "unmaintained"
653+
654+
# deprecated: no longer supported, will be removed in the future
655+
DEPRECATED = "deprecated"
656+
657+
@classmethod
658+
def _missing_(cls, value: object) -> ProviderStage: # noqa: ARG003
659+
"""Set default enum member if an unknown value is provided."""
660+
return cls.STABLE

music_assistant_models/provider.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
from mashumaro.mixins.orjson import DataClassORJSONMixin
1111

12-
from .enums import MediaType, ProviderFeature, ProviderType
12+
from .enums import MediaType, ProviderFeature, ProviderStage, ProviderType
1313

1414

1515
@dataclass
@@ -24,6 +24,8 @@ class ProviderManifest(DataClassORJSONMixin):
2424

2525
# optional params
2626

27+
# stage: the stage of the provider, used to determine if it is stable or experimental
28+
stage: ProviderStage = ProviderStage.STABLE
2729
# requirements: list of (pip style) python packages required for this provider
2830
requirements: list[str] = field(default_factory=list)
2931
# documentation: link/url to documentation.

0 commit comments

Comments
 (0)