From ae4f71c70fab75ec0ad9fabb1240b2e4adb5ef52 Mon Sep 17 00:00:00 2001 From: Youness Hourri <72564223+uhourri@users.noreply.github.com> Date: Tue, 10 Feb 2026 13:04:23 +0100 Subject: [PATCH 1/7] Rename GitHub action config file --- ...01-01T00:00:00Z.json => github_action_20150101T000000Z.json} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename ghmap/config/{github_action_2015-01-01T00:00:00Z.json => github_action_20150101T000000Z.json} (99%) diff --git a/ghmap/config/github_action_2015-01-01T00:00:00Z.json b/ghmap/config/github_action_20150101T000000Z.json similarity index 99% rename from ghmap/config/github_action_2015-01-01T00:00:00Z.json rename to ghmap/config/github_action_20150101T000000Z.json index 4768c8c..0f7e2b9 100644 --- a/ghmap/config/github_action_2015-01-01T00:00:00Z.json +++ b/ghmap/config/github_action_20150101T000000Z.json @@ -627,4 +627,4 @@ } } } -} \ No newline at end of file +} From d06adae31ac9d8ee19d5e079103192de188630fe Mon Sep 17 00:00:00 2001 From: Youness Hourri <72564223+uhourri@users.noreply.github.com> Date: Tue, 10 Feb 2026 13:04:47 +0100 Subject: [PATCH 2/7] Add new GitHub Action configuration file --- ...10-08T16:59:23Z.json => github_action_20251008T165923Z.json} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename ghmap/config/{github_action_2025-10-08T16:59:23Z.json => github_action_20251008T165923Z.json} (99%) diff --git a/ghmap/config/github_action_2025-10-08T16:59:23Z.json b/ghmap/config/github_action_20251008T165923Z.json similarity index 99% rename from ghmap/config/github_action_2025-10-08T16:59:23Z.json rename to ghmap/config/github_action_20251008T165923Z.json index 955e1e0..21c0310 100644 --- a/ghmap/config/github_action_2025-10-08T16:59:23Z.json +++ b/ghmap/config/github_action_20251008T165923Z.json @@ -1094,4 +1094,4 @@ } } } -} \ No newline at end of file +} From a0e9f444dd0f6b7e977b28eafa31467acc90dc22 Mon Sep 17 00:00:00 2001 From: Youness Hourri <72564223+uhourri@users.noreply.github.com> Date: Tue, 10 Feb 2026 13:05:04 +0100 Subject: [PATCH 3/7] Rename github_activity_2015-01-01T00:00:00Z.json to github_activity_20150101T000000Z.json --- ...-01T00:00:00Z.json => github_activity_20150101T000000Z.json} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename ghmap/config/{github_activity_2015-01-01T00:00:00Z.json => github_activity_20150101T000000Z.json} (99%) diff --git a/ghmap/config/github_activity_2015-01-01T00:00:00Z.json b/ghmap/config/github_activity_20150101T000000Z.json similarity index 99% rename from ghmap/config/github_activity_2015-01-01T00:00:00Z.json rename to ghmap/config/github_activity_20150101T000000Z.json index 1045f69..706595a 100644 --- a/ghmap/config/github_activity_2015-01-01T00:00:00Z.json +++ b/ghmap/config/github_activity_20150101T000000Z.json @@ -420,4 +420,4 @@ ] } ] -} \ No newline at end of file +} From 3d8e911196ca2e47c4de7e78873405968f434b14 Mon Sep 17 00:00:00 2001 From: Youness Hourri <72564223+uhourri@users.noreply.github.com> Date: Tue, 10 Feb 2026 13:05:21 +0100 Subject: [PATCH 4/7] Rename GitHub activity JSON file --- ...-08T16:59:23Z.json => github_activity_20251008T165923Z.json} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename ghmap/config/{github_activity_2025-10-08T16:59:23Z.json => github_activity_20251008T165923Z.json} (99%) diff --git a/ghmap/config/github_activity_2025-10-08T16:59:23Z.json b/ghmap/config/github_activity_20251008T165923Z.json similarity index 99% rename from ghmap/config/github_activity_2025-10-08T16:59:23Z.json rename to ghmap/config/github_activity_20251008T165923Z.json index 4222a94..35995f8 100644 --- a/ghmap/config/github_activity_2025-10-08T16:59:23Z.json +++ b/ghmap/config/github_activity_20251008T165923Z.json @@ -721,4 +721,4 @@ ] } ] -} \ No newline at end of file +} From 9e4d827ccc6dcfb756da8185cc22c25c9a7bbc5c Mon Sep 17 00:00:00 2001 From: Youness Hourri <72564223+uhourri@users.noreply.github.com> Date: Tue, 10 Feb 2026 13:06:39 +0100 Subject: [PATCH 5/7] Modify version date parsing in extract_version_info Updated the extract_version_info function to parse ISO 8601 Basic Format for version dates. --- ghmap/cli.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/ghmap/cli.py b/ghmap/cli.py index d834e82..0e2293a 100644 --- a/ghmap/cli.py +++ b/ghmap/cli.py @@ -11,11 +11,13 @@ from .utils import load_json_file, save_to_jsonl_file +from datetime import datetime, timezone + def extract_version_info(filename: str) -> Tuple[str, datetime]: """Extract platform and version date from mapping filename. Expected format: {platform}_{type}_{date}.json - Example: github_action_2025-10-08T16:59:23Z.json + Example: github_action_20251008T165923Z.json (ISO 8601 Basic Format) """ # Remove .json extension and split base_name = filename.replace('.json', '') @@ -27,8 +29,15 @@ def extract_version_info(filename: str) -> Tuple[str, datetime]: # Version date is last part (after last underscore) version_str = parts[-1] - # Parse ISO format date - version_date = datetime.fromisoformat(version_str.replace('Z', '+00:00')) + # Parse ISO 8601 Basic Format: YYYYMMDDTHHMMSSZ + try: + version_date = datetime.strptime(version_str, '%Y%m%dT%H%M%SZ') + version_date = version_date.replace(tzinfo=timezone.utc) + except ValueError as e: + raise ValueError( + f"Invalid timestamp format: {version_str}. " + f"Expected format: YYYYMMDDTHHMMSSZ (e.g., 20251008T165923Z)" + ) from e return platform, version_date From 776035e7e401579b5b55921cfd8ec5ec708c9934 Mon Sep 17 00:00:00 2001 From: Youness Hourri <72564223+uhourri@users.noreply.github.com> Date: Tue, 10 Feb 2026 13:33:10 +0100 Subject: [PATCH 6/7] Reorder import statements in cli.py --- ghmap/cli.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ghmap/cli.py b/ghmap/cli.py index 0e2293a..8b605b6 100644 --- a/ghmap/cli.py +++ b/ghmap/cli.py @@ -1,10 +1,11 @@ """Command-line interface for the GitHub Event Mapping Tool.""" import argparse -from pathlib import Path from datetime import datetime, timezone from importlib.resources import files +from pathlib import Path from typing import Dict, List, Tuple + from .preprocess.event_processor import EventProcessor from .mapping.action_mapper import ActionMapper from .mapping.activity_mapper import ActivityMapper From 6b72dc433fe35e63df479e92c89df5c454347b69 Mon Sep 17 00:00:00 2001 From: Youness Hourri <72564223+uhourri@users.noreply.github.com> Date: Tue, 10 Feb 2026 13:50:16 +0100 Subject: [PATCH 7/7] Remove unused datetime imports in cli.py Removed unused imports for datetime and timezone. --- ghmap/cli.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/ghmap/cli.py b/ghmap/cli.py index 8b605b6..f83db51 100644 --- a/ghmap/cli.py +++ b/ghmap/cli.py @@ -12,8 +12,6 @@ from .utils import load_json_file, save_to_jsonl_file -from datetime import datetime, timezone - def extract_version_info(filename: str) -> Tuple[str, datetime]: """Extract platform and version date from mapping filename.