fix indexing and update pandas code per v3.0 changes#154
Open
nkasica wants to merge 2 commits into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #154 +/- ##
===========================================
+ Coverage 69.15% 69.20% +0.05%
===========================================
Files 14 14
Lines 1744 1747 +3
===========================================
+ Hits 1206 1209 +3
Misses 538 538
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Updates pipit’s pandas usage to preserve pre-3.0 behavior and avoid pandas 3.0 Copy-on-Write / indexing pitfalls, addressing CI/test failures and the behavioral change in groupby(..., observed=...).
Changes:
- Fixes
_match_caller_callee()insertion logic by assigning computed columns back with explicit index alignment instead of whole-row replacement. - Pins
groupby(..., observed=False)in key paths to preserve prior grouping semantics under pandas 3.0. - Removes shallow defensive copies (
copy(deep=False)) intime_profile()to align with pandas 3.0 Copy-on-Write behavior. - Cleans up stray blank lines in docs example scripts and Sphinx config.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
pipit/trace.py |
Adjusts groupby observed behavior and fixes indexing-aligned assignment for caller/callee matching and time profiling under pandas 3.0. |
docs/examples/projections.py |
Removes an extra blank line. |
docs/examples/otf2_read.py |
Removes an extra blank line. |
docs/examples/nsight.py |
Removes an extra blank line. |
docs/examples/hpctoolkit.py |
Removes an extra blank line. |
docs/examples/csv_reader.py |
Removes an extra blank line. |
docs/conf.py |
Removes an extra blank line. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes breaking changes from Pandas 3.0.0:
df.groupby(..., observed=False)changed todf.groupby(..., observed=True)apply()seemed to break lines 284 and 285Note: Pandas 3.0.0 now has Python minimum version >= 3.11
Resolves: Issue #153