From 6c870d0b020d7c900151de8334e9a3f6efec73db Mon Sep 17 00:00:00 2001 From: Andre Correa Date: Fri, 21 Feb 2025 19:43:34 -0300 Subject: [PATCH 1/4] fix graphics range --- internal_quality_analysis-sonarqube.ipynb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/internal_quality_analysis-sonarqube.ipynb b/internal_quality_analysis-sonarqube.ipynb index a2dff35..f998073 100644 --- a/internal_quality_analysis-sonarqube.ipynb +++ b/internal_quality_analysis-sonarqube.ipynb @@ -979,7 +979,7 @@ " plt.plot(data['test_success'], linewidth=3, marker='v', markersize=10, label=\"test_success - Passed tests\")\n", " plt.plot(data['fast_tests'], linewidth=3, marker='^', markersize=10, label=\"fast_tests - Fast test builds\")\n", " plt.plot(data['coverage'], linewidth=3, marker='>', markersize=10, label=\"coverage - Coverage\")\n", - "\n", + " plt.ylim(-0.05 ,1.05)\n", " plt.title(f\"{name} - Metrics\", fontsize=20)\n", " plt.legend(loc='best')\n", " plt.show()" @@ -1053,6 +1053,7 @@ "\n", "plt.title(\"Code Quality\", fontsize=20)\n", "plt.legend(loc='best')\n", + "plt.ylim(-0.05 ,1.05)\n", "plt.show()" ] }, @@ -1088,6 +1089,7 @@ "\n", "plt.title(\"Testing Status\", fontsize=20)\n", "plt.legend(loc='best')\n", + "plt.ylim(-0.05 ,1.05)\n", "plt.show()" ] }, @@ -1184,7 +1186,7 @@ " plt.plot(metrics['Maintainability'], linewidth=3, marker='o', markersize=10, label=\"Maintainability\")\n", " plt.plot(metrics['Reliability'], linewidth=3, marker='*', markersize=10, label=\"Reliability\")\n", "\n", - " plt.ylim(0.1,1.1)\n", + " plt.ylim(-0.05 ,1.05)\n", " plt.title(f'{name} - Maintainability and Reliability', fontsize=20)\n", " plt.legend(loc='best')\n", " plt.show()\n", @@ -1193,7 +1195,7 @@ "\n", " plt.plot(metrics['total'], linewidth=3, marker='X', markersize=5)\n", "\n", - " plt.ylim(0.1,1.1)\n", + " plt.ylim(-0.05 ,1.05)\n", " plt.title(f'{name} - Total', fontsize=20)\n", " plt.show()" ] @@ -1280,7 +1282,7 @@ "for name, data in metrics.items():\n", " plt.plot(data['total'], linewidth=3, marker='o', markersize=10, label=name)\n", "\n", - "plt.ylim(.1,1)\n", + "plt.ylim(-0.05 ,1.05)\n", "plt.title(\"Total - Quality indicator\", fontsize=20)\n", "plt.legend(loc='best')\n", "plt.show()" From 4fc32e1adc26ce6d0eb84605ff3637fea5e0a2af Mon Sep 17 00:00:00 2001 From: Andre Correa Date: Fri, 21 Feb 2025 20:04:10 -0300 Subject: [PATCH 2/4] fix display size on dataframes --- internal_quality_analysis-github.ipynb | 18 --------------- internal_quality_analysis-sonarqube.ipynb | 28 ----------------------- 2 files changed, 46 deletions(-) diff --git a/internal_quality_analysis-github.ipynb b/internal_quality_analysis-github.ipynb index f45113b..514085e 100644 --- a/internal_quality_analysis-github.ipynb +++ b/internal_quality_analysis-github.ipynb @@ -89,24 +89,6 @@ " 'axes.edgecolor' : 'white'})" ] }, - { - "cell_type": "markdown", - "id": "8acf667d30c388a4", - "metadata": {}, - "source": [ - "### DATAFRAME SETTINGS" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "8abe491f7ee0858", - "metadata": {}, - "outputs": [], - "source": [ - "pd.set_option(\"display.max_rows\", None, \"display.max_columns\", None)" - ] - }, { "cell_type": "markdown", "id": "3644ede13815812", diff --git a/internal_quality_analysis-sonarqube.ipynb b/internal_quality_analysis-sonarqube.ipynb index f998073..ac4ad9c 100644 --- a/internal_quality_analysis-sonarqube.ipynb +++ b/internal_quality_analysis-sonarqube.ipynb @@ -105,34 +105,6 @@ " 'axes.edgecolor' : 'white'})" ] }, - { - "cell_type": "markdown", - "metadata": { - "pycharm": { - "name": "#%% md\n" - } - }, - "source": [ - "### DATAFRAME SETTINGS" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false, - "jupyter": { - "outputs_hidden": false - }, - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [], - "source": [ - "pd.set_option(\"display.max_rows\", None, \"display.max_columns\", None)" - ] - }, { "cell_type": "markdown", "metadata": {}, From 676fa49b367fcd889b4f0847f42dd48476a1f3e8 Mon Sep 17 00:00:00 2001 From: Andre Correa Date: Fri, 21 Feb 2025 20:28:46 -0300 Subject: [PATCH 3/4] add label filter on github requests --- parser_template.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parser_template.py b/parser_template.py index c9e81ad..dbcecff 100644 --- a/parser_template.py +++ b/parser_template.py @@ -166,7 +166,7 @@ def save_github_metrics_issues(): page = 1 while True: - response = requests.get(api_url_issues, params={'state': 'all', 'per_page': 100, 'page': page}) + response = requests.get(api_url_issues, params={'state': 'all', 'per_page': 100, 'page': page, 'labels': 'US,bug,FEATURE,enhancement'}) page_issues = response.json() if not page_issues: From f923afd837c6dc09dd9e1aa33fb2ebd5884bad59 Mon Sep 17 00:00:00 2001 From: Andre Correa Date: Sat, 22 Feb 2025 19:15:22 -0300 Subject: [PATCH 4/4] add min-max normalization on ci-feedback --- internal_quality_analysis-github.ipynb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/internal_quality_analysis-github.ipynb b/internal_quality_analysis-github.ipynb index 514085e..2c01ccd 100644 --- a/internal_quality_analysis-github.ipynb +++ b/internal_quality_analysis-github.ipynb @@ -36,7 +36,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "id": "a3bcddb987f2383e", "metadata": { "ExecuteTime": { @@ -599,6 +599,8 @@ " dates = temp.groupby(['Created at']).mean().reset_index()\n", " dates['Created at'] = pd.to_datetime(dates['Created at'])\n", "\n", + " dates['Ci Feedback Time']=(dates['Ci Feedback Time']-dates['Ci Feedback Time'].min())/(dates['Ci Feedback Time'].max()-dates['Ci Feedback Time'].min())\n", + "\n", " plt.figure(figsize=(15, 7))\n", " plt.plot(range(len(dates)), dates['Ci Feedback Time'], marker='o', color='b', label='Feedback Time')\n", " plt.xlabel(\"Created at\")\n", @@ -715,13 +717,13 @@ "language_info": { "codemirror_mode": { "name": "ipython", - "version": 2 + "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython2", + "pygments_lexer": "ipython3", "version": "3.11.2" } },