Skip to content

Commit

Permalink
splitting alarm into multiple files
Browse files Browse the repository at this point in the history
  • Loading branch information
sneakers-the-rat committed Aug 17, 2020
1 parent df712eb commit bd56bc8
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 35 deletions.
7 changes: 7 additions & 0 deletions _docs/alarm.alarm.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Alarm Objects
================

.. automodule:: pvp.alarm.alarm
:members:
:undoc-members:
:autosummary:
7 changes: 7 additions & 0 deletions _docs/alarm.alarm_manager.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Alarm Manager
================

.. automodule:: pvp.alarm.alarm_manager
:members:
:undoc-members:
:autosummary:
7 changes: 7 additions & 0 deletions _docs/alarm.alarm_rule.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Alarm Rule
============

.. automodule:: pvp.alarm.rule
:members:
:undoc-members:
:autosummary:
7 changes: 7 additions & 0 deletions _docs/alarm.condition.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Alarm Condition
===================

.. automodule:: pvp.alarm.condition
:members:
:undoc-members:
:autosummary:
32 changes: 1 addition & 31 deletions _docs/alarm.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
alarm
Alarm
==========

Main Alarm Module
Expand All @@ -9,36 +9,6 @@ Main Alarm Module
:undoc-members:
:autosummary:

Alarm Manager
----------------

.. automodule:: pvp.alarm.alarm_manager
:members:
:undoc-members:
:autosummary:

Alarm
------------

.. automodule:: pvp.alarm.alarm
:members:
:undoc-members:
:autosummary:

Condition
-----------

.. automodule:: pvp.alarm.condition
:members:
:undoc-members:
:autosummary:

Alarm Rule
-----------

.. automodule:: pvp.alarm.rule
:members:
:undoc-members:
:autosummary:


12 changes: 8 additions & 4 deletions pvp/common/values.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@ def __init__(self,
group: typing.Union[None, dict] = None,
default: (int, float) = None):
"""
Definition of a value.
Used by the GUI and control module to set defaults.
Args:
name (str): Human-readable name of the value
Expand Down Expand Up @@ -314,7 +311,14 @@ def __setitem__(self, key, value):
def __getitem__(self, key):
return self.__getattribute__(key)

def to_dict(self):
def to_dict(self) -> dict:
"""
Gather up all attributes and return as a dict!
Returns:
dict
"""

return {
'name': self.name,
'units': self.units,
Expand Down

0 comments on commit bd56bc8

Please sign in to comment.