Skip to content

Commit 2669a2c

Browse files
MaStrclaude
andauthored
Migrate GitHub wiki into MkDocs documentation site (#377)
* Migrate GitHub wiki into MkDocs documentation site Move all 13 wiki pages into a structured docs/ tree (getting-started, configuration, features, integrations, development) so the repository becomes the single source of truth for documentation. - Add mkdocs.yml with Material theme and navigation - Add docs deploy workflow publishing to GitHub Pages on push to main - Add 'docs' optional dependency group (mkdocs-material) - Vendor externally hosted images into docs/assets - Rewrite wiki-style and stale fork-wiki links to relative doc paths - Fix 'Price-difference-calcualtion' filename typo - Replace docs/WIKI_peak_shaving.md with the newer wiki version - Point README and config template links to the new docs site Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Scope ASCII-only rule to source code, update docs contribution guideline The ASCII-only rule applies to source code and log messages, not to documentation in docs/. Replace the obsolete WIKI_ prefix workflow with the MkDocs-based docs/ workflow. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent 075e3c4 commit 2669a2c

25 files changed

Lines changed: 2725 additions & 187 deletions

.github/copilot-instructions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This is a Python based repository providing an application for controlling batte
44

55
### Required Before Each Commit
66

7-
- Only use ASCII characters in code, log messages, and documentation. Avoid non-ASCII characters to ensure compatibility and readability across different environments.
7+
- Only use ASCII characters in source code and log messages. Avoid non-ASCII characters to ensure compatibility and readability across different environments. This rule does not apply to documentation in `docs/`.
88
- Remove excessive whitespaces.
99
- Follow PEP8 standards. Use autopep8 for that.
1010
- Check against pylint. Target score is like 9.0-9.5, if you can achieve 10, do it.
@@ -44,5 +44,5 @@ This is a Python based repository providing an application for controlling batte
4444
4. Document public APIs and complex logic. Suggest changes to the `docs/` folder when appropriate
4545
5. Lay test scripts for verification and simple testing into the folder `scripts`.
4646
6. Never commit content of `tmp`.
47-
7. If you have new documentation for the wiki, add files to the `docs/` folder. Prefix is `WIKI_`.
47+
7. User documentation lives in the `docs/` folder and is published via MkDocs to https://mastr.github.io/batcontrol/ — add or update pages there and register new pages in `mkdocs.yml`.
4848
8. Ensure compatibility with supported Python versions (3.9 to 3.13)

.github/workflows/docs.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Deploy Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'docs/**'
9+
- 'mkdocs.yml'
10+
- '.github/workflows/docs.yml'
11+
workflow_dispatch:
12+
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
# Allow only one concurrent deployment, do not cancel in-progress runs.
19+
concurrency:
20+
group: pages
21+
cancel-in-progress: false
22+
23+
jobs:
24+
build:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v4
29+
30+
- name: Set up Python
31+
uses: actions/setup-python@v5
32+
with:
33+
python-version: '3.12'
34+
35+
- name: Install documentation dependencies
36+
run: pip install "mkdocs-material>=9.5,<10"
37+
38+
- name: Build documentation
39+
run: mkdocs build --strict
40+
41+
- name: Upload Pages artifact
42+
uses: actions/upload-pages-artifact@v3
43+
with:
44+
path: site
45+
46+
deploy:
47+
needs: build
48+
runs-on: ubuntu-latest
49+
environment:
50+
name: github-pages
51+
url: ${{ steps.deployment.outputs.page_url }}
52+
steps:
53+
- name: Deploy to GitHub Pages
54+
id: deployment
55+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,3 +186,4 @@ bin
186186
lib64
187187
lib
188188

189+
site/

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ src/batcontrol/
2828

2929
## Known Pitfalls
3030

31-
- ASCII-only in all files — no umlauts, special chars, emoji, even in log messages.
31+
- ASCII-only in source code — no umlauts, special chars, emoji, even in log messages. Does not apply to documentation in `docs/`.
3232
- Peak shaving config is nested inside calculation parameters (not top-level).
3333
- `§14a EnWG` dynamic network fees live in `dynamictariff/network_fees.py`.
3434
- `resilient_wrapper.py` wraps inverter calls — test with the wrapper, not the raw backend.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ To integrate batcontrol with Home Assistant, use the following repository: [batc
55
[![Docker Image CI](https://github.com/MaStr/batcontrol/actions/workflows/docker-image.yml/badge.svg?branch=main)](https://github.com/MaStr/batcontrol/actions/workflows/docker-image.yml)
66

77

8-
[Wiki/Documentation](https://github.com/MaStr/batcontrol/wiki)
8+
[Documentation](https://mastr.github.io/batcontrol/)
99

1010
## Prerequisites:
1111

config/batcontrol_config_dummy.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#--------------------------
22
# Batcontrol Configuration
3-
# See more Details in: https://github.com/MaStr/batcontrol/wiki/Batcontrol-Configuration
3+
# See more Details in: https://mastr.github.io/batcontrol/configuration/batcontrol-configuration/
44
#--------------------------
55
timezone: Europe/Berlin #your time zone. not optional.
66
time_resolution_minutes: 60 # Time resolution for forecasts: 15 (quarter-hourly) or 60 (hourly). Default: 60
@@ -23,7 +23,7 @@ battery_control:
2323

2424
#--------------------------
2525
# Battery Control Expert Tuning Parameters
26-
# See more Details in: https://github.com/MaStr/batcontrol/wiki/battery_control_expert
26+
# See more Details in: https://mastr.github.io/batcontrol/features/battery-control-expert/
2727
#--------------------------
2828
battery_control_expert:
2929
charge_rate_multiplier: 1.1 # Increase (>1) calculated charge rate to compensate charge inefficiencies.
@@ -69,7 +69,7 @@ peak_shaving:
6969

7070
#--------------------------
7171
# Inverter
72-
# See more Details in: https://github.com/MaStr/batcontrol/wiki/Inverter-Configuration
72+
# See more Details in: https://mastr.github.io/batcontrol/configuration/inverter-configuration/
7373
#
7474
# IMPORTANT: This configuration uses a "dummy" inverter for demonstration purposes.
7575
# The dummy inverter returns static values to make batcontrol work out of the box.
@@ -110,7 +110,7 @@ inverter:
110110

111111
#--------------------------
112112
# Dynamic Tariff Provider
113-
# See more Details in: https://github.com/MaStr/batcontrol/wiki/Dynamic-tariff-provider
113+
# See more Details in: https://mastr.github.io/batcontrol/configuration/dynamic-tariff-provider/
114114
#--------------------------
115115
utility:
116116
type: awattar_de # [tibber, awattar_at, awattar_de, evcc, energyforecast, tariff_zones]
@@ -148,7 +148,7 @@ dynamic_network_fees:
148148

149149
#--------------------------
150150
# MQTT API
151-
# See more Details in: https://github.com/MaStr/batcontrol/wiki/MQTT-API
151+
# See more Details in: https://mastr.github.io/batcontrol/integrations/mqtt-api/
152152
#--------------------------
153153
mqtt:
154154
enabled: false
@@ -170,7 +170,7 @@ mqtt:
170170

171171
#--------------------------
172172
# Forecast Solar
173-
# See more Details in: https://github.com/MaStr/batcontrol/wiki/Solar-Forecast
173+
# See more Details in: https://mastr.github.io/batcontrol/configuration/solar-forecast/
174174
#
175175
# Supported providers:
176176
# - fcsolarapi: Third-party solar forecast API (configured below, default)
@@ -205,7 +205,7 @@ pvinstallations:
205205

206206
#--------------------------
207207
# Forecast Consumption
208-
# See more Details in: https://github.com/MaStr/batcontrol/wiki/Consumption-forecast
208+
# See more Details in: https://mastr.github.io/batcontrol/configuration/consumption-forecast/
209209
#
210210
# Option 1: CSV-based forecast (default)
211211
# Option 2: HomeAssistant API-based forecast
@@ -232,7 +232,7 @@ consumption_forecast:
232232
#--------------------------
233233
# evcc connection
234234
# listen to evcc mqtt messages to lock the battery if the car is charging
235-
# See more Details in: https://github.com/MaStr/batcontrol/wiki/evcc-connection
235+
# See more Details in: https://mastr.github.io/batcontrol/integrations/evcc-connection/
236236
#--------------------------
237237
evcc:
238238
enabled: false

docs/WIKI_peak_shaving.md

Lines changed: 0 additions & 175 deletions
This file was deleted.
113 KB
Loading
29.6 KB
Loading

0 commit comments

Comments
 (0)