Commit Graph
1022 Commits
Author SHA1 Message Date
Dominique Lasserre be26457563 Nested config, devices registry
* All config now nested.
    - Use default config from model field default values. If providers
      should be enabled by default, non-empty default config file could
      be provided again.
    - Environment variable support with EOS_ prefix and __ between levels,
      e.g. EOS_SERVER__EOS_SERVER_PORT=8503 where all values are case
      insensitive.
      For more information see:
      https://docs.pydantic.dev/latest/concepts/pydantic_settings/#parsing-environment-variable-values
    - Use devices as registry for configured devices. DeviceBase as base
      class with for now just initializion support (in the future expand
      to operations during optimization).
    - Strip down ConfigEOS to the only configuration instance. Reload
      from file or reset to defaults is possible.

 * Fix multi-initialization of derived SingletonMixin classes.
2025-01-24 20:05:48 +01:00
Dominique LasserreandBobby Noelte f09658578a Fix docker access. Closes #278
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
* Need to start within container with host 0.0.0.0 to access it later
   on host.
2025-01-24 07:45:40 +01:00
NormannandGitHub 3b142ad514 single_test_optimization: inverter added (#401)
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
2025-01-22 18:04:39 +01:00
Bobby NoelteandGitHub 9c91a64c1b Fix EOSdash startup. (#394)
docker-build / platform-excludes (push) Waiting to run
docker-build / build (push) Blocked by required conditions
docker-build / merge (push) Blocked by required conditions
pre-commit / pre-commit (push) Waiting to run
Run Pytest on Pull Request / test (push) Waiting to run
Revert to EOSdash startup as a sub-process.
Add arguments to control the complete startup of both servers.
Also development reload can now be given as an argument.

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
2025-01-21 19:20:50 +01:00
Bobby NoelteandGitHub e255e97141 Fix Gesamtlast (#398)
docker-build / platform-excludes (push) Waiting to run
docker-build / build (push) Blocked by required conditions
docker-build / merge (push) Blocked by required conditions
pre-commit / pre-commit (push) Waiting to run
Run Pytest on Pull Request / test (push) Waiting to run
Make Gesamtlast endpoint understand the legacy load mesaurement data format.

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
2025-01-21 17:02:48 +01:00
Bobby NoelteandGitHub 43ebbc2e55 Fix gesamtlast_simple (#399)
Legacy endpoint gesamtlast_simple expected yearly energy consumption to be given in Wh SI units.

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
2025-01-21 16:56:42 +01:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
e781d1d446 Bump numpy from 2.2.0 to 2.2.2 (#395)
docker-build / platform-excludes (push) Waiting to run
docker-build / build (push) Blocked by required conditions
docker-build / merge (push) Blocked by required conditions
pre-commit / pre-commit (push) Waiting to run
Run Pytest on Pull Request / test (push) Waiting to run
Bumps [numpy](https://github.com/numpy/numpy) from 2.2.0 to 2.2.2.
- [Release notes](https://github.com/numpy/numpy/releases)
- [Changelog](https://github.com/numpy/numpy/blob/main/doc/RELEASE_WALKTHROUGH.rst)
- [Commits](https://github.com/numpy/numpy/compare/v2.2.0...v2.2.2)

---
updated-dependencies:
- dependency-name: numpy
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-21 01:22:09 +01:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
8c08f55900 Bump pvlib from 0.11.1 to 0.11.2 (#397)
Bumps [pvlib](https://github.com/pvlib/pvlib-python) from 0.11.1 to 0.11.2.
- [Release notes](https://github.com/pvlib/pvlib-python/releases)
- [Commits](https://github.com/pvlib/pvlib-python/compare/v0.11.1...v0.11.2)

---
updated-dependencies:
- dependency-name: pvlib
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-21 00:53:34 +01:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
154bb114ed Bump python-fasthtml from 0.10.3 to 0.12.0 (#396)
Bumps [python-fasthtml](https://github.com/AnswerDotAI/fasthtml) from 0.10.3 to 0.12.0.
- [Release notes](https://github.com/AnswerDotAI/fasthtml/releases)
- [Changelog](https://github.com/AnswerDotAI/fasthtml/blob/main/CHANGELOG.md)
- [Commits](https://github.com/AnswerDotAI/fasthtml/compare/0.10.3...0.12.0)

---
updated-dependencies:
- dependency-name: python-fasthtml
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-21 00:49:19 +01:00
Bobby NoelteandGitHub df2e3f7864 Fix BrightSky date format. (#393)
BrightSky needs date format with 4 digits year and 2 digits month and day.

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
2025-01-20 19:14:35 +01:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
89cd9ca11d Bump deap from 1.4.1 to 1.4.2 (#372)
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
Bumps [deap](https://github.com/DEAP/deap) from 1.4.1 to 1.4.2.
- [Changelog](https://github.com/DEAP/deap/blob/master/doc/releases.rst)
- [Commits](https://github.com/DEAP/deap/commits)

---
updated-dependencies:
- dependency-name: deap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-16 19:40:58 +01:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
af85ea5f27 Bump scikit-learn from 1.6.0 to 1.6.1 (#374)
Bumps [scikit-learn](https://github.com/scikit-learn/scikit-learn) from 1.6.0 to 1.6.1.
- [Release notes](https://github.com/scikit-learn/scikit-learn/releases)
- [Commits](https://github.com/scikit-learn/scikit-learn/compare/1.6.0...1.6.1)

---
updated-dependencies:
- dependency-name: scikit-learn
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-16 19:34:56 +01:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
eeaa41e29e Bump pydantic from 2.10.4 to 2.10.5 (#373)
Bumps [pydantic](https://github.com/pydantic/pydantic) from 2.10.4 to 2.10.5.
- [Release notes](https://github.com/pydantic/pydantic/releases)
- [Changelog](https://github.com/pydantic/pydantic/blob/main/HISTORY.md)
- [Commits](https://github.com/pydantic/pydantic/compare/v2.10.4...v2.10.5)

---
updated-dependencies:
- dependency-name: pydantic
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-16 19:29:06 +01:00
Dominique Lasserre dae1a7ad17 Combine main and feature/config-overhaul
* Merge main with -s ours strategy
2025-01-16 18:51:32 +01:00
NormannandGitHub 98f1105c38 Probability typo fix (#383)
* Propability->Probability
2025-01-16 18:20:39 +01:00
NormannandGitHub 85bbe0b094 fix for #375 (#377)
docker-build / platform-excludes (push) Has been cancelled
docker-build / build (push) Has been cancelled
docker-build / merge (push) Has been cancelled
* fix for #375

* comment
2025-01-14 13:27:51 +01:00
30cb51846d EOS_DIR checks for an existing EOS.config.json (#378)
Co-authored-by: Andre Busche <busche@ismll.de>
2025-01-14 13:27:30 +01:00
NormannandGitHub c024bd51bd tz added (#379) 2025-01-14 13:16:18 +01:00
AndreasandGitHub 10703bbc1b Battery SoC = 0 > set Discharge randomply to 0/1. For longer periods of storage (#366)
docker-build / platform-excludes (push) Waiting to run
docker-build / build (push) Blocked by required conditions
docker-build / merge (push) Blocked by required conditions
* Battery SoC = 0 > hard Discharge Setting Off
2025-01-13 21:47:58 +01:00
Dominique LasserreandGitHub 9ad61f66b2 Cleanup: parameters: extra=forbid, optimize: battery, inverter optional (#361)
* Cleanup: parameters: extra=forbid, optimize: battery, inverter optional

 * Don't allow extra fields for parameters/REST-API (at least for now while
   changing API).
 * Allow both battery and inverter to be set optionally (atm optional
   battery not implemented, no API constraints).
 * inverter: Remove default max_power_wh
 * single_test_optimization: Add more cli-parameters

* Workflow docker-build: Don't try to authenticate for PRs

 * Secrets are not available anyway for forks.
2025-01-13 21:44:17 +01:00
NormannandGitHub 745086c2eb Visualisation footer with current date and time (#364)
* footer with date and version

* ruff

* replace toml module with build in

* using re to extract the string

* optimize re usage

* use of use pendulum in Akkudoktor-EOS

* create_line_chart_date function added

* replace datetime with pendulum

* align ax2 with ax1 and 0 first point

* dynamic ticks

* all charts with dates

* style changes

* mypy fixes

* fix test

* fixed current time
2025-01-13 21:42:52 +01:00
NormannandGitHub d317aa9937 Feature Branch: Generation Fitness plot (#362)
docker-build / platform-excludes (push) Has been cancelled
docker-build / build (push) Has been cancelled
docker-build / merge (push) Has been cancelled
* Generation Fitness plot

* comment change

* -

* print on debug, add_json_page, add_text_page

* set debug for example

* known seed if debug

* removed unused code

* -

* bugfix empty page
2025-01-12 14:33:02 +01:00
Dominique LasserreandGitHub b6111517ca workflow: docker-build upload to DockerHub (#318) (#363)
docker-build / platform-excludes (push) Waiting to run
docker-build / build (push) Blocked by required conditions
docker-build / merge (push) Blocked by required conditions
* workflow: docker-build upload to DockerHub
   - Upload on release, tag, push to main.
   - Build on pr to main (amd64 only).
 * docker:
   - Update documentation.
   - Temporarily set akkudoktor/eos:main in compose.yml (with
     releases/tags it should be replaced by latest again)
2025-01-12 00:52:42 +01:00
NormannandGitHub 1bf49c8c52 feature: Pv forecast refactoring (#354)
* refactoring
2025-01-12 00:00:14 +01:00
NormannandGitHub b43bf105aa test_elecpriceakkudoktor bugfix (#360)
* test_elecpriceakkudoktor bugfix

* remove print

* warning
2025-01-10 23:20:55 +01:00
Bobby NoelteandGitHub 34d8e88771 Rename FastAPI server to EOS. (#355)
Rename FastAPI server to `eos` and FastHTML server to `eosdash`.

Make an user easily identify what server is meant. FastAPI and FastHTML are
implementation details that may confuse the non-technical user.

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
2025-01-09 16:54:49 +01:00
Bobby NoelteandGitHub 1d1fa9585a Add Documentation 3 (#353)
Add documentation that covers:

- Architecture
- Optimization (only empty template)
- Integration.

Add some PNG figures for architecture documentation including open document
format sources to enable document maintainance.

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
2025-01-09 16:52:57 +01:00
NormannandAndreas 05a1ade3a3 needed_prediction_hours fixed 2025-01-09 12:15:00 +01:00
NormannandAndreas ca6b4f89ec revert changes used for testing 2025-01-09 12:15:00 +01:00
NormannandAndreas bfb8db6d56 remove print 2025-01-09 12:15:00 +01:00
NormannandAndreas 902a8cbacd test fix 2025-01-09 12:15:00 +01:00
NormannandAndreas 8c41d291bd review improvements 2025-01-09 12:15:00 +01:00
NormannandAndreas ed8c6580ee restrict data for history array 2025-01-09 12:15:00 +01:00
NormannandAndreas df54303284 comments, cleanup 2025-01-09 12:15:00 +01:00
NormannandAndreas b16a545379 test output 2025-01-09 12:15:00 +01:00
NormannandAndreas ad7d110064 cases added 2025-01-09 12:15:00 +01:00
NormannandAndreas c334cf4b33 amount_datasets cases added 2025-01-09 12:15:00 +01:00
NormannandAndreas f3d3eac500 initially working 2025-01-09 12:15:00 +01:00
NormannandAndreas 4d29261914 day end 2025-01-09 12:15:00 +01:00
NormannandAndreas aec2171570 median 2025-01-09 12:15:00 +01:00
NormannandAndreas 3121490a23 mypy, req 2025-01-09 12:15:00 +01:00
NormannandAndreas e0bdbdcb81 base functions 2025-01-09 12:15:00 +01:00
NormannandAndreas 6bcae41213 comment 2025-01-09 12:15:00 +01:00
NormannandAndreas 4c0afb6a2a initial commit 2025-01-09 12:15:00 +01:00
Bobby NoelteandGitHub d2f6e9866d Assert text files are in utf8 (#350)
Read and write text files with utf8 encoding.

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
2025-01-07 19:31:44 +01:00
Dominique LasserreandGitHub ef60f5b9f5 Tests: Ignore config in current test execution directory. Closes #342 (#345) 2025-01-06 23:50:20 +01:00
Bobby NoelteandGitHub 0ac31348f0 Add minimum historic prediction hours for prediction providers. (#346)
Prediction providers can now individually set the minimum historic prediction hours
to be kept in the data records. This setting supersedes any lower setting given by the
configuration `prediction_historic_hours`.

As a help for the future change of ElecPriceAkkudoktor, the minimum historic hours for
this provider is set to 5 * 7 * 24 hours.

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
2025-01-06 23:05:08 +01:00
Dominique LasserreandGitHub 10acc705ec Initial readthedocs config (#339)
* Add links to documentation.
 * Drop unused file class_soc_calc.
2025-01-06 19:34:15 +01:00
Bobby NoelteandGitHub 214768795f Adapt documentation generation to be compliant to ReadTheDocs and Windows. (#341)
Use documentation generation tools that are available for Windows and Linux.
Use python instead of shell scripts to generate documentation.

For ReadTheDocs make generated documentation content static to avoid
running scripts outside of the docs/ path which is the default path for ReadTheDOcs.

Add tests that check if generated content does go out of sync with latest source.

Use tabs to show commands for Windows and Linux to improve user experience.

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
2025-01-06 16:27:57 +01:00
Bobby NoelteandGitHub d4e31d556a Add Documentation 2 (#334)
Add documentation that covers:

- configuration
- prediction

Add Python scripts that support automatic documentation generation for
configuration data defined with pydantic.

Adapt EOS configuration to provide more methods for REST API and
automatic documentation generation.

Adapt REST API to allow for EOS configuration file load and save.
Sort REST API on generation of openapi markdown for docs.

Move logutil to core/logging to allow configuration of logging by standard config.

Make Akkudoktor predictions always start extraction of prediction data at start of day.
Previously extraction started at actual hour. This is to support the code that assumes
prediction data to start at start of day.

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
2025-01-05 14:41:07 +01:00