source: sasview/sansdataloader/docs/todo.txt @ 41661a0

ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalccostrafo411magnetic_scattrelease-4.1.1release-4.1.2release-4.2.2release_4.0.1ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change on this file since 41661a0 was aab4e15, checked in by Jae Cho <jhjcho@…>, 13 years ago

rename dataloader

  • Property mode set to 100644
File size: 2.3 KB
Line 
1- Change SingleLoader class name to Loader. There's no reason to add confusion by making the name more complicated.
2- Remove all print statements such as: print "Hello", or print "in loader". If you need to log something, use python's logging module.
3- The following error condition is not dealt with properly:
4   If the used calls Loader.load(path) for a file that has an unknown extension, an exception should be raise.
5   As it is load() will call lookup(), which will simply print "Unknown file type '%s'"%ext.
6   Modules using that function will then fail to recognize the error condition.
7 
8- Look at all the try-except blocks and deal with error conditions.
9- Golden rule of error handling: if you catch an exception and all you do is calling pass or print, you have not dealt with the error properly.
10 If you think you did, then you should definitely explain why in a comment so that developers looking at the code don't
11 think that it's a bug.
12
13- Document all classes and methods, and all inputs and outputs.
14- Where are the comments for log() going? That should be documented in the code. 
15[changed]- Why is the description of the DataLoader module in setup.py "Python module for fitting"?
16- The return object of a load seems to be inconsistent and depend only on the particular reader. This will cause problems since
17  the calling modules will be unable to know what to expect. An interface should be defined.
18 
19 * Functional requirements
20 - Multiple readers might be able to read files with a given extension. (For instance, .txt can
21   be read by the 2-column reader and the 3-column reader.) If the first one raises an exception,
22   the second should be tried. This means that all exceptions raised by a reader should be caught.
23   
24 - All data loaded from a file should be stored in a common class object. 
25 
26 - Avoid use of __setitem__ from outside a class.
27 - Bug: Loading blah.my.txt won't work. Is fixed in reflectivity registry.py
28 - Bug: The extension recognition is case sensitive and shouldn't be.
29 - BUG: if a reader raises an exception other than ValueError, the loader doesn't catch it.
30 
31 * Error conditions
32 - Trying to load a file with an unknown extension should raise a RuntimeException.
33 - Trying to load a corrupted file with a know file extension should raise a RuntimeException. 
Note: See TracBrowser for help on using the repository browser.