From baeb2226f42b8542115498c0f2dde8ae2a78b2a2 Mon Sep 17 00:00:00 2001 From: spacemanspiff2007 <10754716+spacemanspiff2007@users.noreply.github.com> Date: Mon, 23 Sep 2024 14:52:35 +0200 Subject: [PATCH] docs --- docs/rule.rst | 45 +++++++++++++++++++++++++++ src/HABApp/rule/scheduler/__init__.py | 2 +- 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/docs/rule.rst b/docs/rule.rst index c7d6092d..96d3b005 100644 --- a/docs/rule.rst +++ b/docs/rule.rst @@ -368,6 +368,51 @@ Job Control :inherited-members: +Other scheduler related functions +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. py:currentmodule:: HABApp.rule.scheduler + +Other scheduler related functions are available under ``HABApp.rule.scheduler``. + +.. list-table:: + :widths: auto + :header-rows: 1 + + * - Function + - Description + + * - :meth:`~get_sun_position` + - Get azimuth and elevation of the sun. + + * - :meth:`~is_holiday` + - Check if a date is a holiday. + + * - :meth:`~add_holiday` + - Add a custom holiday + + * - :meth:`~pop_holiday` + - Remove a holiday + + * - :meth:`~get_holiday_name` + - Get the name of a holiday + + * - :meth:`~get_holidays_by_name` + - Search holidays by name + + +.. autofunction:: get_sun_position + +.. autofunction:: is_holiday + +.. autofunction:: add_holiday + +.. autofunction:: pop_holiday + +.. autofunction:: get_holiday_name + +.. autofunction:: get_holidays_by_name + Other tools and scripts ------------------------------ diff --git a/src/HABApp/rule/scheduler/__init__.py b/src/HABApp/rule/scheduler/__init__.py index b58025ce..4fa74d2e 100644 --- a/src/HABApp/rule/scheduler/__init__.py +++ b/src/HABApp/rule/scheduler/__init__.py @@ -1,3 +1,3 @@ from eascheduler.builder import FilterBuilder as filter from eascheduler.builder import TriggerBuilder as trigger -from eascheduler import get_sun_position, is_holiday +from eascheduler import add_holiday, get_holiday_name, get_holidays_by_name, get_sun_position, is_holiday, pop_holiday