Skip to content
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

Updated using importlib_resource instead of pkg_resources and prepare for later versions of pandas #492

Merged
merged 8 commits into from
Feb 8, 2024

Conversation

hrshdhgd
Copy link
Contributor

@hrshdhgd hrshdhgd commented Feb 2, 2024

Fixes #491

  • Updated using importlib_resource instead of pkg_resources

    • Reason: pkg_resources is going to be deprecated.
  • Refactor pandas related code to smoothly transition to future versions and handle deprecation warnings.

                               "Downcasting behavior in `replace` is deprecated and "
                               "will be removed in a future version. To retain the old "
                               "behavior, explicitly call "
                               "`result.infer_objects(copy=False)`. "
                               "To opt-in to the future "
                               "behavior, set "
                               "`pd.set_option('future.no_silent_downcasting', True)`",
    
    • A value is trying to be set on a copy of a slice from a DataFrame
    • .apply(max) => .apply(np.maximum.reduce)
    • UserWarning: Boolean Series key will be reindexed to match DataFrame index.

@hrshdhgd
Copy link
Contributor Author

hrshdhgd commented Feb 2, 2024

@matentzn : The only warning that shows now is

python3.10/site-packages/curies/api.py:261
  /opt/anaconda3/envs/sssom-py/lib/python3.10/site-packages/curies/api.py:261: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.5/migration/
    @validator("uri_prefix_synonyms")  # type:ignore

which is curies related. Relevant PR: biopragmatics/curies#101

Copy link
Collaborator

@matentzn matentzn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wellllcome back! My god I missed you man! Hope you are well!

src/sssom/constants.py Show resolved Hide resolved
src/sssom/constants.py Show resolved Hide resolved
src/sssom/util.py Show resolved Hide resolved
src/sssom/util.py Show resolved Hide resolved
src/sssom/util.py Show resolved Hide resolved
src/sssom/util.py Outdated Show resolved Hide resolved
src/sssom/util.py Show resolved Hide resolved
@hrshdhgd
Copy link
Contributor Author

hrshdhgd commented Feb 2, 2024

Wellllcome back! My god I missed you man! Hope you are well!

Haha! All well here sir!

@hrshdhgd
Copy link
Contributor Author

hrshdhgd commented Feb 8, 2024

Should I merge this?

@hrshdhgd hrshdhgd merged commit 96b3ab9 into master Feb 8, 2024
6 checks passed
@hrshdhgd hrshdhgd deleted the pandas-update branch February 8, 2024 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Get rid of warning "Downcasting behavior in replace is deprecated and will be removed in a future version."
2 participants