mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2025-08-25 23:11:14 +00:00
* Update README/CONTRIBUTING Closes #180 * Remove duplicated files in docs/develop and copy them from project root to there on documentation generation. * Makefile: Use fastapi to start server, set port to 8503
This commit is contained in:
committed by
GitHub
parent
b3914ab16b
commit
edfe309a26
@@ -1,48 +0,0 @@
|
||||
# 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/
|
||||
```
|
@@ -1,90 +0,0 @@
|
||||
% SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# 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
|
||||
```
|
||||
|
||||
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
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Configuration
|
||||
|
||||
---
|
||||
|
||||
This project uses a `config.json` file to manage configuration settings.
|
||||
|
||||
#### Default Configuration
|
||||
|
||||
A default configuration file `default.config.json` is provided. This file contains all the necessary configuration keys with their default values.
|
||||
|
||||
#### Custom Configuration
|
||||
|
||||
Users can specify a custom configuration directory by setting the environment variable `EOS_DIR`.
|
||||
|
||||
- If the directory specified by `EOS_DIR` contains an existing `config.json` file, the application will use this configuration file.
|
||||
- If the `config.json` file does not exist in the specified directory, the `default.config.json` file will be copied to the directory as `config.json`.
|
||||
|
||||
#### Configuration Updates
|
||||
|
||||
If the configuration keys in the `config.json` file are missing or different from those in `default.config.json`, they will be automatically updated to match the default settings, ensuring that all required keys are present.
|
||||
|
||||
### Run server
|
||||
|
||||
To use the system, run `flask_server.py`, which starts the server:
|
||||
|
||||
```bash
|
||||
./flask_server.py
|
||||
```
|
Reference in New Issue
Block a user