-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
Date to datetime #245
Date to datetime #245
Conversation
@vladistan @AdamFinkle Pytest appears to be failing
because of the way normalized billing period instances are initialized. # billing_periods = [
# NormalizedBillingPeriodRecordBase(**x) for x in billing_periods_dict
# ]
> billing_periods = [
NormalizedBillingPeriodRecordBase(
period_start_date=date.fromisoformat(x["period_start_date"]),
period_end_date=date.fromisoformat(x["period_end_date"]),
usage=x["usage"],
analysis_type_override=x["analysis_type_override"],
inclusion_override=x["inclusion_override"],
) for x in billing_periods_dict
] versus billing_periods = [
NormalizedBillingPeriodRecordBase(**x) for x in billing_periods_dict
] |
Ahh, you enabled the workflow. Let us examine what's going on. We run all the tests in our codespace before creating the PR and all the tests were passing. Something is different. FYI, the reason we changed the way that when you explicitly instantiate the objects with the constructor instead of using **x you can supply your own parsers for each field. let us dig deeper into this |
33a21b4
to
bbc1c73
Compare
@debajyotid2 @thadk I put a few fixes, could you approve the workflow to see how it goes? |
Nice - the rules engine unit tests are passing! The pyodide tests still fail because the dates are not being converted into datetime objects while parsing. This is because in |
First attempt at using datetime instead of dates