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

Enable publications to link to annotations #6315

Merged
merged 36 commits into from
Aug 4, 2022
Merged

Conversation

leowe
Copy link
Contributor

@leowe leowe commented Jul 5, 2022

URL of deployed dev instance (used for testing):

  • https://___.webknossos.xyz

Steps to test:

  • request http://webknossos/api/publications

Issues:


(Please delete unneeded items, merge only when none are left open)


Still todo

  • Check with frontend whether provided information is enough

@leowe leowe changed the title add schema change, publicationDAO Enable publications to link to annotations Jul 5, 2022
@leowe leowe marked this pull request as ready for review July 14, 2022 08:26
@leowe leowe requested a review from fm3 July 14, 2022 08:30
Copy link
Member

@fm3 fm3 left a comment

Choose a reason for hiding this comment

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

Looks good already :) I added two small comments. Otherwise, Let’s wait for the frontend

app/models/binary/Publication.scala Outdated Show resolved Hide resolved
tools/postgres/schema.sql Show resolved Hide resolved
Copy link
Member

@normanrz normanrz left a comment

Choose a reason for hiding this comment

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

2 things I noticed in the GET /api/publications API:

  • A dataset contains the information about a publication, which is redundant.
  • An annotation has the id in the form of annotations: [{ "id": { "id": "...." }, ... }, ...], which seems to be unnecessarily nested.

Copy link
Member

@normanrz normanrz left a comment

Choose a reason for hiding this comment

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

I need the name of the annotations for the UI.

@normanrz
Copy link
Member

normanrz commented Aug 3, 2022

I would argue, we can remove the publication field from the GET /api/datasets route

@fm3
Copy link
Member

fm3 commented Aug 4, 2022

I would argue, we can remove the publication field from the GET /api/datasets route

That’s good news, we weren’t sure if the front-end needs this in some other place (i.e. to link back to the publication from the dataset page or something). But if that is not needed, that will simplify the json and the backend code :)

unnecessarily nested

That’s probably just the objectid wrapper, @leowe you can un-nest it by passing annotation._id.id to the json

@normanrz
Copy link
Member

normanrz commented Aug 4, 2022

I fixed the annotation id and added name and description to the annotation object.

So, what is left is removing the publication from the datasets.

@normanrz
Copy link
Member

normanrz commented Aug 4, 2022

@philippotto please review the frontend part :-)

@normanrz
Copy link
Member

normanrz commented Aug 4, 2022

@fm3 I now also removed the publication field in 22bfe14. Can you please check that I did that correctly?

Copy link
Member

@philippotto philippotto left a comment

Choose a reason for hiding this comment

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

the front-end looks great 👍 nice clean up! didn't test, though, since I don't know how to do that. maybe you could prepare a dev instance where some publications are available?

app/models/binary/Publication.scala Outdated Show resolved Hide resolved
app/controllers/PublicationController.scala Outdated Show resolved Hide resolved
app/controllers/PublicationController.scala Outdated Show resolved Hide resolved
Copy link
Member

@fm3 fm3 left a comment

Choose a reason for hiding this comment

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

Backend LGTM

@normanrz
Copy link
Member

normanrz commented Aug 4, 2022

maybe you could prepare a dev instance where some publications are available?

Here you go: https://publicationsannotations.webknossos.xyz/ or https://publicationsannotations.webknossos.xyz/publications/5c766bec6c01006c018c7459

Copy link
Member

@philippotto philippotto left a comment

Choose a reason for hiding this comment

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

awesome 🕺

@normanrz normanrz merged commit ae0b8b5 into master Aug 4, 2022
@normanrz normanrz deleted the publications-annotations branch August 4, 2022 11:45
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.

Show case annotations in publications view
4 participants