Commit Graph
798 Commits
Author SHA1 Message Date
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
Dominique LasserreandGitHub eabc2a795a workflow: docker-build upload to DockerHub (#318)
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
* workflow: docker-build upload to DockerHub
   - Upload on release, tag, push to main.
   - Build on pr to main (amd64 only).
 * docker: temporarily disable read-only container Closes #278
   - Update documentation.
   - Temporarily set akkudoktor/eos:main in compose.yml (with
     releases/tags it should be replaced by latest again)
2025-01-04 01:24:37 +01:00
Dominique LasserreandGitHub 03ec729e50 Update regular_grid_interpolator.pkl to scipy 1.15 Closes #335 (#336) (#337) 2025-01-04 00:52:20 +01:00
Dominique LasserreandGitHub 64e62022e2 Update regular_grid_interpolator.pkl to scipy 1.15 Closes #335 (#336)
pre-commit / pre-commit (push) Waiting to run
Run Pytest on Pull Request / test (push) Waiting to run
2025-01-04 00:42:19 +01:00
Bobby NoelteandGitHub 1866055478 Add documentation. (#321)
Add documentation that covers:

- Prediction
- Measuremnt
- REST API

Add Python scripts that support automatic documentation generation using the Sphinx
sphinxcontrib.eval extension.

Add automatic update/ test for REST API documentation.

Filter proxy endpoints from REST API documentation.

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
2025-01-03 00:31:20 +01:00
Dominique LasserreandGitHub 4cb6dc7270 Fix ruff (#328) 2025-01-02 18:34:55 +01:00
AndreasandAndreas 1b597d1e0f Test update 2025-01-02 15:29:01 +01:00
AndreasandAndreas 1ccedea984 Fix URL in elecprice 2025-01-02 15:29:01 +01:00
Bobby NoelteandGitHub ed79cacf63 Fix PVForecast settings active plane detection. (#320)
Detect active PV planes by pvforecast_surface_tilt and pvforecast_surface_azimuth to be non None. Assure by default these configuration values are None.

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
2025-01-02 12:40:12 +01:00
NormannandGitHub d695e08bd0 filepath fix for load_forecast main function (#322)
pre-commit / pre-commit (push) Has been cancelled
Run Pytest on Pull Request / test (push) Has been cancelled
2025-01-01 18:44:26 +01:00
Dominique LasserreandGitHub 69eac26885 Prediction: Support manual update (#319)
* Provide /v1/prediction/update and
   /v1/prediction/update/{provider_id} as POST endpoints to update
   provider data.
 * Update description for deprecated endpoints how to use new API.
2025-01-01 16:10:34 +01:00
wenzulandGitHub 36916f71b4 Change required python version to 3.10 (#297)
pre-commit / pre-commit (push) Waiting to run
Run Pytest on Pull Request / test (push) Waiting to run
2025-01-01 12:33:39 +01:00
NormannandGitHub 9dda128caf remove temp. test skip (#313) 2025-01-01 12:28:19 +01:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
25b174952d Bump numpy from 2.2.0 to 2.2.1 (#305)
Bumps [numpy](https://github.com/numpy/numpy) from 2.2.0 to 2.2.1.
- [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.1)

---
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>
2024-12-31 16:27:31 +01:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
19c1f44f09 Bump mypy from 1.13.0 to 1.14.1 (#306)
Bumps [mypy](https://github.com/python/mypy) from 1.13.0 to 1.14.1.
- [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/python/mypy/compare/v1.13.0...v1.14.1)

---
updated-dependencies:
- dependency-name: mypy
  dependency-type: direct:development
  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>
2024-12-31 16:26:01 +01:00
NormannandGitHub ee75670713 temp. skip test_server (#311)
* temp. skip test_server
2024-12-31 15:58:10 +01:00
Dominique LasserreandGitHub 05ed5ab836 Update README.md (#303)
- Development on feature/config-overhaul
2024-12-30 23:46:20 +01:00
Bobby NoelteandGitHub c0ea13d0f4 Fix2 electricity price prediction. (#296)
Normalize electricity price prediction to €/Wh.
Provide electricity price prediction by €/kWh for convenience.

Allow to configure electricity price charges by €/kWh.

Also added error page to fastapi rest server to get rid of annoying
unrelated fault messages during testing.

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
2024-12-30 21:29:50 +01:00
NormannandGitHub 45079ca29c python version 3.10 for feature branch (#298)
* switch to python version 3.10 from 3.9 because of Numpy requirements
2024-12-30 14:26:12 +01:00
Dominique LasserreandGitHub 75987db9e1 Reasonable defaults, isolate tests, EOS_LOGGING_LEVEL, EOS_CONFIG_DIR
* Add EOS_CONFIG_DIR to set config dir (relative path to EOS_DIR or
   absolute path).
    - config_folder_path read-only
    - config_file_path read-only
 * Default values to support app start with empty config:
    - latitude/longitude (Berlin)
    - optimization_ev_available_charge_rates_percent (null, so model
      default value is used)
    - Enable Akkudoktor electricity price forecast (docker-compose).
 * Fix some endpoints (empty data, remove unused params, fix types).
 * cacheutil: Use cache dir. Closes #240
 * Support EOS_LOGGING_LEVEL environment variable to set log level.
 * tests: All tests use separate temporary config
    - Add pytest switch --check-config-side-effect to check user
      config file existence after each test. Will also fail if user config
      existed before test execution (but will only check after the test has
      run).
      Enable flag in github workflow.
    - Globally mock platformdirs in config module. Now no longer required
      to patch individually.
      Function calls to config instance (e.g. merge_settings_from_dict)
      were unaffected previously.
 * Set Berlin as default location (default config/docker-compose).
2024-12-30 13:41:39 +01:00
Dominique Lasserre 267a9bf427 pvforecast: Some values optional. Closes #292 (#293)
* temperature, relativehumidity_2m, windspeed_10m can be null
 * prettify pv_forecast_input_1.json (and add null value)
2024-12-30 13:07:08 +01:00
Dominique Lasserre b386c4be70 inverter test: Mock SelfConsumptionProbabilityInterpolator 2024-12-30 13:07:08 +01:00
Dominique Lasserre e8a47af04e simulate: more verbose validation 2024-12-30 13:07:08 +01:00
AndreasandDominique Lasserre 86d2173a4d Awattar Price changed to more precise value; if SoC=0 discharge =1 forced. Exp Avg for siple Price Forecast
* Discharge Mask Bug, Tests updated, simple Price Forecast with linear weighting
 * Price Forecast with linear weighting, last value = highest weighting Discharge enforce when soc = 0 -> mask bug
2024-12-30 13:07:08 +01:00
dependabot[bot]Dominique Lasserredependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
9881fe6da1 Bump matplotlib from 3.9.2 to 3.10.0 (#251)
Bumps [matplotlib](https://github.com/matplotlib/matplotlib) from 3.9.2 to 3.10.0.
- [Release notes](https://github.com/matplotlib/matplotlib/releases)
- [Commits](https://github.com/matplotlib/matplotlib/compare/v3.9.2...v3.10.0)

---
updated-dependencies:
- dependency-name: matplotlib
  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>
2024-12-30 13:07:08 +01:00