oeplatform icon indicating copy to clipboard operation
oeplatform copied to clipboard

Draft to develop Open-Peer-Review-Process on OEP

Open steull opened this issue 3 years ago • 1 comments

Development of #658

steull avatar Aug 15 '22 09:08 steull

The CI fails for python 3.8 as the type hints have not been added by default back then - this changed in python 3.9: https://peps.python.org/pep-0585/#implementation

example that will raise an error in py 3.8 but not in 3.9: error_data: list[dict]

We would need a workaround like importing from __future__ import annotations in omi - or we should drop tests for python 3.8 and make 3.9 the new minimum version - we should discuss in an upcoming oep-dev meeting.

jh-RLI avatar Nov 23 '22 14:11 jh-RLI

Here my suggestions for further code improvements (surely to be discussed) In frontend:

  • do not hardcode categories in template(see backend recommndation for metadata)
  • JS functions are now declared globally (this was my fault - saw that this is handled differently in other views) - should be moved into config function - to do so, all on_click in template must be refactored into JS click events in config function!
  • improve submitting of feld review (ok should call submit directly, suggestion and reject should "open" dialog for field suggestin and/or comment)

In backend:

  • Do not put metadata as is into context, but preprocess it to deliver dict with categories and fields (much simpler to handle in template!)
  • store reviewer in model field (not in review JSON and not for each field, but only once)
  • store timestamp of review once in model field
  • do not store version in review JSON (can be calculated from model)

Hope this helps!

henhuy avatar Jan 25 '23 11:01 henhuy

@christian-rli I generated (python manage.py makemigrations)and added the missing migration. Now the CI Tests are running again. Please pull my changes :)

Edit: Maybe it would be good to rename the schema.json to review_schema.json?

If this schema is the same as the oemetadata latest/schema.json then it is better to use the oemetadata pypi package and import the schema like a python module. But if you will change a lot of things in the schema.json then its better to keep this file at least till the developement is in process. Otherwise we would have to update the oemetdata pypi package a lot.

jh-RLI avatar Mar 08 '23 22:03 jh-RLI

@jh-RLI I added the review status to the table page, but I cannot remember in the code which one was for which case (also, I was not able to see any table anymore with test3). Can you update to the correct html code with the right css classes, please? review-status--start, review-status--ongoing and review-status--done

bmlancien avatar Jun 06 '23 15:06 bmlancien

ööm i will have a look but it should work :D maybe i forgot something.

jh-RLI avatar Jun 06 '23 15:06 jh-RLI