-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8767ce2
commit deadefc
Showing
73 changed files
with
1,736 additions
and
939 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Publish sml2mqtt to dockerhub | ||
on: | ||
release: | ||
types: [published] | ||
# on: [push, pull_request] | ||
|
||
|
||
jobs: | ||
buildx: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: master | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
with: | ||
platforms: all | ||
|
||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v2 | ||
with: | ||
version: latest | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_HUB_USER }} | ||
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | ||
|
||
- name: Build and push | ||
id: docker_build | ||
uses: docker/build-push-action@v4 | ||
with: | ||
push: true | ||
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 | ||
tags: | | ||
spacemanspiff2007/sml2mqtt:latest | ||
spacemanspiff2007/sml2mqtt:${{ github.ref_name }} | ||
- name: Image digest | ||
run: echo ${{ steps.docker_build.outputs.digest }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,7 @@ | |
__pycache__ | ||
/build | ||
/venv/ | ||
|
||
# sphinx | ||
build | ||
make.bat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# .readthedocs.yml | ||
# Read the Docs configuration file | ||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
||
# Required | ||
version: 2 | ||
|
||
# Build documentation in the docs/ directory with Sphinx | ||
sphinx: | ||
configuration: docs/conf.py | ||
|
||
# Build documentation with MkDocs | ||
#mkdocs: | ||
# configuration: mkdocs.yml | ||
|
||
# Optionally build your docs in additional formats such as PDF and ePub | ||
formats: all | ||
|
||
build: | ||
os: ubuntu-22.04 | ||
tools: | ||
python: "3.10" | ||
|
||
# Optionally set the version of Python and requirements required to build your docs | ||
python: | ||
install: | ||
- requirements: requirements_setup.txt | ||
- requirements: docs/requirements.txt | ||
- method: pip | ||
path: . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM python:3.10-alpine | ||
|
||
VOLUME /sml2mqtt | ||
|
||
COPY . /tmp/sml2mqtt_src | ||
|
||
RUN apk add --no-cache python3 py3-wheel py3-pip gcc musl-dev python3-dev && \ | ||
# install sml2mqtt from local dir | ||
pip install --no-cache-dir /tmp/sml2mqtt_src && \ | ||
# cleanup | ||
pip install --no-cache-dir pyclean && pyclean /usr && pip uninstall -y pyclean setuptools wheel pip && \ | ||
apk del py3-wheel py3-pip gcc musl-dev python3-dev && \ | ||
rm -fr /tmp/* | ||
|
||
WORKDIR /sml2mqtt | ||
CMD [ "sml2mqtt", "--config", "/sml2mqtt/config.yml"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
/* On screens that are 767px or more */ | ||
@media screen and (min-width: 767px) { | ||
.wy-nav-content { | ||
max-width: 1100px !important; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
import os | ||
import re | ||
import sys | ||
|
||
RTD_BUILD = os.environ.get('READTHEDOCS') == 'True' | ||
|
||
|
||
# Configuration file for the Sphinx documentation builder. | ||
# | ||
# For the full list of built-in configuration values, see the documentation: | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
|
||
# -- Project information ----------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information | ||
|
||
project = 'sml2mqtt' | ||
copyright = '2023, spacemanspiff2007' | ||
author = 'spacemanspiff2007' | ||
|
||
# -- General configuration --------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration | ||
|
||
extensions = [ | ||
'sphinx_exec_code', | ||
'sphinx.ext.autodoc', | ||
'sphinx.ext.intersphinx', | ||
'sphinx_autodoc_typehints', | ||
'sphinxcontrib.autodoc_pydantic', | ||
] | ||
|
||
templates_path = ['_templates'] | ||
exclude_patterns = [] | ||
|
||
|
||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-add_module_names | ||
# use class name instead of FQN | ||
add_module_names = False | ||
|
||
|
||
# -- Options for HTML output ------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output | ||
|
||
html_theme = 'sphinx_rtd_theme' | ||
html_static_path = ['_static'] | ||
html_css_files = ['theme_changes.css'] | ||
|
||
|
||
# -- Options for autodoc ------------------------------------------------- | ||
autodoc_member_order = 'bysource' | ||
autoclass_content = 'class' | ||
|
||
# so autodoc does find the source | ||
sys.path.insert(0, os.path.join(os.path.abspath('..'), 'src')) | ||
|
||
|
||
# -- Options for autodoc pydantic ------------------------------------------------- | ||
# https://autodoc-pydantic.readthedocs.io/en/stable/ | ||
|
||
# No config on member | ||
autodoc_pydantic_model_show_config_member = False | ||
autodoc_pydantic_model_show_config_summary = False | ||
|
||
# No validators | ||
autodoc_pydantic_model_show_validator_summary = False | ||
autodoc_pydantic_model_show_validator_members = False | ||
|
||
# Model configuration | ||
autodoc_pydantic_model_signature_prefix = 'settings' | ||
autodoc_pydantic_model_show_json = False | ||
autodoc_pydantic_model_show_field_summary = False | ||
autodoc_pydantic_model_member_order = 'bysource' | ||
|
||
# Field config | ||
autodoc_pydantic_field_show_alias = False | ||
autodoc_pydantic_field_list_validators = False | ||
autodoc_pydantic_field_swap_name_and_alias = True | ||
|
||
# -- Options for intersphinx ------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html | ||
if RTD_BUILD: | ||
intersphinx_mapping = { | ||
'python': ('https://docs.python.org/3', None) | ||
} | ||
|
||
# -- Options for nitpick ------------------------------------------------- | ||
# Don't show warnings for missing python references since these are created via intersphinx during the RTD build | ||
if not RTD_BUILD: | ||
nitpick_ignore_regex = [ | ||
(re.compile(r'^py:class'), re.compile(r'pathlib\..+')), | ||
(re.compile(r'^py:data'), re.compile(r'typing\..+')), | ||
(re.compile(r'^py:class'), re.compile(r'pydantic\..+|.+Constrained(?:Str|Int)Value')), | ||
] |
Oops, something went wrong.