示例#1
0
    def setup_script(self, file=None, dir=None, cite_ids=None, text=None, analysis_type=None, model_selection=None, engine=None, model_elim=False, universal_solution=False):
        """Specify the scripts used in the analysis.

        @keyword file:                  The name of the script file.
        @type file:                     str
        @keyword dir:                   The directory containing the file (defaults to the current directory if None).
        @type dir:                      None or str
        @keyword cite_ids:              The citation ID numbers.
        @type cite_ids:                 None or str
        @param text:                    The script text.
        @type text:                     str
        @keyword analysis_type:         The type of analysis performed.
        @type analysis_type:            str
        @keyword model_selection:       The model selection technique used, if relevant.
        @type model_selection:          None or str
        @keyword engine:                The software engine used in the analysis.
        @type engine:                   str
        @keyword model_elim:            A model-free specific flag specifying if model elimination was performed.
        @type model_elim:               bool
        @keyword universal_solution:    A model-free specific flag specifying if the universal solution was sought after.
        @type universal_solution:       bool
        """

        # Initialise the container if needed.
        if not hasattr(self, "scripts"):
            # The list.
            self.scripts = RelaxListType()

            # The name of the container.
            self.scripts.list_name = "script_list"

            # The description of the container.
            self.scripts.list_desc = "List of scripts used for the analysis"

        # Init the container.
        script = Element()

        # The name of the container.
        script.name = "script"

        # The description of the container.
        script.desc = "Script used for the analysis"

        # Set the attributes.
        script.file = file
        script.dir = dir
        script.cite_ids = cite_ids
        script.text = text
        script.analysis_type = analysis_type
        script.model_selection = model_selection
        script.engine = engine
        script.model_elim = model_elim
        script.universal_solution = universal_solution

        # Append the container.
        self.scripts.append(script)
示例#2
0
    def software_setup(self, name, version=None, url=None, vendor_name=None, cite_ids=None, tasks=None):
        """Set up the software information.

        @param name:            The name of the software program.
        @type name:             str
        @keyword version:       The program version.
        @type version:          None or str
        @keyword url:           The program's URL.
        @type url:              None or str
        @keyword vendor_name:   The name of the company or person behind the program.
        @type vendor_name:      str
        @keyword cite_ids:      The citation ID numbers.
        @type cite_ids:         None or str
        @keyword tasks:         The tasks performed by the program.
        @type tasks:            list of str
        """

        # Initialise the container if needed.
        if not hasattr(self, "software"):
            # The list.
            self.software = RelaxListType()

            # The name of the container.
            self.software.list_name = "software_list"

            # The description of the container.
            self.software.list_desc = "List of software programs used in the analysis"

        # Init the container.
        software = Element()

        # The name of the container.
        software.name = "software"

        # The description of the container.
        software.desc = "Software program used in the analysis"

        # Set the attributes.
        software.software_name = name
        software.url = url
        software.version = version
        software.vendor_name = vendor_name
        software.cite_ids = cite_ids
        software.tasks = tasks

        # Append the container.
        self.software.append(software)