Skip to content

Handle some mypy errors and increase test coverage#680

Merged
motus merged 2 commits into
microsoft:mainfrom
bpkroth:mypy-fixups
Feb 20, 2024
Merged

Handle some mypy errors and increase test coverage#680
motus merged 2 commits into
microsoft:mainfrom
bpkroth:mypy-fixups

Conversation

@bpkroth

@bpkroth bpkroth commented Feb 19, 2024

Copy link
Copy Markdown
Contributor

Our one hot encoding previously had some conditional handling of 1 dimensional DataFrames.
That doesn't exist - those are Series. As such, the typing returns recently started alerting (due to an upstream dependency bump).
Moreover, we lacked test coverage for that path.
This change makes it more clear what those type expectations are and adds tests.

@bpkroth bpkroth marked this pull request as ready for review February 19, 2024 19:51
@bpkroth bpkroth requested a review from a team as a code owner February 19, 2024 19:51
@bpkroth bpkroth added the ready for review Ready for review label Feb 19, 2024

@motus motus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Love it!

@motus motus merged commit dfebc91 into microsoft:main Feb 20, 2024
motus added a commit that referenced this pull request Feb 20, 2024
Fixups to #656 by switching to a new plugin and alerting to remove the
old one.

Includes changes from #680

---------

Co-authored-by: Sergiy Matusevych <sergiym@microsoft.com>
@bpkroth bpkroth deleted the mypy-fixups branch February 20, 2024 20:23
motus added a commit that referenced this pull request Feb 20, 2024
Simply makes sure that pyarrow is available in the conda environment to
make some warnings go away.

Assumes that future versions of pandas will declare their own dependency
on pyarrow and this can be removed.

Also includes changes from #680

---------

Co-authored-by: Sergiy Matusevych <sergiym@microsoft.com>
bpkroth added a commit that referenced this pull request Feb 20, 2024
Addressing some warnings from pandas about datetime conversions and
deprecated and future strict behavior.

One issue we currently have is that a timestamp produced by a client may
be in a different timezone or lack timezone info from what that receiver
parses before injecting it into the DB.

This starts to at least attempt to work on those conversions for
consistency.

Currently also includes changes from #682 and #680
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for review Ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants