diff --git a/notebook/dashboard.ipynb b/notebook/dashboard.ipynb index 9aac083d..88a20e95 100644 --- a/notebook/dashboard.ipynb +++ b/notebook/dashboard.ipynb @@ -105,6 +105,8 @@ "org = g.get_organization(org_name)\n", "repos = org.get_repos()\n", "\n", + "# constants\n", + "text_template = '%{text}'\n", "uno_base_url = 'https://app.lizardbyte.dev/uno'\n", "\n", "# all readthedocs projects\n", @@ -112,7 +114,7 @@ "readthedocs_data_url = f'{uno_base_url}/readthedocs/projects.json'\n", "readthedocs_response = requests.get(readthedocs_data_url)\n", "if not readthedocs_response.ok:\n", - " raise Exception(\"Failed to fetch data from uno\")\n", + " raise LookupError(\"Failed to fetch data from uno\")\n", "readthedocs_data = readthedocs_response.json()\n", "\n", "# Process data\n", @@ -221,7 +223,7 @@ " text='stars',\n", ")\n", "fig.update_traces(\n", - " texttemplate='%{text}',\n", + " texttemplate=text_template,\n", " textposition='inside',\n", ")\n", "fig.update_layout(\n", @@ -299,7 +301,7 @@ " text='forks',\n", ")\n", "fig.update_traces(\n", - " texttemplate='%{text}',\n", + " texttemplate=text_template,\n", " textposition='inside',\n", ")\n", "fig.update_layout(\n", @@ -337,7 +339,7 @@ " text='issue_count',\n", ")\n", "fig.update_traces(\n", - " texttemplate='%{text}',\n", + " texttemplate=text_template,\n", " textposition='inside',\n", ")\n", "fig.update_layout(\n",