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

Fix compatibility with future glue-core changes #380

Merged
merged 1 commit into from
Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion glue_jupyter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ def jglue(*args, settings=None, show=False, links=None, **kwargs):
for that class for more details.
"""

from glue.qglue import parse_data, parse_links
try:
from glue.core.parsers import parse_data, parse_links
except ImportError: # older versions of glue
from glue.qglue import parse_data, parse_links

from glue.core.data_factories import load_data

japp = JupyterApplication(settings=settings)
Expand Down
5 changes: 4 additions & 1 deletion glue_jupyter/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@
"""
Parse and add links.
"""
from glue.qglue import parse_links
try:
from glue.core.parsers import parse_links
except ImportError: # older versions of glue
from glue.qglue import parse_links

Check warning on line 96 in glue_jupyter/app.py

View check run for this annotation

Codecov / codecov/patch

glue_jupyter/app.py#L93-L96

Added lines #L93 - L96 were not covered by tests
self.data_collection.add_link(parse_links(self.data_collection, links))

def add_link(self, data1, attribute1, data2, attribute2):
Expand Down