OpenSlides / OpenSlides/openslides-backend

[relDB] Improve checker

Open
#3,221 0 comments 0 reactions 0 assignees View on GitHub

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:
    • Definevalidate()methods for all the field types
    • Remove check around the TODO
    • Catch type error from the field.validate() method inside of the check_normal_fields() method and assigned more clear messages (the ones that are currently used in the check after the first TODO)
  • 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.