c4920ea11ef69a5597b83af961685034c8330e99,openml/setups/setup.py,OpenMLParameter,__str__,#OpenMLParameter#,84

Before Change


        header = "{}\n{}\n".format(header, "=" * len(header))

        base_url = "{}".format(openml.config.server[:-len("api/v1/xml")])
        fields = pd.Series({"ID": self.id,
                            "Flow ID": self.flow_id,
                            // "Flow Name": self.flow_name,
                            "Flow Name": self.full_name,
                            "Flow URL": "{}f/{}".format(base_url, self.flow_id),
                            "Parameter Name": self.parameter_name})
        // indented prints for parameter attributes
        // indention = 2 spaces + 1 | + 2 underscores
        indent = "{}|{}".format(" " * 2, "_" * 2)
        parameter_data_type = "{}Data Type".format(indent)
        parameter_default = "{}Default".format(indent)
        parameter_value = "{}Value".format(indent)
        fields = fields.append(pd.Series({parameter_data_type: self.data_type,
                                          parameter_default: self.default_value,
                                          parameter_value: self.value}))

        order = ["ID", "Flow ID", "Flow Name", "Flow URL", "Parameter Name",
                 parameter_data_type, parameter_default, parameter_value]
        fields = list(fields.reindex(order).dropna().iteritems())
        
        longest_field_name_length = max(len(name) for name, value in fields)
        field_line_format = "{{:.<{}}}: {{}}".format(longest_field_name_length)
        body = "\n".join(field_line_format.format(name, value) for name, value in fields)
        return header + body

After Change


        header = "{}\n{}\n".format(header, "=" * len(header))

        base_url = "{}".format(openml.config.server[:-len("api/v1/xml")])
        fields = {"ID": self.id,
                  "Flow ID": self.flow_id,
                  // "Flow Name": self.flow_name,
                  "Flow Name": self.full_name,
                  "Flow URL": "{}f/{}".format(base_url, self.flow_id),
                  "Parameter Name": self.parameter_name}
        // indented prints for parameter attributes
        // indention = 2 spaces + 1 | + 2 underscores
        indent = "{}|{}".format(" " * 2, "_" * 2)
        parameter_data_type = "{}Data Type".format(indent)
        fields[parameter_data_type] = self.data_type
        parameter_default = "{}Default".format(indent)
        fields[parameter_default] = self.default_value
        parameter_value = "{}Value".format(indent)
        fields[parameter_value] = self.value

        // determines the order in which the information will be printed
        order = ["ID", "Flow ID", "Flow Name", "Flow URL", "Parameter Name",
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 15

Instances


Project Name: openml/openml-python
Commit Name: c4920ea11ef69a5597b83af961685034c8330e99
Time: 2019-06-11
Author: neeratyoy@gmail.com
File Name: openml/setups/setup.py
Class Name: OpenMLParameter
Method Name: __str__


Project Name: openml/openml-python
Commit Name: c4920ea11ef69a5597b83af961685034c8330e99
Time: 2019-06-11
Author: neeratyoy@gmail.com
File Name: openml/setups/setup.py
Class Name: OpenMLParameter
Method Name: __str__


Project Name: openml/openml-python
Commit Name: c4920ea11ef69a5597b83af961685034c8330e99
Time: 2019-06-11
Author: neeratyoy@gmail.com
File Name: openml/flows/flow.py
Class Name: OpenMLFlow
Method Name: __str__


Project Name: openml/openml-python
Commit Name: c4920ea11ef69a5597b83af961685034c8330e99
Time: 2019-06-11
Author: neeratyoy@gmail.com
File Name: openml/runs/run.py
Class Name: OpenMLRun
Method Name: __str__