acecalisto3 commited on
Commit
549d780
·
verified ·
1 Parent(s): 032ef8f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -5
app.py CHANGED
@@ -403,7 +403,9 @@ class IssueManager:
403
  if not match:
404
  logger.error(f"Invalid GitHub URL format: {{self.repo_url}}")
405
  empty_fig = go.Figure()
406
- empty_fig.update_layout(title="Issue Severity Distribution", annotations=[{{"text": "Invalid URL.", "xref": "paper", "yref": "paper", "showarrow": False}}], plot_bgcolor='rgba(0,0,0,0)', paper_bgcolor='rgba(0,0,0,0)')
 
 
407
  return [], empty_fig, "Error: Invalid GitHub URL format. Use https://github.com/owner/repo", empty_fig
408
  self.repo_owner, self.repo_name = match.groups()
409
  self.repo_local_path = WORKSPACE / f"{{self.repo_owner}}_{{self.repo_name}}"
@@ -452,12 +454,16 @@ class IssueManager:
452
  except GitCommandError as e:
453
  logger.error(f"Failed to clone/update repository: {{e}}")
454
  empty_fig = go.Figure()
455
- empty_fig.update_layout(title="Issue Severity Distribution", annotations=[{{"text": "Repo Error.", "xref": "paper", "yref": "paper", "showarrow": False}], plot_bgcolor='rgba(0,0,0,0)', paper_bgcolor='rgba(0,0,0,0)')
 
 
456
  return [], empty_fig, f"Error cloning/updating repository: {{e}}. Check URL, permissions, and network.", empty_fig
457
  except Exception as e:
458
  logger.exception(f"An unexpected error occurred during repository handling: {{e}}")
459
  empty_fig = go.Figure()
460
- empty_fig.update_layout(title="Issue Severity Distribution", annotations=[{{"text": "Repo Error.", "xref": "paper", "yref": "paper", "showarrow": False}], plot_bgcolor='rgba(0,0,0,0)', paper_bgcolor='rgba(0,0,0,0)')
 
 
461
  return [], empty_fig, f"An unexpected error occurred during repo setup: {{e}}", empty_fig
462
 
463
 
@@ -572,14 +578,18 @@ class IssueManager:
572
  self.stop_idle_processing()
573
  self.stop_broadcast_loop()
574
  empty_fig = go.Figure()
575
- empty_fig.update_layout(title="Issue Severity Distribution", annotations=[{{"text": "API Error.", "xref": "paper", "yref": "paper", "showarrow": False}], plot_bgcolor='rgba(0,0,0,0)', paper_bgcolor='rgba(0,0,0,0)')
 
 
576
  return [], empty_fig, error_msg, empty_fig
577
  except Exception as e:
578
  self.stop_idle_processing()
579
  self.stop_broadcast_loop()
580
  logger.exception(f"An unexpected error occurred during issue crawl: {{e}}")
581
  empty_fig = go.Figure()
582
- empty_fig.update_layout(title="Issue Severity Distribution", annotations=[{{"text": "Unexpected Error.", "xref": "paper", "yref": "paper", "showarrow": False}], plot_bgcolor='rgba(0,0,0,0)', paper_bgcolor='rgba(0,0,0,0)')
 
 
583
  return [], empty_fig, f"An unexpected error occurred: {{e}}", empty_fig
584
 
585
  def _determine_severity(self, labels: List[str]) -> str:
 
403
  if not match:
404
  logger.error(f"Invalid GitHub URL format: {{self.repo_url}}")
405
  empty_fig = go.Figure()
406
+ empty_fig.update_layout(title="Issue Severity Distribution",
407
+ annotations=[{{"text": "Invalid URL.", "xref": "paper", "yref": "paper", "showarrow": False}}],
408
+ plot_bgcolor='rgba(0,0,0,0)', paper_bgcolor='rgba(0,0,0,0)')
409
  return [], empty_fig, "Error: Invalid GitHub URL format. Use https://github.com/owner/repo", empty_fig
410
  self.repo_owner, self.repo_name = match.groups()
411
  self.repo_local_path = WORKSPACE / f"{{self.repo_owner}}_{{self.repo_name}}"
 
454
  except GitCommandError as e:
455
  logger.error(f"Failed to clone/update repository: {{e}}")
456
  empty_fig = go.Figure()
457
+ empty_fig.update_layout(title="Issue Severity Distribution",
458
+ annotations=[{{"text": "Repo Error.", "xref": "paper", "yref": "paper", "showarrow": False}}],
459
+ plot_bgcolor='rgba(0,0,0,0)', paper_bgcolor='rgba(0,0,0,0)')
460
  return [], empty_fig, f"Error cloning/updating repository: {{e}}. Check URL, permissions, and network.", empty_fig
461
  except Exception as e:
462
  logger.exception(f"An unexpected error occurred during repository handling: {{e}}")
463
  empty_fig = go.Figure()
464
+ empty_fig.update_layout(title="Issue Severity Distribution",
465
+ annotations=[{{"text": "Repo Error.", "xref": "paper", "yref": "paper", "showarrow": False}}],
466
+ plot_bgcolor='rgba(0,0,0,0)', paper_bgcolor='rgba(0,0,0,0)')
467
  return [], empty_fig, f"An unexpected error occurred during repo setup: {{e}}", empty_fig
468
 
469
 
 
578
  self.stop_idle_processing()
579
  self.stop_broadcast_loop()
580
  empty_fig = go.Figure()
581
+ empty_fig.update_layout(title="Issue Severity Distribution",
582
+ annotations=[{{"text": "API Error.", "xref": "paper", "yref": "paper", "showarrow": False}],
583
+ plot_bgcolor='rgba(0,0,0,0)', paper_bgcolor='rgba(0,0,0,0)')
584
  return [], empty_fig, error_msg, empty_fig
585
  except Exception as e:
586
  self.stop_idle_processing()
587
  self.stop_broadcast_loop()
588
  logger.exception(f"An unexpected error occurred during issue crawl: {{e}}")
589
  empty_fig = go.Figure()
590
+ empty_fig.update_layout(title="Issue Severity Distribution",
591
+ annotations=[{{"text": "Unexpected Error.", "xref": "paper", "yref": "paper", "showarrow": False}],
592
+ plot_bgcolor='rgba(0,0,0,0)', paper_bgcolor='rgba(0,0,0,0)')
593
  return [], empty_fig, f"An unexpected error occurred: {{e}}", empty_fig
594
 
595
  def _determine_severity(self, labels: List[str]) -> str: