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

Add support for predictions app #364

Merged
merged 4 commits into from
Nov 8, 2024

Conversation

gregorjerse
Copy link
Contributor

No description provided.

if missing:
# Get corresponding annotation field details in a single query and attach it to
# the values.
for field in self.resolwe.prediction_field.filter(id__in=missing.keys()):
Copy link
Member

Choose a reason for hiding this comment

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

Use .iterate() to make it more robust.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. Also on annotation values.

Sample: "sample",
Relation: "relation",
Process: "process",
Data: "data",
Copy link
Member

Choose a reason for hiding this comment

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

This reordering should go into a separate commit.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@gregorjerse gregorjerse force-pushed the feature/predictions branch 3 times, most recently from cd4a4d1 to fe687a5 Compare November 5, 2024 13:35
@gregorjerse gregorjerse force-pushed the feature/predictions branch 2 times, most recently from 5d17b5a to 2736e71 Compare November 7, 2024 09:16
Copy link
Member

@JureZmrzlikar JureZmrzlikar left a comment

Choose a reason for hiding this comment

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

Great effort, all looks good. Let's start using it and see what else is needed!

missing[value.field_id].append(value)

if missing:
# Get corresponding annotation field details in a single query and attach it to
Copy link
Member

Choose a reason for hiding this comment

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

Get corresponding prediction field details...


@property
@assert_object_exists
def modified(self):
Copy link
Member

Choose a reason for hiding this comment

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

This might be nitpicking, but why do we display modified for the value of created? Is there a simple explanation for this? AFAIK PredictionValues should not be modified, only new "versions" created? In this case, it would be more intuitive, to just expose this as created, and not expose the modified property at all?

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 it is actually the modification date from the user perspective.

When new prediction / annotation is created (that overrides the old one) it can be seen as a modification of an old value. Not sure what is the correct way of handling this, I can also just leave created field and remove modified.

@gregorjerse gregorjerse merged commit 39a69ba into genialis:master Nov 8, 2024
10 checks passed
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.

3 participants