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

feat(RND-11428): add append option to PG writing #77

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Conversation

slw546
Copy link

@slw546 slw546 commented Dec 5, 2024

Overview

Allows writing dataframes to PF by appending to the table

Key Changes

  • added append, truncate options to PG mixin
  • Continue handling truncate_and_append options

Impact: Pins numpy to <2.0 !!

This is necessary due to pytables. They support numpy 2 as of pytables 3.10.x. However, they have not released this version for python < 3.10, despite numpy2 being released for python 3.9. Pandas is requiring numpy >= 1.2, so we either pin pandas or pin numpy. Pinning numpy feels slightly less restrictive as pandas can still be satisfied to a range of versions including those supporting numpy2

N.b. that doesn't occur on py3.8 since numpy 2 was not released there, so it's purely a py3.9 problem...

Checklist

The following won't apply in all cases - mark N/A next to point if not needed.

  • Appropriate unit tests added/updated
  • Module, function, class docstrings updated
  • Comments added to PR where necessary
  • Interface documentation updated
  • Semantic commits used for this PR, so that a CHANGELOG can be generated from them (don't delete your local branch! when tagging a new release from master)

pytables does not currently support numpy 2.0 for python<3.10. As we support python 3.9 we must now pin the numpy version.

This does not occur on python 3.8 as numpy 2 is not available, whilst python>3.10 can use numpy 2.0 compatible pytables
Copy link

sonarqubecloud bot commented Dec 9, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
4.8% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@slw546 slw546 marked this pull request as draft December 16, 2024 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant