| Line |
Col. |
Type |
Symbol |
ID |
Obj |
Message |
| 1 |
0 |
convention |
too-many-lines |
C0302 |
|
Too many lines in module (1050/1000) |
| 15 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'astor' |
| 16 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'black' |
| 17 |
0 |
convention |
wrong-import-order |
C0411 |
|
standard import "import json" should be placed before "import astor" |
| 18 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'numpy' |
| 19 |
0 |
convention |
wrong-import-order |
C0411 |
|
standard import "from copy import deepcopy" should be placed before "import astor" |
| 20 |
0 |
convention |
wrong-import-order |
C0411 |
|
standard import "from pathlib import Path" should be placed before "import astor" |
| 21 |
0 |
convention |
wrong-import-order |
C0411 |
|
standard import "from typing import Union" should be placed before "import astor" |
| 22 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'pydantic' |
| 23 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'agentlib.core.agent' |
| 24 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'agentlib.core.datamodels' |
| 25 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'agentlib.core.errors' |
| 26 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'agentlib.core.module' |
| 27 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'agentlib.utils' |
| 28 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'agentlib_mpc.data_structures.mpc_datamodels' |
| 29 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'agentlib_mpc.models.casadi_model' |
| 30 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'agentlib_mpc.modules.mpc.mpc_full' |
| 32 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'agentlib_mpc.optimization_backends.casadi_.basic' |
| 33 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'agentlib_mpc.data_structures.casadi_utils' |
| 49 |
0 |
refactor |
too-many-instance-attributes |
R0902 |
FlexAgentGenerator |
Too many instance attributes (17/7) |
| 239 |
28 |
warning |
unnecessary-lambda |
W0108 |
FlexAgentGenerator.generate_flex_agents.<lambda> |
Lambda may not be necessary |
| 282 |
17 |
convention |
invalid-name |
C0103 |
FlexAgentGenerator.append_module_and_dump_agent |
Variable name "f" doesn't conform to snake_case naming style |
| 335 |
4 |
refactor |
too-many-locals |
R0914 |
FlexAgentGenerator.adapt_mpc_module_config |
Too many local variables (22/15) |
| 335 |
4 |
refactor |
too-many-branches |
R0912 |
FlexAgentGenerator.adapt_mpc_module_config |
Too many branches (27/12) |
| 335 |
4 |
refactor |
too-many-statements |
R0915 |
FlexAgentGenerator.adapt_mpc_module_config |
Too many statements (73/50) |
| 458 |
19 |
warning |
redefined-builtin |
W0622 |
FlexAgentGenerator.adapt_mpc_module_config |
Redefining built-in 'input' |
| 569 |
16 |
warning |
logging-fstring-interpolation |
W1203 |
FlexAgentGenerator.adapt_mpc_module_config |
Use lazy % formatting in logging functions |
| 662 |
16 |
convention |
unnecessary-dunder-call |
C2801 |
FlexAgentGenerator.adapt_market_module_config |
Unnecessarily calls dunder method __setattr__. Set attribute directly or use setattr built-in function. |
| 710 |
46 |
convention |
invalid-name |
C0103 |
FlexAgentGenerator.adapt_and_dump_flex_config |
Variable name "f" doesn't conform to snake_case naming style |
| 726 |
29 |
warning |
protected-access |
W0212 |
FlexAgentGenerator.get_collocation_time_grid |
Access to a protected member _collocation_polynomial of a client class |
| 739 |
4 |
refactor |
too-many-locals |
R0914 |
FlexAgentGenerator._generate_flex_model_definition |
Too many local variables (18/15) |
| 760 |
0 |
convention |
line-too-long |
C0301 |
|
Line too long (110/100) |
| 761 |
0 |
convention |
line-too-long |
C0301 |
|
Line too long (115/100) |
| 768 |
0 |
convention |
line-too-long |
C0301 |
|
Line too long (110/100) |
| 769 |
0 |
convention |
line-too-long |
C0301 |
|
Line too long (115/100) |
| 774 |
65 |
convention |
invalid-name |
C0103 |
FlexAgentGenerator._generate_flex_model_definition |
Variable name "f" doesn't conform to snake_case naming style |
| 824 |
57 |
convention |
invalid-name |
C0103 |
FlexAgentGenerator._generate_flex_model_definition |
Variable name "f" doesn't conform to snake_case naming style |
| 856 |
12 |
warning |
logging-fstring-interpolation |
W1203 |
FlexAgentGenerator.check_variables_in_casadi_config |
Use lazy % formatting in logging functions |
| 860 |
4 |
refactor |
too-many-branches |
R0912 |
FlexAgentGenerator.run_config_validations |
Too many branches (19/12) |
| 924 |
8 |
refactor |
no-else-raise |
R1720 |
FlexAgentGenerator.run_config_validations |
Unnecessary "else" after "raise", remove the "else" and de-indent the code inside it |
| 1027 |
68 |
convention |
invalid-name |
C0103 |
FlexAgentGenerator.adapt_sim_results_path |
Variable name "f" doesn't conform to snake_case naming style |
| 1042 |
48 |
convention |
invalid-name |
C0103 |
FlexAgentGenerator.adapt_sim_results_path |
Variable name "f" doesn't conform to snake_case naming style |
| 1046 |
8 |
convention |
invalid-name |
C0103 |
FlexAgentGenerator.adapt_sim_results_path |
Variable name "e" doesn't conform to snake_case naming style |
| 1047 |
12 |
warning |
raise-missing-from |
W0707 |
FlexAgentGenerator.adapt_sim_results_path |
Consider explicitly re-raising using 'raise Exception(f"Could not adapt and create a new simulation config due to: {e}. Please check {simulator_agent_config} and '{save_name_suffix}'") from e' |
| 1047 |
12 |
warning |
broad-exception-raised |
W0719 |
FlexAgentGenerator.adapt_sim_results_path |
Raising too general exception: Exception |
| Line |
Col. |
Type |
Symbol |
ID |
Obj |
Message |
| 6 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'numpy' |
| 7 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'pandas' |
| 8 |
0 |
convention |
wrong-import-order |
C0411 |
|
standard import "from typing import Optional, Dict" should be placed before "import numpy as np" |
| 9 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'pydantic' |
| 10 |
0 |
convention |
wrong-import-order |
C0411 |
|
standard import "from collections.abc import Iterable" should be placed before "import numpy as np" |
| 12 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'agentlib' |
| 12 |
0 |
convention |
wrong-import-order |
C0411 |
|
third party import "from agentlib import AgentVariable" should be placed before "import agentlib_flexquant.data_structures.globals as glbs" |
| 13 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'agentlib_mpc.modules.mpc' |
| 13 |
0 |
convention |
wrong-import-order |
C0411 |
|
third party import "from agentlib_mpc.modules.mpc import mpc_full, minlp_mpc" should be placed before "import agentlib_flexquant.data_structures.globals as glbs" |
| 14 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'agentlib_mpc.data_structures.mpc_datamodels' |
| 14 |
0 |
convention |
wrong-import-order |
C0411 |
|
third party import "from agentlib_mpc.data_structures.mpc_datamodels import Results, InitStatus" should be placed before "import agentlib_flexquant.data_structures.globals as glbs" |
| 19 |
0 |
convention |
missing-class-docstring |
C0115 |
FlexibilityBaselineMPCConfig |
Missing class docstring |
| 19 |
0 |
refactor |
too-few-public-methods |
R0903 |
FlexibilityBaselineMPCConfig |
Too few public methods (0/2) |
| 138 |
4 |
convention |
missing-function-docstring |
C0116 |
FlexibilityBaselineMPC.set_actuation |
Missing function or method docstring |
| 160 |
8 |
convention |
invalid-name |
C0103 |
FlexibilityBaselineMPC.set_output |
Variable name "df" doesn't conform to snake_case naming style |
| 294 |
4 |
refactor |
too-many-arguments |
R0913 |
FlexibilityBaselineMPC._run_simulation |
Too many arguments (6/5) |
| 294 |
4 |
refactor |
too-many-locals |
R0914 |
FlexibilityBaselineMPC._run_simulation |
Too many local variables (18/15) |
| 295 |
49 |
warning |
unused-argument |
W0613 |
FlexibilityBaselineMPC._run_simulation |
Unused argument 'mpc_time_step' |
| 330 |
30 |
warning |
eval-used |
W0123 |
FlexibilityBaselineMPC._run_simulation |
Use of eval |
| 350 |
0 |
convention |
missing-class-docstring |
C0115 |
FlexibilityBaselineMINLPMPCConfig |
Missing class docstring |
| 350 |
0 |
refactor |
too-few-public-methods |
R0903 |
FlexibilityBaselineMINLPMPCConfig |
Too few public methods (0/2) |
| 471 |
4 |
convention |
missing-function-docstring |
C0116 |
FlexibilityBaselineMINLPMPC.set_actuation |
Missing function or method docstring |
| 492 |
8 |
convention |
invalid-name |
C0103 |
FlexibilityBaselineMINLPMPC.set_output |
Variable name "df" doesn't conform to snake_case naming style |
| 625 |
4 |
refactor |
too-many-arguments |
R0913 |
FlexibilityBaselineMINLPMPC._run_simulation |
Too many arguments (6/5) |
| 625 |
4 |
refactor |
too-many-locals |
R0914 |
FlexibilityBaselineMINLPMPC._run_simulation |
Too many local variables (19/15) |
| 626 |
49 |
warning |
unused-argument |
W0613 |
FlexibilityBaselineMINLPMPC._run_simulation |
Unused argument 'mpc_time_step' |
| 670 |
30 |
warning |
eval-used |
W0123 |
FlexibilityBaselineMINLPMPC._run_simulation |
Use of eval |
| Line |
Col. |
Type |
Symbol |
ID |
Obj |
Message |
| 14 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'agentlib' |
| 15 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'numpy' |
| 16 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'pandas' |
| 17 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'pydantic' |
| 28 |
0 |
refactor |
too-few-public-methods |
R0903 |
InputsForCorrectFlexCosts |
Too few public methods (0/2) |
| 58 |
0 |
refactor |
too-few-public-methods |
R0903 |
InputsForCalculateFlexCosts |
Too few public methods (1/2) |
| 118 |
0 |
refactor |
too-few-public-methods |
R0903 |
FlexibilityIndicatorModuleConfig |
Too few public methods (1/2) |
| 365 |
22 |
convention |
trailing-whitespace |
C0303 |
|
Trailing whitespace |
| 373 |
64 |
convention |
trailing-whitespace |
C0303 |
|
Trailing whitespace |
| 375 |
35 |
convention |
trailing-whitespace |
C0303 |
|
Trailing whitespace |
| 385 |
0 |
convention |
line-too-long |
C0301 |
|
Line too long (102/100) |
| 385 |
4 |
convention |
missing-function-docstring |
C0116 |
CallBackHandler.update_price_variables |
Missing function or method docstring |
| 394 |
0 |
convention |
line-too-long |
C0301 |
|
Line too long (134/100) |
| 395 |
0 |
convention |
trailing-whitespace |
C0303 |
|
Trailing whitespace |
| 403 |
0 |
convention |
line-too-long |
C0301 |
|
Line too long (138/100) |
| 405 |
0 |
convention |
trailing-whitespace |
C0303 |
|
Trailing whitespace |
| 406 |
0 |
convention |
line-too-long |
C0301 |
|
Line too long (128/100) |
| 406 |
4 |
convention |
missing-function-docstring |
C0116 |
CallBackHandler.initialize_callback_variables |
Missing function or method docstring |
| 411 |
0 |
convention |
line-too-long |
C0301 |
|
Line too long (103/100) |
| 412 |
0 |
convention |
line-too-long |
C0301 |
|
Line too long (103/100) |
| 414 |
0 |
convention |
trailing-whitespace |
C0303 |
|
Trailing whitespace |
| 416 |
0 |
convention |
trailing-whitespace |
C0303 |
|
Trailing whitespace |
| 419 |
12 |
warning |
unused-variable |
W0612 |
CallBackHandler.set_all_callback_variables_to_none |
Unused variable 'alias' |
| 423 |
98 |
convention |
trailing-whitespace |
C0303 |
|
Trailing whitespace |
| 426 |
33 |
convention |
trailing-whitespace |
C0303 |
|
Trailing whitespace |
| 430 |
0 |
convention |
trailing-whitespace |
C0303 |
|
Trailing whitespace |
| 433 |
0 |
convention |
line-too-long |
C0301 |
|
Line too long (114/100) |
| 454 |
8 |
convention |
invalid-name |
C0103 |
FlexibilityIndicatorModule.__init__ |
Attribute name "df" doesn't conform to snake_case naming style |
| 463 |
0 |
convention |
line-too-long |
C0301 |
|
Line too long (107/100) |
| 465 |
4 |
convention |
missing-function-docstring |
C0116 |
FlexibilityIndicatorModule.register_callbacks |
Missing function or method docstring |
| 483 |
11 |
convention |
trailing-whitespace |
C0303 |
|
Trailing whitespace |
| 484 |
0 |
convention |
trailing-whitespace |
C0303 |
|
Trailing whitespace |
| 490 |
13 |
convention |
trailing-whitespace |
C0303 |
|
Trailing whitespace |
| 491 |
0 |
convention |
line-too-long |
C0301 |
|
Line too long (102/100) |
| 492 |
0 |
convention |
trailing-whitespace |
C0303 |
|
Trailing whitespace |
| 499 |
75 |
convention |
trailing-whitespace |
C0303 |
|
Trailing whitespace |
| 502 |
0 |
convention |
trailing-whitespace |
C0303 |
|
Trailing whitespace |
| 513 |
28 |
convention |
invalid-name |
C0103 |
FlexibilityIndicatorModule.write_results |
Argument name "df" doesn't conform to snake_case naming style |
| 513 |
46 |
convention |
invalid-name |
C0103 |
FlexibilityIndicatorModule.write_results |
Argument name "ts" doesn't conform to snake_case naming style |
| 513 |
57 |
convention |
invalid-name |
C0103 |
FlexibilityIndicatorModule.write_results |
Argument name "n" doesn't conform to snake_case naming style |
| 513 |
4 |
refactor |
too-many-locals |
R0914 |
FlexibilityIndicatorModule.write_results |
Too many local variables (18/15) |
| 513 |
4 |
refactor |
too-many-branches |
R0912 |
FlexibilityIndicatorModule.write_results |
Too many branches (16/12) |
| 573 |
12 |
warning |
unused-variable |
W0612 |
FlexibilityIndicatorModule.write_results |
Unused variable 'i' |
| 674 |
4 |
refactor |
too-many-arguments |
R0913 |
FlexibilityIndicatorModule.send_flex_offer |
Too many arguments (8/5) |
| 752 |
0 |
convention |
trailing-newlines |
C0305 |
|
Trailing newlines |
| Line |
Col. |
Type |
Symbol |
ID |
Obj |
Message |
| 1 |
0 |
convention |
missing-module-docstring |
C0114 |
|
Missing module docstring |
| 5 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'agentlib' |
| 6 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'numpy' |
| 7 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'pandas' |
| 9 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'agentlib.core.datamodels' |
| 9 |
0 |
convention |
wrong-import-order |
C0411 |
|
third party import "from agentlib.core.datamodels import AgentVariable" should be placed before "import agentlib_flexquant.data_structures.globals as glbs" |
| 10 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'pydantic' |
| 10 |
0 |
convention |
wrong-import-order |
C0411 |
|
third party import "from pydantic import ConfigDict, Field, model_validator" should be placed before "import agentlib_flexquant.data_structures.globals as glbs" |
| 16 |
0 |
convention |
missing-class-docstring |
C0115 |
FlexibilityMarketModuleConfig |
Missing class docstring |
| 16 |
0 |
refactor |
too-few-public-methods |
R0903 |
FlexibilityMarketModuleConfig |
Too few public methods (1/2) |
| 62 |
4 |
convention |
missing-function-docstring |
C0116 |
FlexibilityMarketModuleConfig.check_results_file_extension |
Missing function or method docstring |
| 85 |
8 |
warning |
attribute-defined-outside-init |
W0201 |
FlexibilityMarketModule.set_random_seed |
Attribute 'random_generator' defined outside __init__ |
| 97 |
4 |
convention |
missing-function-docstring |
C0116 |
FlexibilityMarketModule.register_callbacks |
Missing function or method docstring |
| 119 |
8 |
warning |
attribute-defined-outside-init |
W0201 |
FlexibilityMarketModule.register_callbacks |
Attribute 'cooldown_ticker' defined outside __init__ |
| 125 |
8 |
convention |
invalid-name |
C0103 |
FlexibilityMarketModule.write_results |
Variable name "df" doesn't conform to snake_case naming style |
| 137 |
62 |
warning |
unused-argument |
W0613 |
FlexibilityMarketModule.random_flexibility_callback |
Unused argument 'name' |
| 200 |
20 |
warning |
attribute-defined-outside-init |
W0201 |
FlexibilityMarketModule.random_flexibility_callback |
Attribute 'cooldown_ticker' defined outside __init__ |
| 207 |
62 |
warning |
unused-argument |
W0613 |
FlexibilityMarketModule.single_flexibility_callback |
Unused argument 'name' |
| 265 |
8 |
warning |
unnecessary-pass |
W0107 |
FlexibilityMarketModule.custom_flexibility_callback |
Unnecessary pass statement |
| 267 |
29 |
warning |
unused-argument |
W0613 |
FlexibilityMarketModule.dummy_callback |
Unused argument 'inp' |
| 267 |
49 |
warning |
unused-argument |
W0613 |
FlexibilityMarketModule.dummy_callback |
Unused argument 'name' |
| 278 |
4 |
convention |
missing-function-docstring |
C0116 |
FlexibilityMarketModule.process |
Missing function or method docstring |
| Line |
Col. |
Type |
Symbol |
ID |
Obj |
Message |
| 6 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'numpy' |
| 7 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'pandas' |
| 8 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'pydantic' |
| 9 |
0 |
convention |
wrong-import-order |
C0411 |
|
standard import "from typing import Dict, Union, Optional" should be placed before "import numpy as np" |
| 10 |
0 |
convention |
wrong-import-order |
C0411 |
|
standard import "from collections.abc import Iterable" should be placed before "import numpy as np" |
| 11 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'agentlib.core.datamodels' |
| 12 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'agentlib_mpc.modules.mpc' |
| 20 |
0 |
convention |
missing-class-docstring |
C0115 |
FlexibilityShadowMPCConfig |
Missing class docstring |
| 20 |
0 |
refactor |
too-few-public-methods |
R0903 |
FlexibilityShadowMPCConfig |
Too few public methods (0/2) |
| 90 |
8 |
convention |
invalid-name |
C0103 |
FlexibilityShadowMPC.set_output |
Variable name "df" doesn't conform to snake_case naming style |
| 115 |
0 |
convention |
line-too-long |
C0301 |
|
Line too long (102/100) |
| 156 |
4 |
convention |
missing-function-docstring |
C0116 |
FlexibilityShadowMPC.register_callbacks |
Missing function or method docstring |
| 166 |
0 |
convention |
line-too-long |
C0301 |
|
Line too long (102/100) |
| 179 |
0 |
convention |
line-too-long |
C0301 |
|
Line too long (102/100) |
| 223 |
4 |
convention |
missing-function-docstring |
C0116 |
FlexibilityShadowMPC.process |
Missing function or method docstring |
| 289 |
4 |
refactor |
too-many-arguments |
R0913 |
FlexibilityShadowMPC._run_simulation |
Too many arguments (6/5) |
| 289 |
4 |
refactor |
too-many-locals |
R0914 |
FlexibilityShadowMPC._run_simulation |
Too many local variables (18/15) |
| 290 |
49 |
warning |
unused-argument |
W0613 |
FlexibilityShadowMPC._run_simulation |
Unused argument 'mpc_time_step' |
| 320 |
30 |
warning |
eval-used |
W0123 |
FlexibilityShadowMPC._run_simulation |
Use of eval |
| 339 |
0 |
convention |
missing-class-docstring |
C0115 |
FlexibilityShadowMINLPMPCConfig |
Missing class docstring |
| 339 |
0 |
refactor |
too-few-public-methods |
R0903 |
FlexibilityShadowMINLPMPCConfig |
Too few public methods (0/2) |
| 404 |
4 |
convention |
missing-function-docstring |
C0116 |
FlexibilityShadowMINLPMPC.register_callbacks |
Missing function or method docstring |
| 414 |
0 |
convention |
line-too-long |
C0301 |
|
Line too long (102/100) |
| 427 |
0 |
convention |
line-too-long |
C0301 |
|
Line too long (102/100) |
| 472 |
4 |
convention |
missing-function-docstring |
C0116 |
FlexibilityShadowMINLPMPC.process |
Missing function or method docstring |
| 489 |
8 |
convention |
invalid-name |
C0103 |
FlexibilityShadowMINLPMPC.set_output |
Variable name "df" doesn't conform to snake_case naming style |
| 515 |
0 |
convention |
line-too-long |
C0301 |
|
Line too long (102/100) |
| 612 |
4 |
refactor |
too-many-arguments |
R0913 |
FlexibilityShadowMINLPMPC._run_simulation |
Too many arguments (6/5) |
| 612 |
4 |
refactor |
too-many-locals |
R0914 |
FlexibilityShadowMINLPMPC._run_simulation |
Too many local variables (19/15) |
| 613 |
49 |
warning |
unused-argument |
W0613 |
FlexibilityShadowMINLPMPC._run_simulation |
Unused argument 'mpc_time_step' |
| 650 |
30 |
warning |
eval-used |
W0123 |
FlexibilityShadowMINLPMPC._run_simulation |
Use of eval |
| Line |
Col. |
Type |
Symbol |
ID |
Obj |
Message |
| 1 |
0 |
convention |
missing-module-docstring |
C0114 |
|
Missing module docstring |
| 1 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'pydantic' |
| 2 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'numpy' |
| 3 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'agentlib.core.errors' |
| 4 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'agentlib_mpc.optimization_backends.casadi_.minlp_cia' |
| 5 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'agentlib_mpc.optimization_backends.casadi_.core.casadi_backend' |
| 6 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'agentlib_mpc.data_structures.mpc_datamodels' |
| 8 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'agentlib_mpc.optimization_backends.casadi_.core.discretization' |
| 8 |
0 |
convention |
wrong-import-order |
C0411 |
|
third party import "from agentlib_mpc.optimization_backends.casadi_.core.discretization import Results" should be placed before "from agentlib_flexquant.data_structures.globals import full_trajectory_suffix" |
| 8 |
0 |
convention |
ungrouped-imports |
C0412 |
|
Imports from package agentlib_mpc are not grouped |
| 13 |
4 |
warning |
raise-missing-from |
W0707 |
|
Consider explicitly re-raising using 'except ImportError as exc' and 'raise OptionalDependencyError(used_object='Pycombina', dependency_install='.\\ after cloning pycombina. Instructions: https://pycombina.readthedocs.io/en/latest/install.html#') from exc' |
| 15 |
29 |
warning |
anomalous-backslash-in-string |
W1401 |
|
Anomalous backslash in string: '\ '. String constant might be missing an r prefix. |
| 20 |
0 |
convention |
missing-class-docstring |
C0115 |
ConstrainedCIABackendConfig |
Missing class docstring |
| 20 |
0 |
refactor |
too-few-public-methods |
R0903 |
ConstrainedCIABackendConfig |
Too few public methods (0/2) |
| 36 |
4 |
convention |
missing-class-docstring |
C0115 |
ConstrainedCIABackendConfig.Config |
Missing class docstring |
| 36 |
4 |
refactor |
too-few-public-methods |
R0903 |
ConstrainedCIABackendConfig.Config |
Too few public methods (0/2) |
| 41 |
0 |
convention |
missing-class-docstring |
C0115 |
ConstrainedCasADiCIABackend |
Missing class docstring |
| 45 |
4 |
warning |
useless-parent-delegation |
W0246 |
ConstrainedCasADiCIABackend.__init__ |
Useless parent or super() delegation in method '__init__' |
| 48 |
4 |
convention |
missing-function-docstring |
C0116 |
ConstrainedCasADiCIABackend.solve |
Missing function or method docstring |
| 48 |
4 |
refactor |
too-many-locals |
R0914 |
ConstrainedCasADiCIABackend.solve |
Too many local variables (20/15) |
| 97 |
4 |
convention |
missing-function-docstring |
C0116 |
ConstrainedCasADiCIABackend.do_pycombina |
Missing function or method docstring |
| 134 |
4 |
convention |
missing-function-docstring |
C0116 |
ConstrainedCasADiCIABackend.get_baseline_binary_solution |
Missing function or method docstring |
| 134 |
4 |
refactor |
inconsistent-return-statements |
R1710 |
ConstrainedCasADiCIABackend.get_baseline_binary_solution |
Either all return statements in a function should return an expression, or none of them should. |
| 148 |
0 |
convention |
missing-final-newline |
C0304 |
|
Final newline missing |
| Line |
Col. |
Type |
Symbol |
ID |
Obj |
Message |
| 1 |
0 |
convention |
missing-module-docstring |
C0114 |
|
Missing module docstring |
| 1 |
0 |
refactor |
duplicate-code |
R0801 |
|
Similar lines in 2 files
==agentlib_flexquant.modules.baseline_mpc:[315:349]
==agentlib_flexquant.modules.shadow_mpc:[306:338]
for i in range(0, n_simulation_steps):
current_sim_time = i * sim_time_step
# Apply control and input values from the appropriate MPC step
for control, value in zip(
self.var_ref.controls, control_values_full.loc[current_sim_time]
):
self.flex_model.set(control, value)
for input_var, value in zip(
self.var_ref.inputs, input_values_full.loc[current_sim_time]
):
# change the type of iterable input, since casadi model can't deal with iterable
if issubclass(eval(self.flex_model.get(input_var).type), Iterable):
self.flex_model.get(input_var).type = type(value).__name__
self.flex_model.set(input_var, value)
# do integration
# reduce the simulation time step so that the total horizon time will not be exceeded
if current_sim_time + sim_time_step <= total_horizon_time:
t_sample = sim_time_step
else:
t_sample = total_horizon_time - current_sim_time
self.flex_model.do_step(t_start=0, t_sample=t_sample)
# save output
for output in self.var_ref.outputs:
self.flex_results.loc[
(self.env.now, current_sim_time + t_sample), output
] = self.flex_model.get_output(output).value
|
| 1 |
0 |
refactor |
duplicate-code |
R0801 |
|
Similar lines in 2 files
==agentlib_flexquant.modules.baseline_mpc:[217:257]
==agentlib_flexquant.modules.shadow_mpc:[540:580]
)
# set index of flex results to the same as mpc result
store_results_df = self.flex_results.copy(deep=True)
store_results_df.index = self.flex_results.index.tolist()
# save results
if not os.path.exists(self.res_file_flex):
store_results_df.to_csv(self.res_file_flex)
else:
store_results_df.to_csv(self.res_file_flex, mode="a", header=False)
# set the flex results format same as mpc result while updating Agentvariable
self.flex_results.index = self.flex_results.index.get_level_values(1)
def _initialize_flex_results(
self, n_simulation_steps, horizon_length, sim_time_step, result_df
):
"""Initialize the flex results dataframe with the correct dimension
and index and fill with existing results from optimization
"""
# create MultiIndex for collocation points
index_coll = pd.MultiIndex.from_arrays(
[[self.env.now] * len(result_df.index), result_df.index],
names=["time_step", "time"]
# Match the names with multi_index but note they're reversed
)
# create Multiindex for full simulation sample times
index_full_sample = pd.MultiIndex.from_tuples(
zip(
[self.env.now] * (n_simulation_steps + 1),
range(0, horizon_length + sim_time_step, sim_time_step),
),
names=["time_step", "time"],
)
# merge indexes
new_index = index_coll.union(index_full_sample).sort_values()
# initialize the flex results with correct dimension |
| 1 |
0 |
refactor |
duplicate-code |
R0801 |
|
Similar lines in 2 files
==agentlib_flexquant.modules.baseline_mpc:[258:306]
==agentlib_flexquant.modules.shadow_mpc:[253:300]
columns=self.var_ref.outputs)
# Get the optimization outputs and create a series for fixed
# optimization outputs with the correct MultiIndex format
opti_outputs = result_df.variable[self.config.power_variable_name]
fixed_opti_output = pd.Series(
opti_outputs.values,
index=index_coll,
)
# fill the output value at the time step where it already exists
# in optimization output
for idx in fixed_opti_output.index:
if idx in self.flex_results.index:
self.flex_results.loc[idx, self.config.power_variable_name] = (
fixed_opti_output)[idx]
def _update_model_parameters(self):
"""update the value of module parameters with value from config,
since creating a model just reads the value in the model class but
not the config
"""
for par in self.config.parameters:
self.flex_model.set(par.name, par.value)
def _update_initial_states(self, result_df):
"""set the initial value of states"""
# get state values from the mpc optimization result
state_values = result_df.variable[self.var_ref.states]
# update state values with last measurement
for state, value in zip(self.var_ref.states, state_values.iloc[0]):
self.flex_model.set(state, value)
def _run_simulation(
self, n_simulation_steps, sim_time_step, mpc_time_step, result_df,
total_horizon_time
):
"""simulate with flex model over the prediction horizon
"""
# get control and input values from the mpc optimization result
control_values = result_df.variable[self.var_ref.controls].dropna()
input_values = result_df.parameter[self.var_ref.inputs].dropna()
# Get the simulation time step index |
| 1 |
0 |
refactor |
duplicate-code |
R0801 |
|
Similar lines in 2 files
==agentlib_flexquant.modules.baseline_mpc:[648:687]
==agentlib_flexquant.modules.shadow_mpc:[629:666]
for i in range(0, n_simulation_steps):
current_sim_time = i * sim_time_step
# Apply control and input values from the appropriate MPC step
for control, value in zip(
self.var_ref.controls,
control_values_full.loc[current_sim_time, self.var_ref.controls],
):
self.flex_model.set(control, value)
for binary_control, value in zip(
self.var_ref.binary_controls,
control_values_full.loc[current_sim_time, self.var_ref.binary_controls],
):
self.flex_model.set(binary_control, value)
for input_var, value in zip(
self.var_ref.inputs, input_values_full.loc[current_sim_time]
):
# change the type of iterable input, since casadi model can't
# deal with iterable
if issubclass(eval(self.flex_model.get(input_var).type), Iterable):
self.flex_model.get(input_var).type = type(value).__name__
self.flex_model.set(input_var, value)
# do integration
# reduce the simulation time step so that the total horizon time
# will not be exceeded
if current_sim_time + sim_time_step <= total_horizon_time:
t_sample = sim_time_step
else:
t_sample = total_horizon_time - current_sim_time
self.flex_model.do_step(t_start=0, t_sample=t_sample)
# save output
for output in self.var_ref.outputs:
self.flex_results.loc[
(self.env.now, current_sim_time + t_sample), output
] = self.flex_model.get_output(output).value |
| 1 |
0 |
refactor |
duplicate-code |
R0801 |
|
Similar lines in 2 files
==agentlib_flexquant.modules.baseline_mpc:[151:174]
==agentlib_flexquant.modules.shadow_mpc:[481:501]
if not self.config.set_outputs:
return
self.logger.info("Sending optimal output values to data_broker.")
# simulate with the casadi simulator
self.sim_flex_model(solution)
# extract solution DataFrama
df = solution.df
# send the outputs
if self.flex_results is not None:
for output in self.var_ref.outputs:
if output not in [
self.config.power_variable_name,
self.config.storage_variable_name,
]:
series = df.variable[output]
self.set(output, series)
# send the power and storage variable value from simulation results
upsampled_output_power = self.flex_results[self.config.power_variable_name]
self.set(self.config.power_variable_name, upsampled_output_power)
if self.config.storage_variable_name is not None: |
| 1 |
0 |
refactor |
duplicate-code |
R0801 |
|
Similar lines in 2 files
==agentlib_flexquant.modules.baseline_mpc:[324:349]
==agentlib_flexquant.modules.shadow_mpc:[645:666]
for input_var, value in zip(
self.var_ref.inputs, input_values_full.loc[current_sim_time]
):
# change the type of iterable input, since casadi model can't deal with iterable
if issubclass(eval(self.flex_model.get(input_var).type), Iterable):
self.flex_model.get(input_var).type = type(value).__name__
self.flex_model.set(input_var, value)
# do integration
# reduce the simulation time step so that the total horizon time will not be exceeded
if current_sim_time + sim_time_step <= total_horizon_time:
t_sample = sim_time_step
else:
t_sample = total_horizon_time - current_sim_time
self.flex_model.do_step(t_start=0, t_sample=t_sample)
# save output
for output in self.var_ref.outputs:
self.flex_results.loc[
(self.env.now, current_sim_time + t_sample), output
] = self.flex_model.get_output(output).value |
| 1 |
0 |
refactor |
duplicate-code |
R0801 |
|
Similar lines in 2 files
==agentlib_flexquant.modules.baseline_mpc:[664:687]
==agentlib_flexquant.modules.shadow_mpc:[315:338]
for input_var, value in zip(
self.var_ref.inputs, input_values_full.loc[current_sim_time]
):
# change the type of iterable input, since casadi model can't
# deal with iterable
if issubclass(eval(self.flex_model.get(input_var).type), Iterable):
self.flex_model.get(input_var).type = type(value).__name__
self.flex_model.set(input_var, value)
# do integration
# reduce the simulation time step so that the total horizon time
# will not be exceeded
if current_sim_time + sim_time_step <= total_horizon_time:
t_sample = sim_time_step
else:
t_sample = total_horizon_time - current_sim_time
self.flex_model.do_step(t_start=0, t_sample=t_sample)
# save output
for output in self.var_ref.outputs:
self.flex_results.loc[
(self.env.now, current_sim_time + t_sample), output
] = self.flex_model.get_output(output).value |
| 1 |
0 |
refactor |
duplicate-code |
R0801 |
|
Similar lines in 2 files
==agentlib_flexquant.modules.baseline_mpc:[589:633]
==agentlib_flexquant.modules.shadow_mpc:[253:296]
columns=self.var_ref.outputs)
# Get the optimization outputs and create a series for fixed
# optimization outputs with the correct MultiIndex format
opti_outputs = result_df.variable[self.config.power_variable_name]
fixed_opti_output = pd.Series(
opti_outputs.values,
index=index_coll,
)
# fill the output value at the time step where it already exists
# in optimization output
for idx in fixed_opti_output.index:
if idx in self.flex_results.index:
self.flex_results.loc[idx, self.config.power_variable_name] = (
fixed_opti_output)[idx]
def _update_model_parameters(self):
"""update the value of module parameters with value from config,
since creating a model just reads the value in the model class but
not the config
"""
for par in self.config.parameters:
self.flex_model.set(par.name, par.value)
def _update_initial_states(self, result_df):
"""set the initial value of states"""
# get state values from the mpc optimization result
state_values = result_df.variable[self.var_ref.states]
# update state values with last measurement
for state, value in zip(self.var_ref.states, state_values.iloc[0]):
self.flex_model.set(state, value)
def _run_simulation(
self, n_simulation_steps, sim_time_step, mpc_time_step, result_df,
total_horizon_time
):
"""simulate with flex model over the prediction horizon
"""
# get control and input values from the mpc optimization result |
| 1 |
0 |
refactor |
duplicate-code |
R0801 |
|
Similar lines in 2 files
==agentlib_flexquant.modules.baseline_mpc:[484:501]
==agentlib_flexquant.modules.shadow_mpc:[481:498]
if not self.config.set_outputs:
return
self.logger.info("Sending optimal output values to data_broker.")
# simulate with the casadi simulator
self.sim_flex_model(solution)
df = solution.df
if self.flex_results is not None:
for output in self.var_ref.outputs:
if output not in [
self.config.power_variable_name,
self.config.storage_variable_name,
]:
series = df.variable[output]
self.set(output, series)
# send the power and storage variable value from simulation results |
| 1 |
0 |
refactor |
duplicate-code |
R0801 |
|
Similar lines in 2 files
==agentlib_flexquant.modules.baseline_mpc:[241:257]
==agentlib_flexquant.modules.shadow_mpc:[235:251]
index_coll = pd.MultiIndex.from_arrays(
[[self.env.now] * len(result_df.index), result_df.index],
names=["time_step", "time"]
# Match the names with multi_index but note they're reversed
)
# create Multiindex for full simulation sample times
index_full_sample = pd.MultiIndex.from_tuples(
zip(
[self.env.now] * (n_simulation_steps + 1),
range(0, horizon_length + sim_time_step, sim_time_step),
),
names=["time_step", "time"],
)
# merge indexes
new_index = index_coll.union(index_full_sample).sort_values()
# initialize the flex results with correct dimension |
| 1 |
0 |
refactor |
duplicate-code |
R0801 |
|
Similar lines in 2 files
==agentlib_flexquant.modules.baseline_mpc:[522:546]
==agentlib_flexquant.modules.shadow_mpc:[515:539]
return
# read the defined simulation time step
sim_time_step = self.config.casadi_sim_time_step
mpc_time_step = self.config.time_step
# set the horizon length and the number of simulation steps
total_horizon_time = int(self.config.prediction_horizon * self.config.time_step)
n_simulation_steps = math.ceil(total_horizon_time / sim_time_step)
# read the current optimization result
result_df = solution.df
# initialize the flex sim results Dataframe
self._initialize_flex_results(
n_simulation_steps, total_horizon_time, sim_time_step, result_df
)
# Update model parameters and initial states
self._update_model_parameters()
self._update_initial_states(result_df)
# Run simulation
self._run_simulation( |
| 1 |
0 |
refactor |
duplicate-code |
R0801 |
|
Similar lines in 2 files
==agentlib_flexquant.modules.baseline_mpc:[191:215]
==agentlib_flexquant.modules.shadow_mpc:[115:139]
return
# read the defined simulation time step
sim_time_step = self.config.casadi_sim_time_step
mpc_time_step = self.config.time_step
# set the horizon length and the number of simulation steps
total_horizon_time = int(self.config.prediction_horizon * self.config.time_step)
n_simulation_steps = math.ceil(total_horizon_time / sim_time_step)
# read the current optimization result
result_df = solution.df
# initialize the flex sim results Dataframe
self._initialize_flex_results(
n_simulation_steps, total_horizon_time, sim_time_step, result_df
)
# Update model parameters and initial states
self._update_model_parameters()
self._update_initial_states(result_df)
# Run simulation
self._run_simulation( |
| 1 |
0 |
refactor |
duplicate-code |
R0801 |
|
Similar lines in 2 files
==agentlib_flexquant.data_structures.flexquant:[18:31]
==agentlib_flexquant.data_structures.mpcs:[15:27]
excluded_fields = [
"rdf_class",
"source",
"type",
"timestamp",
"description",
"unit",
"clip",
"interpolation_method",
"allowed_values",
]
|
| 1 |
0 |
refactor |
duplicate-code |
R0801 |
|
Similar lines in 2 files
==agentlib_flexquant.modules.baseline_mpc:[162:174]
==agentlib_flexquant.modules.shadow_mpc:[91:103]
if self.flex_results is not None:
for output in self.var_ref.outputs:
if output not in [
self.config.power_variable_name,
self.config.storage_variable_name,
]:
series = df.variable[output]
self.set(output, series)
# send the power and storage variable value from simulation results
upsampled_output_power = self.flex_results[self.config.power_variable_name]
self.set(self.config.power_variable_name, upsampled_output_power)
if self.config.storage_variable_name is not None: |
| 1 |
0 |
refactor |
duplicate-code |
R0801 |
|
Similar lines in 2 files
==agentlib_flexquant.modules.baseline_mpc:[612:639]
==agentlib_flexquant.modules.shadow_mpc:[599:623]
for par in self.config.parameters:
self.flex_model.set(par.name, par.value)
def _update_initial_states(self, result_df):
"""set the initial value of states"""
# get state values from the mpc optimization result
state_values = result_df.variable[self.var_ref.states]
# update state values with last measurement
for state, value in zip(self.var_ref.states, state_values.iloc[0]):
self.flex_model.set(state, value)
def _run_simulation(
self, n_simulation_steps, sim_time_step, mpc_time_step, result_df, total_horizon_time
):
"""simulate with flex model over the prediction horizon"""
# get control and input values from the mpc optimization result
control_values = result_df.variable[
[*self.var_ref.controls, *self.var_ref.binary_controls]
].dropna()
input_values = result_df.parameter[self.var_ref.inputs].dropna()
# Get the simulation time step index |
| 1 |
0 |
refactor |
duplicate-code |
R0801 |
|
Similar lines in 2 files
==agentlib_flexquant.data_structures.mpcs:[15:23]
==agentlib_flexquant.utils.config_management:[125:133]
excluded_fields = [
"rdf_class",
"source",
"type",
"timestamp",
"description",
"unit",
"clip", |
| 1 |
0 |
refactor |
duplicate-code |
R0801 |
|
Similar lines in 2 files
==agentlib_flexquant.modules.baseline_mpc:[217:241]
==agentlib_flexquant.modules.shadow_mpc:[140:156]
)
# set index of flex results to the same as mpc result
store_results_df = self.flex_results.copy(deep=True)
store_results_df.index = self.flex_results.index.tolist()
# save results
if not os.path.exists(self.res_file_flex):
store_results_df.to_csv(self.res_file_flex)
else:
store_results_df.to_csv(self.res_file_flex, mode="a", header=False)
# set the flex results format same as mpc result while updating Agentvariable
self.flex_results.index = self.flex_results.index.get_level_values(1)
def _initialize_flex_results(
self, n_simulation_steps, horizon_length, sim_time_step, result_df
):
"""Initialize the flex results dataframe with the correct dimension and index
and fill with existing results from optimization
"""
# create MultiIndex for collocation points |
| 1 |
0 |
refactor |
duplicate-code |
R0801 |
|
Similar lines in 2 files
==agentlib_flexquant.modules.baseline_mpc:[492:501]
==agentlib_flexquant.modules.shadow_mpc:[91:100]
if self.flex_results is not None:
for output in self.var_ref.outputs:
if output not in [
self.config.power_variable_name,
self.config.storage_variable_name,
]:
series = df.variable[output]
self.set(output, series)
# send the power and storage variable value from simulation results |
| 1 |
0 |
refactor |
duplicate-code |
R0801 |
|
Similar lines in 2 files
==agentlib_flexquant.modules.flexibility_indicator:[504:527]
==agentlib_flexquant.modules.flexibility_market:[88:97]
results_file = self.config.results_file
try:
results = pd.read_csv(results_file, header=[0], index_col=[0, 1])
return results
except FileNotFoundError:
self.logger.error("Results file %s was not found.", results_file)
return None
def write_results(self, df: pd.DataFrame, ts: float, n: int) -> pd.DataFrame:
"""Write every data of variables in self.var_list in an DataFrame.
DataFrame will be updated every time step
Args:
df: DataFrame which is initialised as an empty DataFrame with columns
according to self.var_list
ts: time step
n: number of time steps during prediction horizon
Returns:
DataFrame with results of every variable in self.var_list
""" |
| 1 |
0 |
refactor |
duplicate-code |
R0801 |
|
Similar lines in 2 files
==agentlib_flexquant.modules.baseline_mpc:[262:271]
==agentlib_flexquant.modules.shadow_mpc:[584:592]
opti_outputs = result_df.variable[self.config.power_variable_name]
fixed_opti_output = pd.Series(
opti_outputs.values,
index=index_coll,
)
# fill the output value at the time step where it already exists in optimization output
for idx in fixed_opti_output.index:
if idx in self.flex_results.index: |
| 1 |
0 |
refactor |
duplicate-code |
R0801 |
|
Similar lines in 2 files
==agentlib_flexquant.modules.flexibility_indicator:[357:364]
==agentlib_flexquant.modules.flexibility_market:[62:70]
if self.results_file and self.results_file.suffix != ".csv":
raise ValueError(
f"Invalid file extension for 'results_file': '{self.results_file}'. "
f"Expected a '.csv' file."
)
return self
|
| 1 |
0 |
refactor |
duplicate-code |
R0801 |
|
Similar lines in 2 files
==agentlib_flexquant.modules.baseline_mpc:[281:302]
==agentlib_flexquant.modules.shadow_mpc:[599:617]
for par in self.config.parameters:
self.flex_model.set(par.name, par.value)
def _update_initial_states(self, result_df):
"""set the initial value of states"""
# get state values from the mpc optimization result
state_values = result_df.variable[self.var_ref.states]
# update state values with last measurement
for state, value in zip(self.var_ref.states, state_values.iloc[0]):
self.flex_model.set(state, value)
def _run_simulation(
self, n_simulation_steps, sim_time_step, mpc_time_step, result_df,
total_horizon_time
):
"""simulate with flex model over the prediction horizon
"""
# get control and input values from the mpc optimization result |
| 9 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'agentlib.core.agent' |
| 10 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'agentlib.core.module' |
| 11 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'agentlib.modules' |
| 52 |
11 |
convention |
invalid-name |
C0103 |
get_module_type_matching_dict |
Variable name "v" doesn't conform to snake_case naming style |
| 59 |
12 |
convention |
consider-using-dict-items |
C0206 |
get_module_type_matching_dict |
Consider iterating with .items() |
| 59 |
16 |
convention |
invalid-name |
C0103 |
get_module_type_matching_dict |
Variable name "vv" doesn't conform to snake_case naming style |
| 68 |
8 |
convention |
invalid-name |
C0103 |
get_module_type_matching_dict |
Variable name "v" doesn't conform to snake_case naming style |
| 86 |
0 |
refactor |
inconsistent-return-statements |
R1710 |
get_orig_module_type |
Either all return statements in a function should return an expression, or none of them should. |
| 103 |
4 |
warning |
useless-else-on-loop |
W0120 |
get_module |
Else clause on loop without a break statement, remove the else and de-indent all the code inside it |
| 176 |
24 |
convention |
unnecessary-direct-lambda-call |
C3002 |
to_dict_and_remove_unnecessary_fields |
Lambda expression called directly. Execute the expression inline instead. |
| 184 |
24 |
convention |
unnecessary-direct-lambda-call |
C3002 |
to_dict_and_remove_unnecessary_fields |
Lambda expression called directly. Execute the expression inline instead. |
| 193 |
0 |
convention |
missing-function-docstring |
C0116 |
get_class_from_file |
Missing function or method docstring |
| Line |
Col. |
Type |
Symbol |
ID |
Obj |
Message |
| 1 |
0 |
convention |
missing-module-docstring |
C0114 |
|
Missing module docstring |
| 4 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'pandas' |
| 5 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'agentlib.core.agent' |
| 6 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'agentlib_mpc.utils' |
| 7 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'agentlib_mpc.utils.analysis' |
| 8 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'agentlib_mpc.utils.plotting.interactive' |
| 9 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'dash' |
| 10 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'plotly' |
| 11 |
0 |
error |
import-error |
E0401 |
|
Unable to import 'pydantic' |
| 13 |
0 |
refactor |
consider-using-from-import |
R0402 |
|
Use 'from agentlib_flexquant.data_structures import flex_results' instead |
| 20 |
0 |
refactor |
too-few-public-methods |
R0903 |
CustomBound |
Too few public methods (0/2) |
| 46 |
0 |
refactor |
too-many-instance-attributes |
R0902 |
Dashboard |
Too many instance attributes (8/7) |
| 64 |
4 |
refactor |
too-many-arguments |
R0913 |
Dashboard.__init__ |
Too many arguments (7/5) |
| 88 |
8 |
convention |
invalid-name |
C0103 |
Dashboard.__init__ |
Attribute name "LINE_PROPERTIES" doesn't conform to snake_case naming style |
| 110 |
12 |
refactor |
unnecessary-comprehension |
R1721 |
Dashboard.__init__ |
Unnecessary use of a comprehension, use list(self.intersection_mpcs_sim.keys()) instead. |
| 110 |
28 |
convention |
consider-iterating-dictionary |
C0201 |
Dashboard.__init__ |
Consider iterating the dictionary directly instead of calling .keys() |
| 199 |
30 |
convention |
invalid-name |
C0103 |
Dashboard._plot_one_mpc_variable._add_step_to_data |
Argument name "s" doesn't conform to snake_case naming style |
| 324 |
4 |
refactor |
inconsistent-return-statements |
R1710 |
Dashboard._plot_flexibility_kpi |
Either all return statements in a function should return an expression, or none of them should. |
| 479 |
4 |
refactor |
inconsistent-return-statements |
R1710 |
Dashboard._mark_characteristic_times_of_accepted_offers |
Either all return statements in a function should return an expression, or none of them should. |
| 506 |
4 |
refactor |
too-many-arguments |
R0913 |
Dashboard._create_plot |
Too many arguments (7/5) |
| 541 |
25 |
convention |
consider-iterating-dictionary |
C0201 |
Dashboard._create_plot |
Consider iterating the dictionary directly instead of calling .keys() |
| 562 |
16 |
convention |
invalid-name |
C0103 |
Dashboard._create_plot |
Variable name "ts" doesn't conform to snake_case naming style |
| 596 |
19 |
refactor |
use-dict-literal |
R1735 |
Dashboard._create_plot |
Consider using '{"t": 20, "b": 20}' instead of a call to 'dict'. |
| 691 |
41 |
warning |
f-string-without-interpolation |
W1309 |
Dashboard._create_layout |
Using an f-string that does not have any interpolated variables |