From 0a96fb7be5b563cfeeea1f2bde501f6e842e36a4 Mon Sep 17 00:00:00 2001 From: Corran Webster Date: Mon, 16 Sep 2024 08:29:37 +0100 Subject: [PATCH] Theme configuration and simple fix-ups. (#17) --- LICENSE | 2 +- docs/source/conf.py | 26 +++++++++++++++++++- docs/source/examples/lcd_input.py | 2 -- docs/source/index.rst | 41 +++++++++++++++++++++++++++++++ 4 files changed, 67 insertions(+), 4 deletions(-) diff --git a/LICENSE b/LICENSE index 35e85a7..64ecf95 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2024 Unital +Copyright (c) 2024 Unital Software Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/docs/source/conf.py b/docs/source/conf.py index 73bcaa5..e7fbc3d 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -34,7 +34,31 @@ html_theme = 'pydata_sphinx_theme' html_static_path = ['_static'] - +html_theme_options = { + "use_edit_page_button": True, + "icon_links": [ + { + "name": "GitHub", + "url": "https://github.com/unital/ultimo", + "icon": "fa-brands fa-github", + "type": "fontawesome", + }, + { + "name": "Unital", + "url": "https://www.unital.dev", + "icon": "_static/logo-dark.svg", + "type": "local", + }, + ], + "icon_links_label": "Quick Links", + "default_mode": "dark", +} +html_context = { + "github_user": "unital", + "github_repo": "ultimo", + "github_version": "main", + "doc_path": "docs", +} # -- Options for autodoc ----------------------------------------------------- import sys diff --git a/docs/source/examples/lcd_input.py b/docs/source/examples/lcd_input.py index a2da6a1..a3dcb87 100644 --- a/docs/source/examples/lcd_input.py +++ b/docs/source/examples/lcd_input.py @@ -90,9 +90,7 @@ async def display_lines(input, display): await display_line(display, last_line, 0, 0) elif ord(char) == 0x1B: # escape sequence - print("escape") escape = await handle_escape(input) - print(escape) if escape == "[D": # cursor back if cursor > 0: diff --git a/docs/source/index.rst b/docs/source/index.rst index 8d9f20b..62ef150 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -20,6 +20,23 @@ activity, so a user interaction, like changing the value of a potentiometer or polling a button can happen in milliseconds, while a clock or temperature display can be updated much less frequently. +The ``ultimo`` library provides classes that simplify this paradigm. +There are classes which provide asynchronous iterators based around polling, +interrupts and asynchronous streams, as well as intermediate transforming +iterators that handle common tasks such as smoothing and de-duplication. +The basic Ultimo library is hardware-independent and should work on any +recent micropython version. + +The ``ultimo_machine`` library provides hardware support wrapping +the micropython ``machine`` module and other standard library +modules. It provides sources for simple polling of, and interrupts from, GPIO +pins, polled ADC, polled RTC, and interrupt-based timer sources. + +Ultimo also provides convenience decorators and a pipeline syntax for building +dataflows from basic building blocks. + +Ultimo is licensed under the open-source MIT license. + .. toctree:: :maxdepth: 2 :caption: Contents: @@ -27,3 +44,27 @@ display can be updated much less frequently. user_guide.rst api.rst +License +------- + +MIT License + +Copyright (c) 2024 Unital Software + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE.