multi-vector-simulator icon indicating copy to clipboard operation
multi-vector-simulator copied to clipboard

mvs_report from json_with_results

Open TheOneAndra opened this issue 4 years ago • 5 comments

Fix #813

Changes proposed in this pull request:

  • minor change to allow the user to run mvs_report with a single json_with_results file.

The following steps were realized, as well (if applies):

  • [ ] Use in-line comments to explain your code
  • [ ] Write docstrings to your code (example docstring)
  • [ ] For new functionalities: Explain in readthedocs
  • [ ] Write test(s) for your new patch of code (pytests, assertion debug messages)
  • [ ] Update the CHANGELOG.md
  • [ ] Apply black (black . --exclude docs/)
  • [ ] Check if benchmark tests pass locally (EXECUTE_TESTS_ON=master pytest)

Please mark above checkboxes as following:

  • [ ] Open
  • [x] Done

:x: Check not applicable to this PR

For more information on how to contribute check the CONTRIBUTING.md.

TheOneAndra avatar Mar 02 '21 18:03 TheOneAndra

At this stage mvs_report terminates with:

(MVS) C:\Andra\MVS_GitHub>mvs_report -i C:\Andra\RLI\Master_Thesis\Data\MVS\Simulations\Sensitivity_analysis\210203_GF_var\210210_simplistic_system_PV\outputs\json_with_results_1_1.json
WARNING:root:The assets folder C:\Andra\RLI\Master_Thesis\Data\MVS\Simulations\Sensitivity_analysis\210203_GF_var\210210_simplistic_system_PV\outputs\report\assets exists already, it will not be replaced by default folder from multi_vector_simulator's package
Traceback (most recent call last):
  File "C:\Users\andra.backhaus\.conda\envs\MVS\Scripts\mvs_report-script.py", line 33, in <module>
    sys.exit(load_entry_point('multi-vector-simulator', 'console_scripts', 'mvs_report')())
  File "c:\andra\mvs_github\src\multi_vector_simulator\cli.py", line 266, in report
    test_app = create_app(dict_values, path_sim_output=path_sim_output)
  File "c:\andra\mvs_github\src\multi_vector_simulator\F2_autoreport.py", line 1031, in create_app
    log_dict=results_json[SIMULATION_RESULTS][LOGS][
KeyError: 'logs'

The temporary solution is to comment a whole section in F2_autoreport but that just deletes log messages from the all reports.

TheOneAndra avatar Mar 02 '21 18:03 TheOneAndra

@Bachibouzouk @TheOneAndra is this something that should be merged in the near future? If so, @TheOneAndra can you do a local rebase and force push (in coordination with @Bachibouzouk)?

smartie2076 avatar Mar 23 '21 10:03 smartie2076

@Bachibouzouk @TheOneAndra is this something that should be merged in the near future? If so, @TheOneAndra can you do a local rebase and force push (in coordination with @Bachibouzouk)?

This PR was made on request from PF so that he can have a trace of my local changes we made. I don't think this PR will be merged as is, but just used by PF at some point, maybe @Bachibouzouk you have another opinion?

TheOneAndra avatar Mar 23 '21 12:03 TheOneAndra

This does not need to be merged yet but it might be useful if users want to perform sensitivity analysis

Bachibouzouk avatar Mar 23 '21 13:03 Bachibouzouk

@smartie2076 I placed an example of the code used for my sensitivity analysis in this PR under tests/test_data/example_data_sensitivity/

TheOneAndra avatar Jun 23 '21 15:06 TheOneAndra