Commit Graph
29 Commits
Author SHA1 Message Date
AndreasandAndreas bcdddd1d23 PreCommit Fixed 2024-10-22 10:39:10 +02:00
AndreasandAndreas 5d51d0a676 Tests fixed 2024-10-22 10:39:10 +02:00
AndreasandAndreas e455e9a18a class_ems: AC / DC Charging
class_optimize: Timing Bugs fixed
class_numpy_encoder: JSON Encoder with Numpy support
visualize: AC / DC / Discharge
test_class_ems_2: New Test for AC / DC charging decision
2024-10-22 10:39:10 +02:00
ChrisandAndreas 141257f514 Ruff format 2024-10-11 09:07:53 +02:00
Dominique LasserreandAndreas b620250536 Streamline Dockerfile, remove unused deps
* Dockerfile: Use non-root user, buildx cache, setup for readonly
   container, remove unused apt deps.
   For now don't install pip package and keep development flask server
   as this will be replaced in the future (fastapi). Then a proper
   webserver (e.g. nginx) should be used and the pip package can be
   created and deployed just to the run-stage (with the webserver).
 * docker-compose: Set to readonly (anonymous volumes declared in
   Dockerfile should maintain all writable data).
   Mount config.py for easier development. Should be replaced by
   environment support for all config file variables.
 * Remove unused runtime dependencies: mariadb, joblib, pytest,
   pytest-cov.
 * Move pytest-cov to dev dependencies.
 * Add output_dir to config.py.
 * Fix visualization_results.pdf endpoint.
 * Update docs.
2024-10-11 08:39:14 +02:00
Bobby NoelteandAndreas 54347ee240 Fix test server startup detection.
Startup of the test server is detected by a scan on the server logging output to stdout.
Startup is now detected on the late log output.

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
2024-10-10 13:53:28 +02:00
Dominique LasserreandAndreas a41aea824c Fix test_server Closes #147
* Don´t rely on calculation per specific day, just verify length.
2024-10-10 07:41:42 +02:00
Michael OsthegeandAndreas 3c1482c2c0 Activate optimization test with 3 generations 2024-10-09 17:05:36 +02:00
Michael OsthegeandAndreas b6d0ef22f3 Remove and ignore visualization side-effect outputs 2024-10-09 17:05:36 +02:00
NormannandAndreas 929d7e0a75 JSON files for test_class_optimize.py
Update test_class_optimize.py

added Skipped per default

Fix optimization test

Fix optimization test
2024-10-09 17:05:36 +02:00
AndreasandAndreas 9e3dd27a7b Ruff 2024-10-09 16:59:50 +02:00
AndreasandAndreas 565e721d68 [BUG]: class_ems nd_array not JSON serializable
Big Bugfix - not sure if everything works
2024-10-09 16:59:50 +02:00
Bobby NoelteandAndreas 4284119352 Add test for server
A test fixture to start the server and a first test case is added.

The fixture tries to assure that the server is installed and running.
If it is not installed the fixture uses pip to install it.

The server and the installation by pip is run bei the same Python
executable that also runs pytest.

The github workflow for pytest is adapted to install akkudoktor-eos.

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
2024-10-08 19:22:16 +02:00
NormannandAndreas a5a492b55e revert check in test for ems 2024-10-08 18:55:51 +02:00
Bobby NoelteandAndreas ba31734bd8 Adapt tests to package directory structure.
Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
2024-10-07 08:12:33 +02:00
AndreasandAndreas b7dbd7e475 min_soc (was killed by someone else, pls dont force push!) 2024-10-06 16:00:07 +02:00
NormannandAndreas d8a46eb5d3 fixed optimize test
fixed first our values for optimize test
2024-10-06 15:20:37 +02:00
AndreasandAndreas b8d07db483 Pre Commit 2024-10-06 14:35:11 +02:00
AndreasandAndreas cc270e71bc - Home Appliances fixed
- Unittest with Home Appliances
2024-10-06 14:35:11 +02:00
AndreasandAndreas 584ab225f1 Unittest includes Home Appliances 2024-10-06 14:35:11 +02:00
NormannandAndreas fc0ee64521 Update test_class_ems.py 2024-10-06 14:35:11 +02:00
a1c071c1a8 Heat pump: Tests, Translation, Docstrings, Relocation (#89)
* Add first unit test for heatpump COP calculation

* Translate to english,

add type hints, improve unit tests.

* Run pre-commit

* Apply suggestions from code review

Co-authored-by: Michael Osthege <michael.osthege@outlook.com>

* Remove conftest file

---------

Co-authored-by: Michael Osthege <michael.osthege@outlook.com>
2024-10-06 01:06:08 +02:00
NormannandDaniel Molkentin 75d87aa94a test for class_optimize in PR #88
Test meant for class_optimize.
Will only work with PR #88 since the old class has no way to use a fixed random seed.
2024-10-05 23:54:05 +02:00
Michael OsthegeandAndreas f1bf01b381 Fix code style 2024-10-04 11:51:10 +02:00
AndreasandAndreas 2f31fe6669 English + Ruff 2024-10-04 11:04:50 +02:00
AndreasandAndreas 2e82cad052 Unittest EMS 2024-10-04 11:04:50 +02:00
Michael OsthegeandAndreas a4d178d250 Apply isort and ruff code style 2024-10-03 17:28:49 +02:00
AndreasandAndreas 811edf9ad1 unittest -> pytest 2024-10-03 09:57:36 +02:00
FortriebandAndreas d1e5c344c0 Add first unit test for heatpump COP calculation 2024-10-03 09:57:36 +02:00