diff --git a/.gitignore b/.gitignore index 14a5998..da245e6 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ __pycache__/ *.pyc .venv .env +env/ *.py[cod] *$py.class my_config.local.cfg @@ -11,3 +12,12 @@ config.copilot.cfg _df_average_active_users.csv _df_daily_active_users.csv _df_seats.csv +notebooks/.ipynb_checkpoints/ +notebooks/copilot_metrics_active_users.csv +notebooks/copilot_metrics_average_active_users.csv +notebooks/copilot_metrics_billing_global.csv +notebooks/copilot_metrics_chat_global.csv +notebooks/copilot_metrics_chat_team.csv +notebooks/copilot_metrics_completion_global.csv +notebooks/copilot_metrics_completion_team.csv +_submodules/splunk diff --git a/notebooks/debug_copilot_usage.ipynb b/notebooks/debug_copilot_usage.ipynb index 2230315..bab465f 100644 --- a/notebooks/debug_copilot_usage.ipynb +++ b/notebooks/debug_copilot_usage.ipynb @@ -178,7 +178,7 @@ "# Create a DataFrame from the global metrics data and normalize nested JSON\n", "import pandas as pd\n", "import json\n", - "from pandas.io.json import json_normalize\n", + "from pandas import json_normalize\n", "\n", "# First flatten the nested copilot_ide_chat structure\n", "flattened_metrics = []\n", @@ -595,7 +595,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.13.0" + "version": "3.11.9" } }, "nbformat": 4, diff --git a/requirements/dev_requirements.txt b/requirements/dev_requirements.txt index d5a5e7f..2f629de 100644 --- a/requirements/dev_requirements.txt +++ b/requirements/dev_requirements.txt @@ -3,4 +3,6 @@ pandas == 2.2.3 sqlalchemy == 1.4.42 pymysql == 1.0.3 coverage -pytest \ No newline at end of file +pytest +matplotlib>=3.7.1 +seaborn>=0.12.0 \ No newline at end of file diff --git a/src/extractor/github_exporter.py b/src/extractor/github_exporter.py index 2160e6a..b06597d 100644 --- a/src/extractor/github_exporter.py +++ b/src/extractor/github_exporter.py @@ -15,7 +15,7 @@ def initialize_data(self, config): self.github_org = config["GITHUB"]["github_org"] self.github_repo_list = config["GITHUB"]["github_repo_list"].split(",") self.github_token = config["GITHUB"]["github_token"] - # self.certificate_path = config["COMMON"]["certificat_path"] + self.certificate_path = config["COMMON"]["certificate_path"] with open("src/extractor/github_mappings.json") as json_file: self.mappings = json.load(json_file) self.commits = dict() @@ -41,7 +41,7 @@ def execute_paginated_request( # r = session.get( # url, params=parameters, verify=self.certificate_path # ) - r = session.get(url, params=parameters, verify=False) + r = session.get(url, params=parameters, verify=self.certificate_path) json_response = r.json() results.extend(json_response) if ( diff --git a/src/extractor/gitlab_exporter.py b/src/extractor/gitlab_exporter.py index e373bcb..41f0862 100644 --- a/src/extractor/gitlab_exporter.py +++ b/src/extractor/gitlab_exporter.py @@ -35,7 +35,7 @@ def execute_paginated_request(self, endpoint, parameters={}): results = [] while another_page: with self.create_session() as session: - r = session.get(url, params=parameters, verify=False) + r = session.get(url, params=parameters) json_response = r.json() if not isinstance(json_response, list): json_response = [json_response]