@@ -161,7 +161,11 @@ class ReviewModel(BaseModel):
161161 reviewer_2 : dict [str , str | None ] = {}
162162 archive : Optional [str ] = None
163163 version_accepted : Optional [str ] = None
164- date_accepted : Optional [str ] = None
164+ date_accepted : Optional [str ] = Field (
165+ validation_alias = AliasChoices (
166+ "date_accepted_(month/day/year)" , "Date accepted"
167+ )
168+ )
165169 created_at : str = None
166170 updated_at : str = None
167171 closed_at : Optional [str ] = None
@@ -484,6 +488,7 @@ def parse_issue_header(
484488 review = {}
485489 review_final = {}
486490 for issue in issues :
491+ # Return issue comment as a cleaned list + package name
487492 pkg_name , body_data = self .parse_comment (issue )
488493 if not pkg_name :
489494 continue
@@ -530,7 +535,7 @@ def parse_issue_header(
530535 "archive" ,
531536 "version_accepted" ,
532537 "joss_doi" ,
533- "date_accepted " ,
538+ "date_accepted_(month/day/year) " ,
534539 "categories" ,
535540 "partners" ,
536541 "domain" ,
@@ -555,7 +560,9 @@ def get_issue_meta(
555560 end_range : int ,
556561 ) -> dict [str , str ]:
557562 """
558- Parse through the top of an issue and grab the metadata for the review.
563+ Parse through a list of strings, each of which represents a line in the
564+ first comment of a review.
565+ grab the metadata for the review.
559566
560567 Parameters
561568 ----------
@@ -572,9 +579,6 @@ def get_issue_meta(
572579 """
573580 issue_meta = {}
574581 for item in body_data [0 :end_range ]:
575- # Clean date accepted element
576- if "Date accepted" .lower () in item [0 ].lower ():
577- item [0 ] = "Date accepted"
578582 issue_meta .update (self ._get_line_meta (item ))
579583
580584 return issue_meta
@@ -612,15 +616,16 @@ def get_repo_endpoints(
612616
613617 def parse_comment (self , issue : dict [str , str ]) -> tuple [str , list [str ]]:
614618 """
615- Parses an issue comment for pyOpenSci review. Returns the package name
619+ Parses the first comment in an issue comment for pyOpenSci review.
620+ This is where the review metadata are stored.
621+ Returns the package name
616622 and the body of the comment parsed into a list of elements.
617623
618624 Parameters
619625 ----------
620626 issue : dict
621627 A dictionary containing the json response for an issue comment.
622628
623-
624629 Returns
625630 -------
626631 pkg_name : str
0 commit comments