Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • funkwhale funkwhale
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 409
    • Issues 409
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 18
    • Merge requests 18
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • funkwhalefunkwhale
  • funkwhalefunkwhale
  • Merge requests
  • !814

Implement tag models

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Agate requested to merge 432-model into develop Jul 01, 2019
  • Overview 23
  • Commits 13
  • Pipelines 7
  • Changes 28

See #432 (closed)

Rather big MR, so let me outline the work done below:

  • The first few commits are not directly related to tagging, but introduce a new command, load_test_data that can be used to populate the database with test accounts, tracks, albums, artists, uploads, libraries and tags. This was needed to do basic testing on a database with ~50K tracks and ~100K tags-tracks relationships. Review of the load_test_data.py, associated tests and random-data generators in funkwhale_api/factories.py isn't strictly required, because it's primarily meant for development and won't affect production pods. If you skip that, the MR is actually much smaller ;)
  • Dropped django-taggit
  • Create a new tags app, which mainly consist of a Tag and TaggedItem model. TaggedItem stores the relationship between tags and other objects (tracks, artists, etc.)
  • Added a ?tag filter in the API to test that we can actually filter using tags and validate the performance
  • Fixed some issues introduced by the change from taggit.Tag model to our own (e.g in radios)
  • Removed obsolete logic because of the changes
  • Enable postgres's citext extension to ensure our tags stay unique in DB regardless of the case and make search easier

The MR doesn't include a separate Genre model as initially mentioned in #525 (closed). Before doing that, I'd like to start building the Imorter / UI / APIs / Federation on top of tags, and see how it goes :)

Note: the failing CI test is unrelated (it also affects develop), I'm working on that

cc @funkwhale/reviewers-python

Edited Jul 05, 2019 by Agate
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: 432-model