Commit Graph
128 Commits
Author SHA1 Message Date
AndreasandAndreas 45a3bcdb09 Tests fixed 2024-10-22 10:39:10 +02:00
AndreasandAndreas 87ec02a90e 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 e65eb6b6dd Ruff format 2024-10-11 09:07:53 +02:00
Dominique LasserreandAndreas a71eab3bd0 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 6cf1215ba1 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 5edff42954 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 2f1f37577b Activate optimization test with 3 generations 2024-10-09 17:05:36 +02:00
Michael OsthegeandAndreas f4661b0043 Remove and ignore visualization side-effect outputs 2024-10-09 17:05:36 +02:00
NormannandAndreas 987bffe148 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 38a457a3dc Ruff 2024-10-09 16:59:50 +02:00
AndreasandAndreas 004e1f3dc7 [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 65044b6c6c 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 dc8f2f94b8 revert check in test for ems 2024-10-08 18:55:51 +02:00
Bobby NoelteandAndreas 9f78966c89 Adapt tests to package directory structure.
Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
2024-10-07 08:12:33 +02:00
AndreasandAndreas 05c0f74b09 min_soc (was killed by someone else, pls dont force push!) 2024-10-06 16:00:07 +02:00
NormannandAndreas a16490523d fixed optimize test
fixed first our values for optimize test
2024-10-06 15:20:37 +02:00
AndreasandAndreas e61a89cff6 Pre Commit 2024-10-06 14:35:11 +02:00
AndreasandAndreas 9b7817e3dc - Home Appliances fixed
- Unittest with Home Appliances
2024-10-06 14:35:11 +02:00
AndreasandAndreas 0a0c3eed87 Unittest includes Home Appliances 2024-10-06 14:35:11 +02:00
NormannandAndreas 27bab20606 Update test_class_ems.py 2024-10-06 14:35:11 +02:00
66d101fb50 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 dd3363b714 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 2fce372029 Fix code style 2024-10-04 11:51:10 +02:00
AndreasandAndreas 4458b9f841 English + Ruff 2024-10-04 11:04:50 +02:00
AndreasandAndreas 3e3d06272b Unittest EMS 2024-10-04 11:04:50 +02:00
Michael OsthegeandAndreas 3045d53bd6 Apply isort and ruff code style 2024-10-03 17:28:49 +02:00
AndreasandAndreas e31178569f unittest -> pytest 2024-10-03 09:57:36 +02:00
FortriebandAndreas 0056e71695 Add first unit test for heatpump COP calculation 2024-10-03 09:57:36 +02:00