mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2025-09-13 07:21:16 +00:00
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>
This commit is contained in:
@@ -77,13 +77,9 @@ def test_loadakkudoktor_provider_id(load_provider):
|
||||
assert load_provider.provider_id() == "LoadAkkudoktor"
|
||||
|
||||
|
||||
@patch("akkudoktoreos.prediction.loadakkudoktor.Path")
|
||||
@patch("akkudoktoreos.prediction.loadakkudoktor.np.load")
|
||||
def test_load_data_from_mock(mock_np_load, mock_path, mock_load_profiles_file, load_provider):
|
||||
def test_load_data_from_mock(mock_np_load, mock_load_profiles_file, load_provider):
|
||||
"""Test the `load_data` method."""
|
||||
# Mock path behavior to return the test file
|
||||
mock_path.return_value.parent.parent.joinpath.return_value = mock_load_profiles_file
|
||||
|
||||
# Mock numpy load to return data similar to what would be in the file
|
||||
mock_np_load.return_value = {
|
||||
"yearly_profiles": np.ones((365, 24)),
|
||||
|
Reference in New Issue
Block a user