Skip to content

Pandas compatibility#38

Merged
e-lo merged 9 commits intomainfrom
pedro/pandas_compatibility
Feb 26, 2026
Merged

Pandas compatibility#38
e-lo merged 9 commits intomainfrom
pedro/pandas_compatibility

Conversation

@pedrocamargo
Copy link
Collaborator

@pedrocamargo pedrocamargo commented Feb 19, 2026

This makes GMNSPy compatible with Pandas 3.0

I have also corrected some typos throughout the codebase.

Several workflow changes were required, so I updated many of the actions as well.

Testing across multiple versions of Python (3.10 and 3.13 at a minimum) ensures that Pandas 2.x and 3.x are tested.

Code Submission Checklist

  • All public API changes, usage, and architecture changes are documented
  • All functions and modules have been documented using google-style docstrings
  • Code and documentation linted: pre-commit run --all-files
  • Code for this PR is covered in tests
  • Code passes all tests: pytest
  • By contributing to this project, all contributors certify to the Developer Certificate of Origin in CONTRIBUTING.md.

Documentation Submission Checklist

  • Documentation can be built locally mkdocs build
  • Documentation has been reviewed locally mkdocs serve
  • By contributing to this project, all contributors certify to the Developer Certificate of Origin in CONTRIBUTING.md.

Applicable Issues

closes #39

Disclosures:

1 - I have used PyCharm's refactoring tools (AI is built into them)
2 - I have used Github Copilot with Codex 5.3 to identify all points where there were compatibility problems with Pandas 3.0 and fix all typos in the repo. All AI interventions were manually reviewed by me before PUSH

Copilot AI review requested due to automatic review settings February 19, 2026 23:54
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates GMNSPy to be compatible with Pandas 3.0 by modernizing pandas API usage and correcting spelling errors throughout the codebase. The changes align with pandas best practices by using nullable dtypes, avoiding deprecated inplace operations, and preventing chained indexing warnings.

Changes:

  • Updated pandas version requirement from >= 1.0 to >= 2.3 in both requirements.txt and pyproject.toml
  • Migrated to nullable pandas dtypes (Int64, Float64, boolean) for better missing value handling
  • Removed deprecated inplace=True parameters from fillna() and set_index() operations
  • Improved dataframe indexing patterns to avoid chained indexing and handle empty results
  • Fixed spelling errors: "existance" → "existence", "compatable" → "compatible", and documentation typos

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
requirements.txt Updated pandas version constraint from >= 1.0 to >= 2.3
pyproject.toml Updated package version to 0.3.5 and pandas dependency to >= 2.3
gmnspy/validation/resources_existance.py Renamed function from update_resources_based_on_existance to update_resources_based_on_existence and fixed docstring typo
gmnspy/validation/required_files.py Changed boolean indexing to query method for pandas 3.0 compatibility
gmnspy/validation/foreign_keys.py Improved scalar selection pattern using .loc and .iloc with empty check
gmnspy/validation/init.py Updated import to use renamed function
gmnspy/schema.py Updated to nullable dtypes (Int64, Float64, boolean), removed inplace parameters, fixed typo in docstring
gmnspy/in_out.py Updated import and call to use renamed function
CONTRIBUTING.md Fixed spelling: "compatable" → "compatible"

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

pedrocamargo and others added 5 commits February 20, 2026 09:59
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
e-lo
e-lo previously approved these changes Feb 25, 2026
Copy link
Owner

@e-lo e-lo left a comment

Choose a reason for hiding this comment

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

aLGTM. I'm fine with approving as-is, although ideally before that you'd:

  1. extract the read_resource into a function since it is a few lines long
  2. disclose what (if any) AI was used to write the code - something we should update our contributing policy to note as well as our PR template.

@pedrocamargo
Copy link
Collaborator Author

I think it is good to merge and release, @e-lo

Copy link
Owner

@e-lo e-lo left a comment

Choose a reason for hiding this comment

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

Awesome - LGTM!

@e-lo e-lo merged commit 9cc326b into main Feb 26, 2026
15 checks passed
@github-actions
Copy link
Contributor

Preview documentation at: https://e-lo.github.io/GMNSpy/$DOC_REF_NAME

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.

🐛 Incompatibility with Pandas 3.X

3 participants