BlueQuartzSoftware / DREAM3D

Data Analysis program and framework for materials science data analytics, based on the managing framework SIMPL framework.
http://dream3d.bluequartz.net
Other
163 stars 76 forks source link

Relative data paths should be handled in SIMPLib instead of the GUI #890

Open mmarineBlueQuartz opened 5 years ago

mmarineBlueQuartz commented 5 years ago

Unit tests are not passing because pipelines created with and for DREAM.3D that use relative paths are not compatible with any use of SIMPLib that does not use the GUI.

File path filter parameter widgets change the values of filter parameters so that only relative paths are saved but absolute paths are passed to the filter during preflight and execute. This creates divergent behavior between DREAM.3D pipelines and other projects that want to use the underlying SIMPLib library, like unit tests.

imikejackson commented 5 years ago

Relative paths should work in SIMPL. A relative path is completely dependent on the executable. We should be able to path a relative path to SIMPL and the filter should work correctly. If the filter is failing I think there is a different failure mechanism.

mmarineBlueQuartz commented 5 years ago

The filter parameter widgets dealing with file paths do not handle data purely by relative to the executable. On Mac, it's relative to three directories up. Linux is relative to one directory up. If the SIMPL data directory is defined, it's relative to that. No filter that I am aware of performs any of those checks, certainly not the data directory (which is probably the most important), but the DREAM.3D GUI performs those checks while saving the corresponding "relative" path that unit tests cannot use without modifying filters or generic helpers.

imikejackson commented 5 years ago

Hmm. Something is odd then. The unit tests were passing using relative paths, i.e., using the prebuilt pipelines and pipelinerunner the tests will pass.

mmarineBlueQuartz commented 5 years ago

They weren't for me until I branched off develop and put the GUI path adjustment in SIMPLib operations (the actual class to do so was already in SIMPLib).

Where is your data directory? It doesn't automatically copy mine to the build directory where a true relative path would catch it despite the GUI processing it just fine. Perhaps one plugin did catch it, but others did not and required a fix. At the very least, filters using the FilePathGenerator utility were not using the correct path and caused all of EBSD Reconstruction to fail when the first pipeline could not find the files until the GUI path adjustment was added to access the data directory.