Skip to content

Commit

Permalink
0.31.0 (#237)
Browse files Browse the repository at this point in the history
  • Loading branch information
spacemanspiff2007 authored Oct 8, 2021
1 parent f834c3e commit 3b21a95
Show file tree
Hide file tree
Showing 95 changed files with 1,704 additions and 1,236 deletions.
1 change: 1 addition & 0 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ exclude =
# the interfaces will throw unused imports
src/HABApp/openhab/interface.py,
src/HABApp/openhab/interface_async.py,
src/HABApp/rule/interfaces/http_interface.py,
238 changes: 0 additions & 238 deletions _doc/_plugins/sphinx_execute_code.py

This file was deleted.

11 changes: 5 additions & 6 deletions _doc/advanced_usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ Examples:

Add an openhab mock item to the item registry

.. execute_code::
.. exec_code::
:hide_output:

import HABApp
Expand All @@ -202,15 +202,14 @@ Add an openhab mock item to the item registry

Remove the mock item from the registry

.. execute_code::
.. exec_code::
:hide_output:

# hide
# ------------ hide: start ------------
import HABApp
from HABApp.openhab.items import SwitchItem
HABApp.core.Items.add_item(SwitchItem('my_switch', 'ON'))
# hide

# ------------ hide: stop -------------

HABApp.core.Items.pop_item('my_switch')

Expand All @@ -219,7 +218,7 @@ Note that there are some item methods that encapsulate communication with openha
These currently do not work with the mock items. The state has to be changed like
any internal item.

.. execute_code::
.. exec_code::
:hide_output:

import HABApp
Expand Down
4 changes: 2 additions & 2 deletions _doc/asyncio.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ Async http calls are available through the ``self.async_http`` object in rule in
Functions
^^^^^^^^^^^^^^^^^^^^^^^^

.. autoclass:: HABApp.rule.interfaces.AsyncHttpConnection
.. automodule:: HABApp.rule.interfaces.http
:members:

:imported-members:

Examples
^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
12 changes: 4 additions & 8 deletions _doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,11 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import pathlib
import sys

# required for autodoc
sys.path.insert(0, os.path.join(os.path.abspath('..'), 'src'))

sys.path.insert(0, os.path.abspath('./_plugins'))

# -- Project information -----------------------------------------------------

project = 'HABApp'
Expand All @@ -35,7 +32,7 @@
try:
from HABApp import __version__
version = __version__
print(f'Building doc for {version}')
print(f'Building docs for {version}')
except Exception as e:
print('Exception', e)
version = 'dev'
Expand All @@ -52,7 +49,7 @@
extensions = [
'sphinx.ext.autodoc',
'sphinx_autodoc_typehints',
'sphinx_execute_code',
'sphinx_exec_code',
'sphinx.ext.inheritance_diagram',
]

Expand Down Expand Up @@ -203,9 +200,8 @@
epub_exclude_files = ['search.html']

# -- Extension configuration -------------------------------------------------

execute_code_working_dir = pathlib.Path(__file__).parent.parent / 'src'
assert execute_code_working_dir.is_dir(), execute_code_working_dir
exec_code_working_dir = '../src'
exec_code_folders = ['../src', '../tests']

autodoc_member_order = 'bysource'
autoclass_content = 'both'
Loading

0 comments on commit 3b21a95

Please sign in to comment.