Skip to content

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
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 9, 2025

Quality Gate Failed Quality Gate failed

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

See analysis details on SonarQube Cloud

@Christos-Hadjinikolis Christos-Hadjinikolis marked this pull request as ready for review January 9, 2025 13:41
@matteo-pallini matteo-pallini removed their request for review June 4, 2025 09:12
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.

2 participants