learningequality / learningequality/studio

Cleanup the flattening / unflattening logic

Open
#5,003 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

DEV: backend P2 - normal
Dominant language
Python
Stars
191
Forks
307
Avg merge
5d 6h
Merged PRs (30d)
10

Description

This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.

Overview

This is a follow-up task to clean up the flattening/unflattening logic currently implemented on the search recommendation UI in Studio.

Description and outcomes

  • We are currently using these functions to flatten and unflatten responses received from the recommender API.
  • We should instead refactor this to use the models/querysets instead.

Acceptance Criteria

  • The refactor doesn't introduce any regressions

Assumptions and Dependencies

  • NA

Accessibility Requirements

  • NA

Resources

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 with the flattening and unflattening functions in contentcuration/contentcuration/utils/recommendations.py, lines 265–369, and review the context in issue 4044. Trace how recommender API responses are represented by the existing models and querysets. Done means the logic uses those models/querysets and introduces no regressions.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, database, search
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.