@@ -27,7 +27,6 @@ def __init__(self, message, meta_data):
27
27
self .message = message
28
28
self .meta_data = meta_data
29
29
30
- # collect All pymilo related data.
31
30
def to_pymilo_log (self ):
32
31
"""
33
32
Generate a comprehensive report of the populated error.
@@ -59,13 +58,33 @@ def to_pymilo_log(self):
59
58
60
59
return pymilo_report
61
60
62
- @abstractmethod
63
61
def to_pymilo_issue (self ):
64
62
"""
65
63
Generate an issue form from the populated error.
66
64
67
65
:return: issue form of the associated error as string
68
66
"""
67
+ pymilo_report = self .to_pymilo_log ()
68
+ help_request = """
69
+ \n \n In order to help us enhance Pymilo's functionality, please open an issue associated with this error and put the message below inside.\n
70
+ """
71
+ associated_pymilo_class = "Export" if "Serialization" in self .message else "Import"
72
+ description = "#### Description\n Pymilo {pymilo_class} failed." .format (pymilo_class = associated_pymilo_class )
73
+ steps_to_produce = "\n #### Steps/Code to Reproduce\n It is auto-reported from the pymilo logger."
74
+ expected_behavior = "\n #### Expected Behavior\n A successful Pymilo {pymilo_class}." .format (
75
+ pymilo_class = associated_pymilo_class )
76
+ actual_behavior = "\n #### Actual Behavior\n Pymilo {pymilo_class} failed." .format (
77
+ pymilo_class = associated_pymilo_class )
78
+ operating_system = "#### Operating System\n {os}" .format (os = pymilo_report ['os' ]['full-description' ])
79
+ python_version = "#### Python Version\n {python_version}" .format (
80
+ python_version = pymilo_report ['versions' ]["python-version" ])
81
+ pymilo_version = "#### PyMilo Version\n {pymilo_version}" .format (
82
+ pymilo_version = pymilo_report ['versions' ]["pymilo-version" ])
83
+ gathered_data = "#### Logged Data\n {logged_data}" .format (logged_data = str (pymilo_report ))
84
+
85
+ full_issue_form = help_request + description + steps_to_produce + expected_behavior + \
86
+ actual_behavior + operating_system + python_version + pymilo_version + gathered_data
87
+ return full_issue_form
69
88
70
89
def __str__ (self ):
71
90
"""
0 commit comments