Skip to content

Commit

Permalink
v1.15.0
Browse files Browse the repository at this point in the history
version 1.15.0
  • Loading branch information
thusser authored Aug 5, 2024
2 parents 781a0ed + 056da8c commit bb0277a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
22 changes: 19 additions & 3 deletions pyobs/interfaces/IMode.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,34 @@ class IMode(Interface, metaclass=ABCMeta):

__module__ = "pyobs.interfaces"

async def list_mode_groups(self) -> List[str]:
"""List names of mode groups that can be set. The index is used as the `group` parameter in the individual
methods.
Returns:
List of names of mode groups.
"""
return []

@abstractmethod
async def list_modes(self, **kwargs: Any) -> List[str]:
async def list_modes(self, group: int = 0, **kwargs: Any) -> List[str]:
"""List available modes.
Args:
group: Group number
Returns:
List of available modes.
"""
...

@abstractmethod
async def set_mode(self, mode: str, **kwargs: Any) -> None:
async def set_mode(self, mode: str, group: int = 0, **kwargs: Any) -> None:
"""Set the current mode.
Args:
mode: Name of mode to set.
group: Group number
Raises:
ValueError: If an invalid mode was given.
Expand All @@ -32,9 +45,12 @@ async def set_mode(self, mode: str, **kwargs: Any) -> None:
...

@abstractmethod
async def get_mode(self, **kwargs: Any) -> str:
async def get_mode(self, group: int = 0, **kwargs: Any) -> str:
"""Get currently set mode.
Args:
group: Group number
Returns:
Name of currently set mode.
"""
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]
name = "pyobs-core"
packages = [{ include = "pyobs" }]
version = "1.14.0"
version = "1.15.0"
description = "robotic telescope software"
authors = ["Tim-Oliver Husser <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit bb0277a

Please sign in to comment.