Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ice-dev] [ice-build] [eclipse/ice] b5d553: Removed the CSVPlot.hasValidProvider() method, and...

To add:

The files that have motivated this are the BISON peaking factor files, which all seem to have some rows shorter than others. I have a feeling these files are just a convenient file format to use for inputting values at runtime, and are never actually meant to be plotted. Regardless, JobLaunchers still adds *all* files to the ResourceComponent, including these input files. We could just get around this by not adding these input files to the JobLauncher's ResourceComponent, but it probably wouldn't be a bad idea to have some sort of safety in place for invalid CSV files.


________________________________________
From: Wojtowicz, Anna
Sent: Tuesday, February 17, 2015 2:20 PM
To: ice developer discussions
Subject: Re: [ice-dev] [ice-build] [eclipse/ice] b5d553: Removed the CSVPlot.hasValidProvider() method, and...

Well, a plot with invalid data will still show up in the ResourceComponent. A user can still click on it, and that's where I make use of the isValidPlot() method, to check if the resource should actually attempt to plot (will throw errors), or just complain (which is what it currently does, in the console).

I haven't found a better place to put this kind of check, because IPlots are handled in generally this order on the ICEResourcePage:

1.) ResourceComponent updates to say "hay I got some plots"
2.) ICEResourcePage checks the ResourceComponent for new VizResources (CSV files in this case)
3.) If a new VizResource is found, it will create a CSVDataLoader. The URI is valid, the file exists, everything checks out in this respect.
4.) CSVDataLoader calls load(), which returns a CSVDataProvider object, which gets stored on the CSVPlot object. This is what contains the actual CSV data. Here's the caveat -- if the CSV file isn't in a m x n format (which is necessary for plotting), I've made it so the CSVDataLoader will just exit (and print an error), which causes the CSVDataProvider to be null. Now we have a CSVPlot with a null CSVDataProvider (ie. no data because it was invalid)

________________________________________
From: ice-dev-bounces@xxxxxxxxxxx <ice-dev-bounces@xxxxxxxxxxx> on behalf of Deyton, Jordan H. <deytonjh@xxxxxxxx>
Sent: Tuesday, February 17, 2015 1:50 PM
To: ice developer discussions
Subject: Re: [ice-dev] [ice-build] [eclipse/ice] b5d553: Removed the CSVPlot.hasValidProvider() method, and...

Anna,

I think the reason he said "Jordan" was because he and I discussed the same issue a few days ago.

In any case, if the data is invalid but otherwise has CSV plot types, shouldn't the CSVPlot have some way to deal with it? Maybe open a dialog explaining the invalid data or just expose what data can be displayed? Then you wouldn't need the extra method on IPlot.

Just one option to consider...

Jordan

________________________________________
From: ice-dev-bounces@xxxxxxxxxxx <ice-dev-bounces@xxxxxxxxxxx> on behalf of Wojtowicz, Anna <wojtowicza@xxxxxxxx>
Sent: Tuesday, February 17, 2015 1:29 PM
To: ice developer discussions
Subject: Re: [ice-dev] [ice-build] [eclipse/ice] b5d553: Removed the CSVPlot.hasValidProvider() method, and...

(It was me who put it in, not Jordan)


This was motivated by realizing that some BISON CSV files don't have valid m x n formats (i.e. some rows shorter or longer). The plot types list is created and filled at construction, and then actual data is loaded into it after that. So it is possible in this sense, for the plot to have a valid list of plot types, but have invalid data.? Is there a better way to address this gap?


Anna


________________________________
From: ice-dev-bounces@xxxxxxxxxxx <ice-dev-bounces@xxxxxxxxxxx> on behalf of Jay J. Billings <billingsjj@xxxxxxxx>
Sent: Tuesday, February 17, 2015 12:37 PM
To: ice developer discussions
Subject: Re: [ice-dev] [ice-build] [eclipse/ice] b5d553: Removed the CSVPlot.hasValidProvider() method, and...

Jordan,

I would expect isValidPlot() to basically be a convenience method that essentially wraps getPlotTypes() and checks whether the map is empty? That was the original way that I intended IPlot to work because it should be able to
1.) Check the file type and see if it can even load it.
2.) Read the head, if one is available, and determine what it can load.
3.) Throw an exception if it cannot plot it.

If isValidPlot() is for something else and I am missing it, please correct me. My goal is to make sure that we don't end up bloating the implementation or the interfaces.

Jay

On 02/17/2015 11:54 AM, GitHub wrote:

  Branch: refs/heads/anna/postprocessing
  Home:   https://github.com/eclipse/ice
  Commit: b5d5534aae05fe5bf826fd31720b898048a6035c
      https://github.com/eclipse/ice/commit/b5d5534aae05fe5bf826fd31720b898048a6035c
  Author: Anna Wojtowicz <wojtowicza@xxxxxxxx><mailto:wojtowicza@xxxxxxxx>
  Date:   2015-02-17 (Tue, 17 Feb 2015)

  Changed paths:
    M src/org.eclipse.ice.client.widgets/src/org/eclipse/ice/client/widgets/ICEResourcePage.java
    M src/org.eclipse.ice.client.widgets/src/org/eclipse/ice/client/widgets/viz/service/IPlot.java
    M src/org.eclipse.ice.viz.service.visit/src/org/eclipse/ice/viz/service/visit/VisItPlot.java
    M src/org.eclipse.ice.viz.service/src/org/eclipse/ice/viz/service/csv/CSVPlot.java

  Log Message:
  -----------
  Removed the CSVPlot.hasValidProvider() method, and instead added a
method to the IPlot interface called isValidPlot() that returns a
boolean. It will be up to each implementation to discern what is/isn't
valid plotting data. This is necessary because it's still possible to
have a valid IPlot object, but have invalid data loaded into it.

Signed-off-by: Anna Wojtowicz <wojtowicza@xxxxxxxx><mailto:wojtowicza@xxxxxxxx>






_______________________________________________
ice-build mailing list
ice-build@xxxxxxxxxxx<mailto:ice-build@xxxxxxxxxxx>
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/ice-build



--
Jay Jay Billings
Oak Ridge National Laboratory
Twitter Handle: @jayjaybillings
_______________________________________________
ice-dev mailing list
ice-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/ice-dev
_______________________________________________
ice-dev mailing list
ice-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/ice-dev

Back to the top