Add ability to load data sources without providing a path
Previously, to load a JSON file with the data in a separate bp
file, you had to specify the directory or path of the data file
in the "paths" map provided to the DataSetReader
read methods.
This is a problem because it makes the file formant not
self-descriptive. When loading data in an application like
ParaView, you have to type in the directory to the bp file
attached to a magic string defined somewhere in the JSON file.
Every. Damn. Time.
This change allows you to specify a relative path to the data source .bp file within the JSON file. If you do not specify a matching path, the reader will look for the .bp file relative to the JSON file. If you do provide a path, then that path is used. Thus, the old behavior is preserved.
Merge request reports
Activity
@caitlin.ross What do you think of these changes.
A real problem that we have been having with the FIDES reader in ParaView is that in order to load a .json file that points to a .bp file (which a common case as this is easy to modify), you have to enter the paths to any named data sources. This is confusing, error prone, and irritating. It is also creating a chicken-and-egg problem in ParaView where you cannot select which fields to load until the metadata is loaded, and you cannot load the metadata until you specify the paths and load the data.
This change will look for the .bp file relative to the .json file when using the
relative
filename mode. This makes it unnecessary to specify paths in this case and simplifies loading the file. Does this fit within the design of FIDES?requested review from @caitlin.ross
+2 I'm good with these changes. I think this actually ends up being complementary to some Fides changes I'm currently working on.
Does this also need changes in vtkFidesReader in order to make it so you don't need to enter the paths in ParaView? or once this is merged and I update the Fides module in VTK, it will work without other changes in VTK or ParaView?
That's good to hear.
I've done a test build of ParaView with this development branch of FIDES. It works fine without any further changes. That said, it probably makes sense to move the filename and paths widgets to the bottom of the properties. It also makes sense to hide them as advanced properties.
Do: merge
mentioned in commit 50e41b36
mentioned in merge request !173 (merged)
mentioned in commit kmorel/vtk@f3e0179b
mentioned in merge request vtk!11542 (merged)
mentioned in issue #24 (closed)
mentioned in merge request !176 (merged)