glue
glue copied to clipboard
Add join on key to UI
Add join_on_key
to UI
Description
This is a combination of a plug-in and core changes to the link_editor to enable the creation, display, and removal of join_on_key type links (managed through a Join_Link
object). This address the immediate need in #2215.
Codecov Report
Merging #2313 (44bf242) into main (f8c1e96) will increase coverage by
0.02%
. The diff coverage is90.32%
.
:exclamation: Current head 44bf242 differs from pull request most recent head 1b0fb5b. Consider uploading reports for the commit 1b0fb5b to get more accurate results
@@ Coverage Diff @@
## main #2313 +/- ##
==========================================
+ Coverage 88.06% 88.08% +0.02%
==========================================
Files 247 247
Lines 23476 23527 +51
==========================================
+ Hits 20673 20723 +50
- Misses 2803 2804 +1
Impacted Files | Coverage Δ | |
---|---|---|
glue/dialogs/link_editor/state.py | 94.44% <66.66%> (-1.23%) |
:arrow_down: |
glue/dialogs/link_editor/qt/data_graph.py | 92.32% <81.81%> (-0.23%) |
:arrow_down: |
glue/core/link_helpers.py | 85.88% <96.42%> (+1.27%) |
:arrow_up: |
glue/core/link_manager.py | 97.77% <100.00%> (+0.13%) |
:arrow_up: |
glue/conftest.py | 67.85% <0.00%> (+4.76%) |
:arrow_up: |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
Hey @astrofrog -- can you take a look at this solution? It's not... ideal, but it basically works. Basically I have a Join_Link(LinkCollection)
object that represents the join_on_key operation and then the link_manager knows how to use this object to add or remove the appropriate _key_joins
. Here are some of my concerns.
- Because the key joins are not the same thing at the Join_Link object, if users (or code) directly calls join_on_key, this won't create a Join_Link and so there will be no representation of the join in the UI.
- Because Join_Links are funny kinds of things, I end up with
data_collection._link_manager_external_links
holdingJoin_Link
s, butJoin_Link
s do NOT show up indata_collection.links
- Currently I have this limited to "Joining on single components". (I don't see a fundamental reason I couldn't extend it to multiple components or one-to-many joins I just haven't done that yet).
- The display in the link manager is a little funny -- I draw these Join_Links as dashed lines, but a new Join_Link does not show up as dashed right away, only after closes and re-opening the link manager. This can probably be fixed in
link_editor.qt.data_graph
but I haven't dug into it a lot (it's not obvious what to display if two datasets are both joined_on_key and glued through a traditional link for some reason). - I set up Join_Link as a plugin originally, hoping that I might be able to do things all as a plug-in. Now I have core components assume this plugin exists, but is obviously not ideal (a user might disable the plug-in). Presumably I should move it to core.link_helpers?
I assume you would like to be rebase and add a changelog entry when this is good-to-go?
Yes that would be great, thanks!