Skip to content

Commit 49df1a3

Browse files
committed
https://github.com/andgineer/docker-amazon-dash-button-hack/issues/27
docs boilerplate
1 parent ef63a7b commit 49df1a3

File tree

8 files changed

+162
-3
lines changed

8 files changed

+162
-3
lines changed

.github/workflows/docs.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# build docs from docstrings and markdown-file in folder docs
2+
# publish them as github pages
3+
#
4+
#note for myself
5+
#
6+
# Do not forget to set git branch `gh-pages` as source for github pages.
7+
# This branch auto-updated by `mkdocs gh-deploy`
8+
#
9+
name: docs
10+
on:
11+
push:
12+
branches:
13+
- main
14+
- master
15+
jobs:
16+
deploy:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v3
20+
- uses: actions/setup-python@v3
21+
with:
22+
python-version: 3.x
23+
- run: |
24+
pip install -r requirements.dev.txt
25+
pip install -r requirements.txt
26+
- run: scripts/build-docs.sh
27+
- run: mkdocs gh-deploy --force

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ secrets/
88
.coverage
99
.dmypy.json
1010
venv/
11+
site/

Makefile

+5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#!make
2+
.PHONY: docs
3+
24
VERSION := $(shell cat src/version.py | cut -d= -f2 | sed 's/\"//g; s/ //')
35
export VERSION
46

@@ -19,3 +21,6 @@ reqs:
1921
bash ./scripts/compile_requirements.sh
2022
pip install -r requirements.txt
2123
pip install -r requirements.dev.txt
24+
25+
docs:
26+
bash ./scripts/build-docs.sh

mkdocs.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
site_name: docker-amazon-dash-button-hack
2+
site_url: https://andgineer.github.io/docker-amazon-dash-button-hack
3+
site_author: Andrey Sorokin
4+
5+
# Repository
6+
repo_name: docker-amazon-dash-button-hack
7+
repo_url: https://github.com/andgineer/docker-amazon-dash-button-hack
8+
edit_uri: edit/master/docs
9+
docs_dir: docs
10+
11+
plugins:
12+
- awesome-pages
13+
- search
14+
15+
theme:
16+
name: readthedocs

requirements.dev.in

+8
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1+
# dependencies list to build requirements.dev.txt with pip-compile (from pip-tools package)
12
pytest
23
types-requests
34
types-python-dateutil
45
coverage
56
pytest-mock
67
requests-mock
78
freezegun
9+
pydocstyle
10+
pre-commit
11+
pip-tools
12+
13+
lazydocs
14+
mkdocs
15+
mkdocs-awesome-pages-plugin

requirements.dev.txt

+92-3
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,99 @@
44
#
55
# pip-compile requirements.dev.in
66
#
7+
bracex==2.4
8+
# via wcmatch
9+
build==1.0.3
10+
# via pip-tools
711
certifi==2023.7.22
812
# via requests
13+
cfgv==3.4.0
14+
# via pre-commit
915
charset-normalizer==3.2.0
1016
# via requests
17+
click==8.1.7
18+
# via
19+
# mkdocs
20+
# pip-tools
21+
# typer
1122
coverage==7.3.1
1223
# via -r requirements.dev.in
24+
distlib==0.3.7
25+
# via virtualenv
1326
exceptiongroup==1.1.3
1427
# via pytest
28+
filelock==3.12.4
29+
# via virtualenv
1530
freezegun==1.2.2
1631
# via -r requirements.dev.in
32+
ghp-import==2.1.0
33+
# via mkdocs
34+
identify==2.5.29
35+
# via pre-commit
1736
idna==3.4
1837
# via requests
1938
iniconfig==2.0.0
2039
# via pytest
40+
jinja2==3.1.2
41+
# via mkdocs
42+
lazydocs==0.4.8
43+
# via -r requirements.dev.in
44+
markdown==3.4.4
45+
# via mkdocs
46+
markupsafe==2.1.3
47+
# via
48+
# jinja2
49+
# mkdocs
50+
mergedeep==1.3.4
51+
# via mkdocs
52+
mkdocs==1.5.2
53+
# via
54+
# -r requirements.dev.in
55+
# mkdocs-awesome-pages-plugin
56+
mkdocs-awesome-pages-plugin==2.9.2
57+
# via -r requirements.dev.in
58+
natsort==8.4.0
59+
# via mkdocs-awesome-pages-plugin
60+
nodeenv==1.8.0
61+
# via pre-commit
2162
packaging==23.1
22-
# via pytest
63+
# via
64+
# build
65+
# mkdocs
66+
# pytest
67+
pathspec==0.11.2
68+
# via mkdocs
69+
pip-tools==7.3.0
70+
# via -r requirements.dev.in
71+
platformdirs==3.10.0
72+
# via
73+
# mkdocs
74+
# virtualenv
2375
pluggy==1.3.0
2476
# via pytest
77+
pre-commit==3.4.0
78+
# via -r requirements.dev.in
79+
pydocstyle==6.3.0
80+
# via -r requirements.dev.in
81+
pyproject-hooks==1.0.0
82+
# via build
2583
pytest==7.4.2
2684
# via
2785
# -r requirements.dev.in
2886
# pytest-mock
2987
pytest-mock==3.11.1
3088
# via -r requirements.dev.in
3189
python-dateutil==2.8.2
32-
# via freezegun
90+
# via
91+
# freezegun
92+
# ghp-import
93+
pyyaml==6.0.1
94+
# via
95+
# mkdocs
96+
# pre-commit
97+
# pyyaml-env-tag
98+
pyyaml-env-tag==0.1
99+
# via mkdocs
33100
requests==2.31.0
34101
# via requests-mock
35102
requests-mock==1.11.0
@@ -38,13 +105,35 @@ six==1.16.0
38105
# via
39106
# python-dateutil
40107
# requests-mock
108+
snowballstemmer==2.2.0
109+
# via pydocstyle
41110
tomli==2.0.1
42-
# via pytest
111+
# via
112+
# build
113+
# pip-tools
114+
# pyproject-hooks
115+
# pytest
116+
typer==0.9.0
117+
# via lazydocs
43118
types-python-dateutil==2.8.19.14
44119
# via -r requirements.dev.in
45120
types-requests==2.31.0.2
46121
# via -r requirements.dev.in
47122
types-urllib3==1.26.25.14
48123
# via types-requests
124+
typing-extensions==4.8.0
125+
# via typer
49126
urllib3==2.0.4
50127
# via requests
128+
virtualenv==20.24.5
129+
# via pre-commit
130+
watchdog==3.0.0
131+
# via mkdocs
132+
wcmatch==8.5
133+
# via mkdocs-awesome-pages-plugin
134+
wheel==0.41.2
135+
# via pip-tools
136+
137+
# The following packages are considered to be unsafe in a requirements file:
138+
# pip
139+
# setuptools

requirements.in

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# dependencies list to build requirements.txt with pip-compile (from pip-tools package)
12
python-dateutil
23
scapy
34
oauth2client

scripts/build-docs.sh

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Create docs in docs/
4+
#
5+
6+
lazydocs \
7+
--output-path="./docs/docstrings" \
8+
--overview-file="README.md" \
9+
--src-base-url="https://github.com/andgineer/docker-amazon-dash-button-hack/blob/master/" \
10+
src
11+
12+
mkdocs build

0 commit comments

Comments
 (0)