enhancement: suggest similar fields in FieldError
Open
Beginner friendly
Nobody has claimed this yet.
enhancement
ryx-python
validators
- Dominant language
- Rust
- Stars
- 13
- Forks
- 5
- Avg merge
- 1h 49m
- Merged PRs (30d)
- 3
Description
When a user provides a field name that doesn't exist, Ryx raises a FieldError. It would be much more helpful to suggest the closest matching field name.
Goal: Modify the field validation logic to suggest similar field names when a FieldError is raised.
Implementation hint:
- Use Python's
difflib.get_close_matchesto find the closest field names inmodel._meta.fields. - Update the exception message to include: "Field 'foo' not found. Did you mean 'bar'?"
Contributor guide
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 at the field validation logic that raises FieldError and inspect model._meta.fields; the issue points to Python's difflib.get_close_matches. Done means a missing field produces the requested suggestion format when a close match exists, while validation still reports fields with no suitable match.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 70/100