Draft to develop Open-Peer-Review-Process on OEP
Development of #658
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.
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_clickin 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!
@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 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
ööm i will have a look but it should work :D maybe i forgot something.