-
Notifications
You must be signed in to change notification settings - Fork 86
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
Dict-like methods for ProcessingModule #2020
Open
bendichter
wants to merge
8
commits into
dev
Choose a base branch
from
processing-mod-methods
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
I'm adding |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #2020 +/- ##
==========================================
+ Coverage 91.78% 91.80% +0.02%
==========================================
Files 27 27
Lines 2738 2746 +8
Branches 709 709
==========================================
+ Hits 2513 2521 +8
Misses 149 149
Partials 76 76
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Great, thanks! Please add a changelog entry. |
…essingModule objects
…WithoutBorders/pynwb into processing-mod-methods
bendichter
commented
Feb 18, 2025
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.
Motivation
Added support for dictionary-like operations directly on
ProcessingModule
objects. Currently, users need to access thedata_interfaces
attribute to get information about the module's contents (e.g.,len(module.data_interfaces)
). This PR implements dictionary-like methods onProcessingModule
itself, making the API more intuitive and consistent with Python's container conventions.This implements the feature requested in #1993 to support operations like
len(processing_module)
directly.How to test the behavior?
Checklist
[x] Did you update CHANGELOG.md with your changes?
[x] Have you checked our Contributing document?
[x] Have you ensured the PR clearly describes the problem and the solution?
[x] Is your contribution compliant with our coding style? This can be checked running ruff check . && codespell from the source directory.
[x] Have you checked to ensure that there aren't other open Pull Requests for the same change?
[x] Have you included the relevant issue number using "Fix #1993" notation where XXX is the issue number? By including "Fix #1993" you allow GitHub to close issue #1993 when the PR is merged.
Fix #1993