render-engine / render-engine/render-engine

check for required values

Open
#793 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

good first issue validation
Dominant language
Python
Stars
61
Forks
40
Avg merge
4h 29m
Merged PRs (30d)
10

Description

Happy to move this over to a discussion if necessary until we have a solid plan but based on #236, each object has required items that need to be defined on initialization.

This varies based on the object (not the object type).

Perhaps it would be good to create a validation step in there that checks for all of the required attributes.

To Implement

BaseObject would need a method validates that would be used to raise an AttributeError (?).

Since Page and Collection objects inherit from BaseObject then custom parsers can override it.

We can also apply the following validations.

Page - No validation
BlogPost - requires both date and content_path attributes.

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 by reading the BaseObject, Page, Collection, and BlogPost definitions and review issue #236 for the existing required-item behavior. Determine a validation contract and exception choice before implementing it, including BlogPost requirements for date and content_path and no validation for Page. Done means initialization consistently rejects missing required attributes and the behavior is covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.