Skip to content
Open
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,20 @@ __pycache__/
*.pyc
.venv
.env
env/
*.py[cod]
*$py.class
my_config.local.cfg
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
4 changes: 2 additions & 2 deletions notebooks/debug_copilot_usage.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -595,7 +595,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.13.0"
"version": "3.11.9"
}
},
"nbformat": 4,
Expand Down
4 changes: 3 additions & 1 deletion requirements/dev_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ pandas == 2.2.3
sqlalchemy == 1.4.42
pymysql == 1.0.3
coverage
pytest
pytest
matplotlib>=3.7.1
seaborn>=0.12.0
4 changes: 2 additions & 2 deletions src/extractor/github_exporter.py
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Il faudrait documenter comment ajouter un certificat si on va avec cette voie

Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion src/extractor/gitlab_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down