-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feat/aut1000] - SmartPeak support for exporting workflow results as plots #412
Conversation
DeepCode's analysis on #31a75f found:
Top issues
👉 View analysis in DeepCode’s Dashboard | Configure the bot👉 The DeepCode service and API will be deprecated in August, 2021. Here is the information how to migrate. Thank you for using DeepCode 🙏 ❤️ !If you are using our plugins, you might be interested in their successors: Snyk's JetBrains plugin and Snyk's VS Code plugin. |
DeepCode's analysis on #4afb3e found:
Top issues
👉 View analysis in DeepCode’s Dashboard | Configure the bot👉 The DeepCode service and API will be deprecated in August, 2021. Here is the information how to migrate. Thank you for using DeepCode 🙏 ❤️ !If you are using our plugins, you might be interested in their successors: Snyk's JetBrains plugin and Snyk's VS Code plugin. |
DeepCode's analysis on #0f2579 found:
Top issues
👉 View analysis in DeepCode’s Dashboard | Configure the bot👉 The DeepCode service and API will be deprecated in August, 2021. Here is the information how to migrate. Thank you for using DeepCode 🙏 ❤️ !If you are using our plugins, you might be interested in their successors: Snyk's JetBrains plugin and Snyk's VS Code plugin. |
DeepCode's analysis on #086aad found:
Top issues
👉 View analysis in DeepCode’s Dashboard | Configure the bot👉 The DeepCode service and API will be deprecated in August, 2021. Here is the information how to migrate. Thank you for using DeepCode 🙏 ❤️ !If you are using our plugins, you might be interested in their successors: Snyk's JetBrains plugin and Snyk's VS Code plugin. |
DeepCode's analysis on #b5d503 found:
Top issues
👉 View analysis in DeepCode’s Dashboard | Configure the bot👉 The DeepCode service and API will be deprecated in August, 2021. Here is the information how to migrate. Thank you for using DeepCode 🙏 ❤️ !If you are using our plugins, you might be interested in their successors: Snyk's JetBrains plugin and Snyk's VS Code plugin. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea using the GNU plotting library. Overall it looks quite nice to me. I look forward to seeing the demo tomorrow.
It would be good to have Bertrands review as well.
@@ -266,5 +279,33 @@ namespace SmartPeak | |||
} | |||
return result; | |||
} | |||
|
|||
void GraphicDataVizWidget::showInstallationInstructions() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea.
|
||
std::filesystem::remove_all(main_path / "plots"); | ||
#endif | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the Win version missing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the directive to include Win
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's nice, i would like to see a demo :)
I had some minor comments, but would be nice to handle them before to merge it.
one thing should be very nice is to use the FilePicker. to make the user choose where he want the plot to be saved.
@@ -18,6 +18,7 @@ set(sources_list_h | |||
LogWidget.h | |||
ParameterEditorWidget.h | |||
ParametersTableWidget.h | |||
Plotter.h |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(minor) Here all lines are using tabs but you are using space. please use tab.
ImGui::SameLine(); | ||
if (ImGui::Button("Save Plot")) | ||
{ | ||
PlotExporter* exported_plot = new PlotExporter(application_handler_.main_dir_.string(), graph_viz_data_, selected_format); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't you use unique_ptr here ? (or just get a stack variable)
@@ -17,6 +17,7 @@ set(sources_list | |||
LogWidget.cpp | |||
ParameterEditorWidget.cpp | |||
ParametersTableWidget.cpp | |||
Plotter.cpp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use tab instead of spaces here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes my editor had altered settings
@@ -30,6 +30,7 @@ set(core_executables_list | |||
set(io_executables_list | |||
CSVWriter_test | |||
ParametersParser_test | |||
PlotExporter_test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use tab instead of spaces here.
std::filesystem::path main_path; | ||
SmartPeak::SessionHandler::GraphVizData graph_viz_data_; | ||
|
||
SmartPeak::Utilities::getEnvVariable("HOME", &home_path); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would be more in favor to use std::filesystem::temp_directory_path to create a directory suitable for unit tests.
|
||
//PNG=0, PDF=1, HTML=2, SVG=3 | ||
#if defined(__APPLE__) || defined(__linux__) | ||
SmartPeak::PlotExporter* exported_png = new SmartPeak::PlotExporter(main_path.string(), graph_viz_data_, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's always better to use smart pointer than the good old new/delete pair (or to construct on the stack?). is it possible?
@@ -85,6 +90,7 @@ namespace SmartPeak | |||
std::optional<float> marker_position_; | |||
bool use_markers_ = false; | |||
bool is_spectra_ = false; | |||
// const std::unique_ptr<std::filesystem::path> working_path_ = std::make_unique<std::filesystem::path>(application_handler_.main_dir_); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this could be remove ?
src/smartpeak/source/ui/Plotter.cpp
Outdated
} | ||
return true; | ||
} else { | ||
LOGW << "gnuplot not found! Not generating any plots."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could be an error (LOGE).
@@ -22,6 +22,7 @@ | |||
// -------------------------------------------------------------------------- | |||
|
|||
#include <SmartPeak/ui/GraphicDataVizWidget.h> | |||
#include <SmartPeak/ui/FilePicker.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see you are using the FilePicker. it would be very nice to use it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It wasn't implemented by the time of reviewing, now it's in.
Objectives
Sample plots
Original
As PDF (highest resolution)
smartpeak-exported-plot.pdf
As PNG