Code Refactoring

NOTE: This page is likely to be superseded by the Roadmapping exercise now under way. Once that settles out, this page should be significantly refactored or moved to the historical pages section of the wiki.


We have identified a major refactoring of the SasView code as a priority for the next major release. The refactoring effort has the following goals:

  • Improve the maintainability of the code.
  • Cleanly separate the computation and the UI components to allow
    • easily replacing the UI if/when new technologies become available or when the current one becomes obsolete/unsupported
    • remote submission (necessary to eventually allow use of clusters or HPC backends).

The following approach is thought to be the most practical given the level of effort involved and the resources available.

Suggested Approach (Medium-Term Goals)

  • Follow a progressive refactoring approach rather than a complete re-write.
  • Keep the UI in wx for this first phase.
  • Proceed by identifying use-cases that are known to involve code that need refactoring. For each of those use-cases, identify the API needed to perform the calculations by script.
  • Go through our use-cases and refactor the computation code to follow the new API. Refactor the UI to use the newly refactored code.
  • Release a new version of SasView once this work is completed.

Long-Term Goals

  • Building on the work described above, we can then consider moving to PyQt and/or building a web application version of SasView.
  • Get complete unit test coverage
  • The following version of SasView should be able to submit remote jobs to compute resources to be determined. Those will likely be located at labs, but could alternatively use services like Amazon AWS.

Comments thoughts on proceeding including use cases

  • Batch slicing of 2D data (slicer automation)
  • Loading image data including conversion to q space from command line
  • Batch Guinier, and other "quick" linearized fits(this is an issue for pipeline mode currently because this is done as part of the gui/plotting?).
  • Need to be able to launch several fit perspectives (or others) in sequence (or simultaneously). For example several constrained fits which consists of a number of fit pages and one constraints page all of which are THE active fit perspective in the gui.
  • one would like to be able to run fits, p(r) and possibly invariant in a pipeline mode (no GUI interaction)
Last modified 10 years ago Last modified on Mar 13, 2015 9:47:29 PM