mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2025-11-21 04:46:31 +00:00
Some checks failed
docker-build / platform-excludes (push) Has been cancelled
pre-commit / pre-commit (push) Has been cancelled
Run Pytest on Pull Request / test (push) Has been cancelled
docker-build / build (push) Has been cancelled
docker-build / merge (push) Has been cancelled
Close stale pull requests/issues / Find Stale issues and PRs (push) Has been cancelled
Improve documentation generation and add tests for documentation. Extend sphinx by todo directive. The configuration table is now split into several tables. The test is adapted accordingly. There is a new test that checks the docstrings to be compliant to the RST format as used by sphinx to create the documentation. We can not use Markdown in docstrings. The docstrings are adapted accordingly. An additional test checks that the documentation can be build with sphinx. This test takes very long is only enabled in full run (aka. ci) mode. Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
43 lines
1.5 KiB
Markdown
43 lines
1.5 KiB
Markdown
## General Prediction Configuration
|
|
|
|
This class provides configuration for prediction settings, allowing users to specify
|
|
parameters such as the forecast duration (in hours).
|
|
Validators ensure each parameter is within a specified range.
|
|
|
|
Attributes:
|
|
hours (Optional[int]): Number of hours into the future for predictions.
|
|
Must be non-negative.
|
|
historic_hours (Optional[int]): Number of hours into the past for historical data.
|
|
Must be non-negative.
|
|
|
|
Validators:
|
|
validate_hours (int): Ensures `hours` is a non-negative integer.
|
|
validate_historic_hours (int): Ensures `historic_hours` is a non-negative integer.
|
|
|
|
<!-- pyml disable line-length -->
|
|
:::{table} prediction
|
|
:widths: 10 20 10 5 5 30
|
|
:align: left
|
|
|
|
| Name | Environment Variable | Type | Read-Only | Default | Description |
|
|
| ---- | -------------------- | ---- | --------- | ------- | ----------- |
|
|
| historic_hours | `EOS_PREDICTION__HISTORIC_HOURS` | `Optional[int]` | `rw` | `48` | Number of hours into the past for historical predictions data |
|
|
| hours | `EOS_PREDICTION__HOURS` | `Optional[int]` | `rw` | `48` | Number of hours into the future for predictions |
|
|
:::
|
|
<!-- pyml enable line-length -->
|
|
|
|
<!-- pyml disable no-emphasis-as-heading -->
|
|
**Example Input/Output**
|
|
<!-- pyml enable no-emphasis-as-heading -->
|
|
|
|
<!-- pyml disable line-length -->
|
|
```json
|
|
{
|
|
"prediction": {
|
|
"hours": 48,
|
|
"historic_hours": 48
|
|
}
|
|
}
|
|
```
|
|
<!-- pyml enable line-length -->
|