Hi, This one is complex but after this, you should be prepared to handle committing by yourself. It would have been better to have not have made all these changes at one, but to have discussed each one by one. Please do not develop in isolation and then dump large changes back into the project, this makes collaborative development hard and shows that you are not yet ready to be a developer. I'll go over this in pieces: 1) The new module auto_analysis.auto_noe. Firstly the directory is called 'auto_analyses' and not 'auto_analysis'. This change should occur in the 1.3 main line, and not the bieri_gui branch. The changes will make their way into the branch via svnmerge. If you don't know svnmerge and branches, you will need to learn about this to maintain the GUI branch. This is not isolated code, but started as a file copy. This must be in the repository. So the first thing that needs to be done by the committer (you in the future) is: $ svn cp auto_analyses/relax_fit.py auto_analyses/auto_noe.py I'm guessing this is the source of this file, which was then modified with the NOE specific execution? I would also suggest the name auto_analyses/noe.py or auto_analyses/noe_calculation.py. It might be better to first discuss file layout changes before making these. To apply this, I will need to know the origin of the file and I'll need a detailed commit message describing it's origin, the changes, etc. 2) The new picture gui_bieri/images/noe.png. This should have it's own commit message and be one commit. A link to the old posts discussing this change would be useful. 3) The gui_bieri/analyses/auto_noe.py changes. This should be a series of commits. Firstly there is no code shared with other analyses, so auto_noe_base.py is not needed. You should work from the current file gui_bieri/analyses/auto_noe.py - your original code - and follow the changes I made to auto_rx_base.py. Look at what happens if in the base directory you type: $ svn log -v --stop-on-copy gui_bieri/analyses/auto_r1.py You should follow the changes listed in: $ svn log -v --stop-on-copy gui_bieri/analyses/auto_rx_base.py Note first the code deletion. This is the major part and should happen and be committed before you touch any other lines of code. The actual changes can be seen in the relax-commits archives (https://mail.gna.org/public/relax-commits/). You don't have to follow the order, and some commits I made are useless for you to make (debugging, fixing my own mistakes like missing imports, etc.). But changes like the shifting of each GUI element one-by-one (one commit for each) into the self.add_*() methods are important to follow. It would be best if you follow the changes from the svn log (from earliest revision to latest) one by one and decide what you should do at each point - copy what I did, do things slightly differently, or skip it as it is irrelevant. But each change should be in one commit. 4) The notebook layout code changes. I very much like these modifications! I was almost about to commit this code before I realised that this single change does not have a proper commit message for me to copy and paste :( The description "All the __do_layout() and __do_properties() are removed (just window title and size is still present). The notebooks are craeted in a separate function called build_notebooks()." can be used as the main text (with the spelling fixed :S), but I'll need a title line. (The point of a title is because I use it to make the change lists in the news items for newly released versions). There are a number of other issues that I should not need to correct any more. Firstly there are not 2 empty lines above the "def build_notebooks(self):" line. Actually, there are many new double, triple or more empty lines that have been introduced :(. Secondly if I type: $ grep " def " relax_gui.py def __init__(self, *args, **kwds): def __do_layout(self): def __set_properties(self): def about_gui(self, event): def about_relax(self, event): def action_state_save(self, event): def action_state_save_as(self, event): def build_main_window(self): def build_menu_bar(self): def build_menu_sub_item(self, menu, id=None, text='', tooltip='', icon=None): def exec_noe1(self, event): # Start NOE calculation no. 1 def exec_noe2(self, event): # start noe 2 calculation def exec_noe3(self, event): # calculate noe 3 def exit_gui(self, event): def build_notebooks(self): def import_seq(self, event): # open load sequence panel def init_data(self): def newGUI(self, event): # New def open_model_results_exe(self, event): # open model-free results def open_noe_results_exe(self, event): #open results of noe run def open_rx_results_exe(self, event): # open results of r1 and r2 runs def param_file_setting(self, event): # set up parameter files def ref_noe(self, event): def ref_noe2(self, event): def ref_noe3(self, event): def references(self, event): def resdir_modelfree(self, event): def resdir_noe1(self, event): # noe 1 results dir def resdir_noe2(self, event): # noe results dir no. 2 def resdir_noe3(self, event): # noe 3 results dir def reset_setting(self, event): #reset all settings def sat_noe1(self, event): def sat_noe2(self, event): def sat_noe3(self, event): def settings(self, event): # set up for relax variables def show_controller(self, event): def state_load(self, event): def state_save(self): def sync_ds(self, upload=False): $ Note where the build_notebooks() method lies! Please place this in the correct position. In a second commit, this method should be merged with build_main_window() because that is where all the wx.Panel() and wx.Notebook() instantiations occur. The 2 methods have the same goal, to produce the current notebook layout. Currently one makes the panels and notebooks, and the other packs them using the box sizers. Then class variables such as 'self.notebook_frq_1' can be converted to local variables 'notebook_frq_1' as no other part of the code touches 'notebook_frq_1'. As these are repeated, all 3 could be called 'notebook', 'self.frqx' replaced by 'panel', etc. These self.* variables are an indication of where related code is. Having the code scattered hinders debugging and modifications to be made. I hope that learning the correct coding style and how to interact in an open source project doesn't discourage you from contributing! Most of the relax developers started with no coding experience. It is a long and never ending learning experience that I hope you can make the most of. It should become more enjoyable once you have commit access but, before this can happen, the changes you submit must be more palatable for the others committers here to review. And don't forget that all file layout changes must occur in the repository with 'svn add', 'svn cp', 'svn mv', 'svn rm', etc. The ultimate goal is to have perfect, bug free code that is fully functional. Well, that is my goal anyway, to provide the user with a high quality program. One that will come with your soon to be high quality coded GUI! Cheers, Edward On 17 February 2010 05:10, Michael Bieri <NO-REPLY.INVALID-ADDRESS@xxxxxxx> wrote:
Follow-up Comment #36, task #6847 (project relax): Hi Edward Here some major changes. i attached all the new and heavy mofidied files in the zip file in the corresponding folder structure. A short summary: In the relax_gui.py file, all the __do_layout() and __do_properties() are removed (just window title and size is still present). The notebooks are craeted in a separate function called build_notebooks(). In addition, I started coding the NOE analysis as you did with the rx analysis. Some major parameters are missing in the save file, such as structure file, unresolved residues.... I also made another image for NOE tabs. So far, I have no idea how to commit these remodellings... Please have a look. Cheers Michael (file #8142) _______________________________________________________ Additional Item Attachment: File name: bieri_gui.zip Size:38 KB _______________________________________________________ Reply to this item at: <http://gna.org/task/?6847> _______________________________________________ Nachricht geschickt von/durch Gna! http://gna.org/ _______________________________________________ relax (http://nmr-relax.com) This is the relax-devel mailing list relax-devel@xxxxxxx To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-devel