Add documentation infrastructure

Add documentation infrastructure and some sample content.

Documentation is generated by sphinx using extensions to support
Markdown an restructuredText for simple documentation writing.

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
This commit is contained in:
Bobby Noelte
2024-10-10 08:33:21 +02:00
committed by Andreas
parent 73e537dabb
commit 59dcf8c459
10 changed files with 237 additions and 6 deletions

View File

@@ -0,0 +1,48 @@
# Contributing to EOS
Thanks for taking the time to read this!
The `EOS` project is in early development, therefore we encourage contribution in the following ways:
## Bug Reports
Please report flaws or vulnerabilities in the [GitHub Issue Tracker]((https://github.com/Akkudoktor-EOS/EOS/issues)) using the corresponding issue template.
## Ideas & Features
Please first discuss the idea in a [GitHub Discussion](https://github.com/Akkudoktor-EOS/EOS/discussions) or the [Akkudoktor Forum](https://www.akkudoktor.net/forum/diy-energie-optimierungssystem-opensource-projekt/) before opening an issue.
There are just too many possibilities and the project would drown in tickets otherwise.
## Code Contributions
We welcome code contributions and bug fixes via [Pull Requests](https://github.com/Akkudoktor-EOS/EOS/pulls).
To make collaboration easier, we require pull requests to pass code style and unit tests.
### Code Style
Our code style checks use [`pre-commit`](https://pre-commit.com).
```bash
pip install -r requirements.txt
```
To run formatting automatically before every commit:
```bash
pre-commit install
```
Or run them manually:
```bash
pre-commit --all
```
### Tests
Use `pytest` to run tests locally:
```bash
python -m pytest -vs --cov modules --cov-report term-missing tests/
```

View File

@@ -0,0 +1,84 @@
..
SPDX-License-Identifier: Apache-2.0
.. _akkudoktoreos_getting_started:
Getting Started
###############
Installation
************
`Good installation guide <https://meintechblog.de/2024/09/05/andreas-schmitz-joerg-installiert-mein-energieoptimierungssystem/>`_
The project requires Python 3.10 or newer.
Quick Start Guide
-----------------
On Linux (Ubuntu/Debian):
```bash
sudo apt install make
```
On MacOS (requires `Homebrew <https://brew.sh>`_):
```zsh
brew install make
```
Next, adjust `config.py`.
The server can then be started with `make run`. A full overview of the main shortcuts is given by `make help`.
Detailed Instructions
---------------------
All necessary dependencies can be installed via `pip`. Clone the repository and install the required packages with:
```bash
git clone https://github.com/Akkudoktor-EOS/EOS
cd EOS
```
Next, create a virtual environment. This serves to store the Python dependencies, which we will install later using `pip`:
```bash
virtualenv .venv
```
Finally, install the Python dependencies for EOS:
```bash
.venv/bin/pip install -r requirements.txt
```
To always use the Python version from the virtual environment, you should activate it before working in EOS:
```bash
source .venv/bin/activate
```
(for Bash users, the default under Linux) or
```zsh
. .venv/bin/activate
```
(if using zsh, primarily for MacOS users).
If `pip install` fails to install the mariadb dependency, the following commands may help:
* Debian/Ubuntu: `sudo apt-get install -y libmariadb-dev`
* MacOS/Homebrew: `brew install mariadb-connector-c`
Followed by a renewed `pip install -r requirements.txt`.
Usage
*****
Adjust `config.py`.
To start the server:
```bash
make run
```