Skip to content
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

Switch from attribute 'name' to 'acronym' #42

Closed
wants to merge 4 commits into from
Closed

Conversation

lecriste
Copy link
Contributor

@lecriste lecriste commented Jul 26, 2023

As of https://bbpteam.epfl.ch/project/issues/browse/BBPP134-36, the name of the root region changed from "root" to "Whole Mouse Brain".
acronym is already used here.

@lecriste lecriste requested a review from mgeplf July 27, 2023 18:43
@@ -456,7 +456,7 @@ def get_aibs_region_names(region_map: "RegionMap") -> Set[str]:

def get_hierarchy_info(
region_map: "RegionMap",
root: str = "Basic cell groups and regions",
Copy link
Collaborator

Choose a reason for hiding this comment

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

This isn't the root name, was Basic cell groups and regions also changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, I just replaced it with its acronym as that's what the function is expecting now.

Copy link
Collaborator

Choose a reason for hiding this comment

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

But based on the PR description, the change is required (?) because the name of the root region changed from "root" to "Whole Mouse Brain".; so I'm confused as to why this change is required?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since the new code is looking for the acronym attribute of a region rather than for the name, the "root" argument of this function must be the acronym now.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I meant, why do we need to change to acronym from "name", when the only places that are changing in this PR weren't affected by the change of name?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd also like to change this, but this code can be used as a library, so changing fundamental API calls like this feels dangerous, so the bar for making changes is high. Are you calling this somewhere where you got caught by the change in names?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I ran one step of the main ReadMe with the new version of the hierarchy and got an empty result because there is no longer a region with name "root".
The usage of acronym already exists.

Copy link
Collaborator

Choose a reason for hiding this comment

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

one step of the main ReadMe

Which step? The examples in the README are meant to be run by external uses of the code and they don't have access to the internal hierarchy.

To maintain backwards compat, we could add an attr argument, which defaults to name, but can be overridden to be acronym, what do you think?

Copy link
Contributor Author

@lecriste lecriste Jul 31, 2023

Choose a reason for hiding this comment

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

Which step? The examples in the README are meant to be run by external uses of the code and they don't have access to the internal hierarchy.

I ran this step with the new hierarchy as input.

To maintain backwards compat, we could add an attr argument, which defaults to name, but can be overridden to be acronym, what do you think?

That's an option. The overwriting will happen for this call of get_hierarchy_info.
@mgeplf, shall I proceed this way?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I have created #45 which allows one to choose the name of the region that is being fit. Thus, one should be able to use alternate hierarchies.

@mgeplf
Copy link
Collaborator

mgeplf commented Aug 23, 2023

This isn't needed any more because of #45 and #46

@mgeplf mgeplf closed this Aug 23, 2023
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.

None yet

2 participants