From 114e8ef12e3217c6adaccd9c251c62ee9cafe419 Mon Sep 17 00:00:00 2001 From: Leah Wasser Date: Fri, 8 Mar 2024 18:32:16 -0700 Subject: [PATCH] Fix: one more test case Fix: remove additional alias Fix: pynteny --- src/pyosmeta/models.py | 4 +--- src/pyosmeta/parse_issues.py | 2 -- tests/unit/test_utils_clean.py | 4 ++++ 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pyosmeta/models.py b/src/pyosmeta/models.py index ca07828..a5317bf 100644 --- a/src/pyosmeta/models.py +++ b/src/pyosmeta/models.py @@ -220,9 +220,7 @@ class ReviewModel(BaseModel): version_accepted: str | None = None date_accepted: str | None = Field( default=None, - validation_alias=AliasChoices( - "date_accepted_(month/day/year)", "Date accepted", "date_accepted" - ), + validation_alias=AliasChoices("Date accepted", "date_accepted"), ) created_at: str = None updated_at: str = None diff --git a/src/pyosmeta/parse_issues.py b/src/pyosmeta/parse_issues.py index cbd9cd4..a06b693 100644 --- a/src/pyosmeta/parse_issues.py +++ b/src/pyosmeta/parse_issues.py @@ -146,8 +146,6 @@ def parse_issue_header( for issue in issues: # Return issue comment as cleaned list + package name pkg_name, body_data = self.comment_to_list(issue) - if pkg_name.lower() == "pynteny": - print("halt") if not pkg_name: continue diff --git a/tests/unit/test_utils_clean.py b/tests/unit/test_utils_clean.py index f92b02e..1eb988f 100644 --- a/tests/unit/test_utils_clean.py +++ b/tests/unit/test_utils_clean.py @@ -66,6 +66,10 @@ def test_clean_name(input_name, expected_output): "input_dict, expected_output", [ # Test case where key starts with "date_accepted" + ( + {"date_accepted_(month-day-year)": "2024-03-07"}, + {"date_accepted": "2024-03-07"}, + ), ( {"date_accepted_(month/day/year)": "2024/03/07"}, {"date_accepted": "2024/03/07"},