-
Notifications
You must be signed in to change notification settings - Fork 76
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
Small changes to get it working on latest version of python and packages #1183
base: master
Are you sure you want to change the base?
Conversation
Thanks @EmanueleCannizzaro for your contribution! Could you please correct the description of your pull request, and tell us the main differences of this changeset with #1181, #1161 and #1168? 🙂 Thanks! |
|
||
from openfisca_core import parameters, periods | ||
from openfisca_core.errors import ParameterParsingError | ||
from openfisca_core.parameters import config | ||
|
||
|
||
def contains_nan(vector): | ||
print(vector) |
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.
Could you please remove this print
statement?
@@ -2,17 +2,24 @@ | |||
import traceback | |||
|
|||
import numpy | |||
import pandas as pd |
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.
If it is useful to test pandas
here, I suggest we move this as an actual test, and that we require pandas
optionally in case we want to run that specific test.
@@ -96,7 +96,8 @@ def calculate(self, variable_name: str, period): | |||
"""Calculate ``variable_name`` for ``period``.""" | |||
|
|||
if period is not None and not isinstance(period, Period): | |||
period = periods.period(period) | |||
##period = periods.period(period) | |||
period = Period(period) |
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 is a breaking change (the badly named periods.period
function is actually a builder function.
from nptyping import types, NDArray as Array | ||
# Modified by Emanuele Cannizzaro on 03/06/2023 | ||
#from typing import types, NDArray as Array | ||
import types |
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.
Thanks for this! We should completely get rid of nptyping
.
Thanks for contributing to OpenFisca! Remove this line, as well as any other in the following that don't fit your contribution :)
Breaking changes
New features
some_function()
Deprecations
some_function
.Technical changes
private_function
.