-
Notifications
You must be signed in to change notification settings - Fork 151
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
Update Dependency Compatibility #2716
Update Dependency Compatibility #2716
Conversation
621920d
to
4e65a29
Compare
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.
One quick question about a np.bool_ vs bool_ choice but other than that looks good. Also don't forget to lint.
@@ -164,7 +164,7 @@ def json_handler(obj): | |||
return float(obj) | |||
elif isinstance(obj, np.integer): | |||
return int(obj) | |||
elif (isinstance(obj, np.bool) or | |||
elif (isinstance(obj, bool) or | |||
isinstance(obj, np.bool_)): |
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.
Wanted to make sure this one shouldn't also be changed to bool_
as interval_unionize/data_utilities.py
was switched from np.bool_
to bool_
.
Include Python 3.11 compatibility, unpeg all dependencies and fix breaking changes from updated packages or downgrade packages.
Steps
1.Unpin requirements.txt
2. Use poetry to setup supported python version range into pyproject.toml
4. Add requirements.txt dependencies with poetry and resolve Python version compatibility issues
5. xarray, scipy, and numpy versions adjusted to meet python version requirements
6. Run tests by creating virtualenv with 3.8, 3.9, 3.10, 3.11
7. For failing tests, either fix code or revert package version
Final explicitly defined requirements
8. Remove poetry created files (pyproject.toml, poetry.lock)
Fixes for compatibility
Int64Index
deprecated DEPR: Remove Int64Index, UInt64Index, Float64Index and Index._is_backward_compat_public_numeric_index pandas-dev/pandas#42717pd.Series.str.replace
must specifyregex=True
if regex is used.pd.Series.reindex
with aMultiIndex
can no longer take in single integer Index as an inputcheck_less_precise
is a deprecated parameter inpd.testing.assert_series_equal
. This is replaced withr_tol
anda_tol
Reverting versions instead of fixing
VisualBehaviorProjectCache.get_ophys_session_table( index_column="ophys_experiment_id").index
is type'object'
, expectedint64
All the values in this index are int64 so I'm not sure why it was loaded as an object type.