-
-
Notifications
You must be signed in to change notification settings - Fork 619
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
Add automatic data reload on change #667
Conversation
Previously the CSV dataload plugin was not saving the correct XML state when a generated time axis was used.
This adds a feature which automatically reloads log data based on the last modified date. This allows new data (e.g. from a simulation run) to be displayed without user intervention simply by overwriting the log file.
Right now this feature has the same behavior as what you describe in Notepad++ except that it doesn't prompt the user when the file is no longer present, but does continue to monitor it in case it becomes present. What is the use case where you would want the data to be removed from Plotjuggler when the log file goes away? |
@Bartimaeus- I think having a dialog might defeat the purpose of seamlessly automatically reloading. Is there a use case I'm not considering? @facontidavide Any thoughts on how / where to integrate the bool flag to enable this feature? |
Hi, This might work for your particular load plugin, but it is undefined behavior for any other plugin. A solution to solve your problem would be to use a streaming plugin instead, but then there would be a LOT of code duplication related to CSV parsing. Summarizing, this is not a change I want to include. |
@facontidavide Thanks for reviewing. Why is this undefined behavior for other plugins? My understanding was that the If this is indeed not possible with other plugins, could we make this feature CSV specific? For example, add an Enum to |
The fact that we CAN do something doesn't mean we should. |
@facontidavide I agree that I understand if you simply don't want to include the feature, but for my education / understanding I'm trying to understand if your objection is on technical grounds or simply product vision. |
Product vision, mostly. |
@facontidavide Fair enough. If you can think of a way that this type of behavior / feature would better fit into your vision I'd be happy to explore / implement it. It's a pretty big win for our organization's use case. Also if you have technical concerns you'd be willing to share I'd love to hear them just to learn. |
is the data appended to the CSV or is the entire csv modified? |
|
In our case, the CSV is overwritten with new data, although I could see the utility for a CSV streaming plugin for other applications.
Is sponsorship the preferred mechanism for supporting open source projects over submitting PRs for bug fixes / features? I wasn't trying to influence so much as a provide a PR for a new feature. Admittedly I'm not very familiar with SponsorWare. |
Don't take me wrong. All the PR are greatly appreciated and welcome, and I take my time to look at them. This particular behavior, in my opinion, breaks the implicit rules of how a DataLoad plugin should work. |
I believe this PR doesn't change how DataLaod plugins work. It does change when they are invoked. Namely, only when a previously loaded file is modified. Anyway, if you can think of a way a feature similar to this would not break your implicit rules, let me know and I'll try to submit something. |
This adds a feature which automatically reloads log data based on the last modified date. This allows new data (e.g. from a simulation run) to be displayed without user intervention simply by overwriting the log file.
NOTE: This feature is currently enabled by default but in the end should probably be enabled via a preference either globally or in the data load dialog. I'll wait for suggestions on the most suitable location and best way to accomplish this.
Discussion: #653