Conversation
There was a problem hiding this comment.
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.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
e-lo
left a comment
There was a problem hiding this comment.
aLGTM. I'm fine with approving as-is, although ideally before that you'd:
- extract the read_resource into a function since it is a few lines long
- 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.
|
I think it is good to merge and release, @e-lo |
|
Preview documentation at: https://e-lo.github.io/GMNSpy/$DOC_REF_NAME |
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
pre-commit run --all-filespytestDocumentation Submission Checklist
mkdocs buildmkdocs serveApplicable 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