You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Phew - working on the code i'm noticing some VERY convoluted structures i have around parsing the issue metadata that make it very hard to follow the code. In the next PR where i manage partnership data, i have the todo below added to the code:
# TODO: this method parse_issue_header is working but the parsing code is
# really hard to follow
# It is worth another pr that cleans up the workflow around grabbing
# metadata so it's clearer to follow.
accepted_reviews = process_review.parse_issue_header(issues, 45)
we need to refactor this part of the workflow so
the methods are clearly named and scoped to do specific things and it's clear what happens when
the docstrings clarify what the methods do on top of the names of the methods being clear
I suspsect refactoring would also mean some code cleanup in general as the method now returns a bunch of extra unprocessed data that doesn't need to be returned.
specifically in this part of the process_Reviews.py script
final_reviews= {}
forkey, reviewinall_reviews.items():
# First add gh meta to each dictprint("Parsing & validating", key)
the review data returned looks like the image below. Note that in the image below, there is a bunch of raw github issue data that hasn't been cleaned
like this line '- [x] I have read and will commit to package maintenance after the review as per the [pyOpenSci Policies Guidelines][Commitment].'
and then there is some nicely formatted data which is what we want that method to return like this:
`date-accepted`: '02/06/2024'
that message uncleaned data above shouldn't be returned at all.
the code is working now because the pydantic model just ignores those elements. I think our methods should be more intentional about returning clean data. They shouldn't just work because it works.
The text was updated successfully, but these errors were encountered:
Phew - working on the code i'm noticing some VERY convoluted structures i have around parsing the issue metadata that make it very hard to follow the code. In the next PR where i manage partnership data, i have the todo below added to the code:
we need to refactor this part of the workflow so
specifically in this part of the process_Reviews.py script
the review data returned looks like the image below. Note that in the image below, there is a bunch of raw github issue data that hasn't been cleaned
like this line
'- [x] I have read and will commit to package maintenance after the review as per the [pyOpenSci Policies Guidelines][Commitment].'
and then there is some nicely formatted data which is what we want that method to return like this:
that message uncleaned data above shouldn't be returned at all.
the code is working now because the pydantic model just ignores those elements. I think our methods should be more intentional about returning clean data. They shouldn't just work because it works.
The text was updated successfully, but these errors were encountered: