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

LIU-416: Setup human readable keys for graph UI #293

Merged
merged 7 commits into from
Nov 5, 2024
Merged

LIU-416: Setup human readable keys for graph UI #293

merged 7 commits into from
Nov 5, 2024

Conversation

myxie
Copy link
Collaborator

@myxie myxie commented Oct 31, 2024

JIRA Ticket

Type

  • Feature (addition)

Problem/Issue

By moving to UUIDs for our Drops OIDs, we have made the UI a lot more cluttered:
image

This makes it a) harder to read what node is what on the graph, and b) hard to relate a FileDrop node on the graph with the output file created by it:

image

Solution

Before After
Translator image
Engine image

Checklist

  • [ ] Unittests added
    • I have updated unittests that test file saving functionality to be consistent with the new changes (where updates were needed).
  • [ ] Documentation added
    • This behaviour is more a usability improved rather than a specific change/addition to functionality. I see the addition of further documentation unnecessary for the change.

Summary by Sourcery

Implement human-readable keys for graph UI elements to enhance visualization and file navigation, and introduce a utility function for generating truncated UIDs.

New Features:

  • Introduce human-readable keys for graph UI elements to improve visualization and file navigation.

Enhancements:

  • Add a utility function to generate truncated UIDs for better readability and uniqueness.

Summary by Sourcery

Implement human-readable keys for graph UI elements to enhance visualization and file navigation, and introduce a utility function for generating truncated UIDs.

New Features:

  • Introduce human-readable keys for graph UI elements to improve visualization and file navigation.

Enhancements:

  • Add a utility function to generate truncated UIDs for better readability and uniqueness.

Sorry, something went wrong.

This comment was marked as off-topic.

@coveralls
Copy link

coveralls commented Oct 31, 2024

Coverage Status

coverage: 79.747% (+0.008%) from 79.739%
when pulling 0624a07 on LIU-416
into 5195ed4 on master.

@myxie myxie marked this pull request as ready for review October 31, 2024 07:53
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @myxie - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment on lines 574 to 577
if len(second_el) > readableLengthLimit:
split[1] = split[1][0:readableLengthLimit]
truncatedUid = split[1]
truncatedUid = split[1]
Copy link
Contributor

Choose a reason for hiding this comment

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

issue (bug_risk): Logic error in truncateUidToKey - modified value is never used

The truncated value is assigned but then immediately overwritten by the original split[1]. This makes the length check ineffective.

daliuge-engine/dlg/manager/web/static/js/dm.js Outdated Show resolved Hide resolved
daliuge-engine/dlg/manager/web/static/js/dm.js Outdated Show resolved Hide resolved
Comment on lines 570 to 575
readableLengthLimit = 4
split = uid.split("_")
if len(split) > 1:
second_el = str(split[1])
if len(second_el) > readableLengthLimit:
split[1] = split[1][0:readableLengthLimit]
Copy link
Contributor

Choose a reason for hiding this comment

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

issue (code-quality): We've found these issues:

Copy link
Contributor

@awicenec awicenec left a comment

Choose a reason for hiding this comment

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

For now this is far better than the UIDs obviously. Once we work more seriously on the translator we should consider to get back closer to the original naming scheme, where the drops had been counted separately inside constructs, leading to names like *_n_m, where n was the running number of the construct drop and m the running number inside the construct.

@myxie
Copy link
Collaborator Author

myxie commented Nov 5, 2024

I have added the construct metadata to the keys now, too, so we get the *_n_m information we previously had as well.

@myxie myxie merged commit 5ded548 into master Nov 5, 2024
17 checks passed
@myxie myxie deleted the LIU-416 branch November 5, 2024 08:50
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

3 participants