Improve cv validator error messages

Open Beginner friendly
#863 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python
Domain
backend

Research direction

Start in cdds/common/request/validations/cv_validators.py and inspect how validation errors such as the parent_experiment_id mismatch are assembled. Update the relevant messages to include the received value and valid expected values, then verify that incorrect request-file inputs report this context consistently.

Written by the indexing model from the issue text.

Description

enhancement

When incorrect information within a request file is flagged by cdds/common/request/validations/cv_validators.py, it might be valuable to give more information about the expected valid input.

e.g. Upon giving an incorrect parent_experiment_id, the following error is returned: "Parent experiment id does not match with id in CV config". However, it may be more valuable and user friendly to update this to something of the form "Parent experiment id '<request.metadata.parent_experiment_id>' does not match with id in CV config, expected one of the following: <cv_parent_experiment_ids>.

Dominant language
Python
Stars
8
Forks
7
Avg merge
1d 15h
Merged PRs (30d)
23

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.

More from MetOffice/CDDS

All issues in MetOffice/CDDS

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.