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 f9474b5 was
1b0b3ca,
checked in by Gervaise Alina <gervyh@…>, 16 years ago
|
not cleaned yet but working using guiframe
|
-
Property mode set to
100644
|
File size:
1.4 KB
|
Rev | Line | |
---|
[672c44da] | 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. |
---|
[1b0b3ca] | 15 | [changed]- Why is the description of the DataLoader module in setup.py "Python module for fitting"? |
---|
[672c44da] | 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 | |
---|
Note: See
TracBrowser
for help on using the repository browser.