-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: field alias for date_accepted field #114
Conversation
@@ -572,9 +579,6 @@ def get_issue_meta( | |||
""" | |||
issue_meta = {} | |||
for item in body_data[0:end_range]: | |||
# Clean date accepted element |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was just a thing i added in a really random place. it worked but it is so hard to find it if you're working on the code.
src/pyosmeta/parse_issues.py
Outdated
@@ -161,7 +161,11 @@ class ReviewModel(BaseModel): | |||
reviewer_2: dict[str, str | None] = {} | |||
archive: Optional[str] = None | |||
version_accepted: Optional[str] = None | |||
date_accepted: Optional[str] = None | |||
date_accepted: Optional[str] = Field( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here i added an alias to allow us to skip the step of cleaning up the field name
|
||
# We could setup some example data using fixtures and a conf.py | ||
# Once we have a better view of the test suite. | ||
example = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we may end up creating fixtures for some of these things that we can reuse. but for now i just added a variable object to the test so we have a test for aliases
oops failing. moving to draft |
Fix: more dtis
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #114 +/- ##
==========================================
+ Coverage 41.64% 44.00% +2.36%
==========================================
Files 4 4
Lines 461 459 -2
Branches 74 73 -1
==========================================
+ Hits 192 202 +10
+ Misses 268 253 -15
- Partials 1 4 +3 ☔ View full report in Codecov by Sentry. |
Rather than fixing the entire thing i'm working towards cleaning up the parse_issues method. This is a small fix that
i'm guessing there are better ways to setup tests like this but it's a start and i'm trying to keep this contained. this addresses #91 in (a very small) part.