Skip to content

BF: Remove all traces of Forceps bundles.#116

Merged
arokem merged 1 commit into
tractometry:mainfrom
arokem:remove_forceps
Sep 27, 2025
Merged

BF: Remove all traces of Forceps bundles.#116
arokem merged 1 commit into
tractometry:mainfrom
arokem:remove_forceps

Conversation

@arokem

@arokem arokem commented Sep 26, 2025

Copy link
Copy Markdown
Member

Calling to the __del_item__ method instead of removing these just from the list of bundle_names should remove the key as well as the name.

This partially address #115, I believe.

Calling to the __del_item__ instead of removing them just from the
list of bundle_names should remove the key as well as the name.

This partially address tractometry#115, I believe.
Copilot AI review requested due to automatic review settings September 26, 2025 22:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 removes Forceps bundles by calling the __delitem__ method instead of just removing them from the bundle names list, ensuring both the key and name are properly deleted. It also adds a test case to verify the deletion functionality works correctly.

  • Updated bundle removal logic to use del self[bundle_name] instead of self.bundle_names.remove()
  • Added test coverage for bundle deletion behavior
  • Fixed iteration over bundle dictionary to use bundle_names property

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
AFQ/api/bundle_dict.py Changed from removing bundle names to deleting bundle entries using __delitem__
AFQ/api/group.py Updated loop iteration to use bundle_names property instead of keys()
AFQ/tests/test_bundle_dict.py Added test case to verify bundle deletion functionality

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@arokem

arokem commented Sep 26, 2025

Copy link
Copy Markdown
Member Author

I can confirm that this removes the error mentioned in #115 (item 1) when run locally on my laptop.

@36000

36000 commented Sep 26, 2025

Copy link
Copy Markdown
Collaborator

This looks great to me! Good find

@arokem

arokem commented Sep 26, 2025

Copy link
Copy Markdown
Member Author

Yay! This was a fun Friday afternoon PR. I'll merge when the CI comes back green.

@arokem
arokem merged commit 5efcafd into tractometry:main Sep 27, 2025
9 checks passed
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.

3 participants