Skip to content

Commit 5a994b0

Browse files
authored
Merge pull request #160 from kevincar/102-need-notify-example-and-documentation
102 need notify example and documentation
2 parents 7fa5b68 + 39c74c6 commit 5a994b0

26 files changed

+887
-341
lines changed

.github/workflows/build-and-test.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
python -m pip install --upgrade pip
3232
pip install flake8 mypy pytest
3333
pip install -r requirements.txt
34+
pip install -r docs/requirements.txt
3435
- name: Install bluetooth ctl linux
3536
if: runner.os == 'Linux'
3637
run: |
@@ -52,6 +53,10 @@ jobs:
5253
if: runner.os != 'Windows'
5354
run: |
5455
mypy bless
56+
- name: Build Sphinx docs
57+
if: runner.os == 'Linux' && matrix.python-version == '3.11'
58+
run: |
59+
sphinx-build -b html docs docs/_build/html
5560
- name: Test with pytest
5661
run: |
5762
python -m pytest

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
/dist
55
.mypy_cache/
66
*~
7+
docs/_build

.readthedocs.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: 2
2+
3+
build:
4+
os: ubuntu-22.04
5+
tools:
6+
python: "3.11"
7+
8+
sphinx:
9+
configuration: docs/conf.py
10+
11+
python:
12+
install:
13+
- requirements: docs/requirements.txt

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ Test](https://github.com/kevincar/bless/actions/workflows/build-and-test.yml/bad
77
![PyPI - Downloads](https://img.shields.io/pypi/dm/bless)
88
[![Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
99

10+
Documentation: https://bless.readthedocs.io/en/latest/
11+
1012
Bless is an acronym for Bluetooth Low Energy (BLE) Server Supplement.
1113

1214
Bless provides an OS-independent python package for creating a BLE Generic

bless/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
# type: ignore
1+
import os
22
import sys
33

4-
if sys.platform == "darwin":
4+
# Avoid OS-specific imports during docs builds.
5+
if os.environ.get("BLESS_DOCS_BUILD"):
6+
pass
7+
elif sys.platform == "darwin":
58

69
# Server
710
from bless.backends.corebluetooth.server import ( # noqa: F401

0 commit comments

Comments
 (0)