AllDotPy / AllDotPy/Ryx

enhancement: suggest similar fields in FieldError

Open Beginner friendly
#52 0 comments 0 reactions 0 assignees View on GitHub

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:

  1. Use Python's difflib.get_close_matches to find the closest field names in model._meta.fields.
  2. Update the exception message to include: "Field 'foo' not found. Did you mean 'bar'?"

Contributor guide

Open the contributing guide

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.