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

Provide a way to avoid creating world<->pixel links in datasets #2526

Merged
merged 2 commits into from
Jan 10, 2025

Conversation

astrofrog
Copy link
Member

@astrofrog astrofrog commented Jan 6, 2025

This requires setting:

from glue.config import settings
settings.AUTO_COMPUTE_COORDS_LINKS = False

The reason this is done via settings instead of via a kwarg to Data is because it is not always possible to pass in kwargs when e.g. loading datasets, so having a global setting makes more sense.

Fixes #2525

@astrofrog astrofrog force-pushed the disable-auto-coords-link branch from 454ccaa to 4c4f651 Compare January 6, 2025 14:37
@javerbukh
Copy link
Contributor

This works for Jdaviz, thank you!

@dhomeier
Copy link
Collaborator

dhomeier commented Jan 8, 2025

So it's also working in datasets context as it should?

@@ -1179,7 +1179,8 @@ def delay_callbacks():
label = axis_label(self.coords, i)
cid = self.add_component(comp, label)
self._world_component_ids.append(cid)
self._set_up_coordinate_component_links(ndim)
if settings.AUTO_COMPUTE_COORDS_LINKS:
self._set_up_coordinate_component_links(ndim)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I assume the creation of the components above is still required.

Copy link
Member Author

Choose a reason for hiding this comment

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

We could remove that but it would be a bigger change - best to try this in a separate PR

@astrofrog astrofrog merged commit 11d9f8d into glue-viz:main Jan 10, 2025
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add data to data collection without creating links
3 participants