music-explore
music-explore copied to clipboard
Code review items
Some possible review items to look at that Codex surfaced:
- config-docker.py:19-21 never defines DATA_DIR, yet multiple codepaths (for example app/models.py:45) expect it; add DATA_DIR = f'{ROOT_DIR}/data' to avoid runtime KeyErrors.
- app/similarity.py:29-54 samples segments with random.randint(0, total) even though Segmentation.stop_id is exclusive; when the upper bound is chosen, Segment.get_by_id returns None and the request fails.
- app/processing/metadata/jamendo.py:44-47 creates new Album rows but mistakenly re-adds the artist to the session instead of the album, so those albums never persist.
- afaik DATA_DIR is primarily used for processing scripts, config-docker.py is used for deploying the app, which should primarily use AGGRDATA and INDEX DIRs
- not sure about this, would need to spend time looking into it (if necessary). Afaik semirandom is working
- fixed in #9