Author: bugman Date: Tue Jul 26 15:06:37 2011 New Revision: 13887 URL: http://svn.gna.org/viewcvs/relax?rev=13887&view=rev Log: Redesigned how the auto-analyses are handled by the status singleton. The init_auto_analysis() has been created, and each analysis has its own status container within the status.auto_analysis dictionary. Modified: branches/gui_testing/status.py Modified: branches/gui_testing/status.py URL: http://svn.gna.org/viewcvs/relax/branches/gui_testing/status.py?rev=13887&r1=13886&r2=13887&view=diff ============================================================================== --- branches/gui_testing/status.py (original) +++ branches/gui_testing/status.py Tue Jul 26 15:06:37 2011 @@ -63,23 +63,14 @@ # Execution lock object. self.exec_lock = Exec_lock() + # The auto-analysis status containers. + self.auto_analysis = {} + # Testing mode flag. self.test_mode = False # The GUI flag. self.show_gui = False - - # The Monte Carlo simulation status. - self.mc_number = None - - # The dAuvergne_protocol automatic analysis status. - self.dAuvergne_protocol = Status_container() - self.dAuvergne_protocol.diff_model = None # The global diffusion model. - self.dAuvergne_protocol.round = None # The round of optimisation, i.e. the global iteration. - self.dAuvergne_protocol.mf_models = None # The list of model-free models for optimisation, i.e. the global iteration. - self.dAuvergne_protocol.local_tm_models = None # The list of model-free local tm models for optimisation, i.e. the global iteration. - self.dAuvergne_protocol.current_model = None # The current model-free model. - self.dAuvergne_protocol.convergence = False # The convergence of the global model. # A structure for skipped system and unit tests. self.skipped_tests = [] @@ -106,6 +97,26 @@ # The observer object for relax resets self.observers.reset = Observer() + + + def init_auto_analysis(self, name, type): + """Initialise a status container for an auto-analysis. + + @param name: The unique name of the auto-analysis. This will act as a key. + @type name: str. + @param type: The type of auto-analysis. + @type type: str + """ + + # Add a status container. + self.auto_analysis[name] = Status_container() + + # Store the analysis type. + self.auto_analysis[name].type = type + + # The Monte Carlo simulation status, if used. + self.mc_number = None + class Status_container: