OpenSlides / OpenSlides/openslides-backend
[relDB] Improve checker
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- Python
- Stars
- 9
- Forks
- 40
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 19
Description
- Currently most of the values types are verified with the helper methods defined in
cheker.py. The place where these methods are called is marked by the first TODO in the file. Desired changes:- Define
validate()methods for all the field types - Remove check around the TODO
- Catch type error from the
field.validate()method inside of thecheck_normal_fields()method and assigned more clear messages (the ones that are currently used in the check after the first TODO)
- Define
- Check code, unreachable because of the validations duplication. Example: second TODO
- Check spelling in the error messages
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in cheker.py, locating the first and second TODOs and the existing helper methods used for field-type verification. Trace the calls into check_normal_fields() and review the current error messages. Done means all field types define validate() methods, duplicated checks and unreachable code are removed, type errors receive clear messages, and spelling is corrected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100