openedx / openedx/openedx-events

Allow adding _in validators to attr classes

Open
#348 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
13
Forks
33
Avg merge
14h 37m
Merged PRs (30d)
4

Description

As per my question [here](Here's the original thread: https://openedx.slack.com/archives/C03SDBSFUUB/p1714139377765319):

There's a new event in progress here, which included a status str attribute with a validator: https://github.com/openedx/openedx-events/pull/303/commits/8558418e230edcf29687661bcdb3def5bb1a58bc#diff-5cf3a0b26961626ce[…]a35d078cb9c62438fa3R521. Without this modification tests would fail because of the validator, but the change was too specific for this use case, so the team implementing the event decided to drop the validator altogether. The thing is, we should be able to add this kind of stuff, so should we implement a workaround for it?

I'm opening this issue so we can go back to it in the future.

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

The issue names no source files or tests. Start by locating the attr classes and validator handling referenced by the linked openedx-events pull request, then identify where _in validators are rejected or stripped. Done means event attributes can retain this validator type without a use-case-specific workaround, with tests covering the behavior.

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
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.