# GSoC 2019: Support For Reviewing and Rating More Entities (CritiqueBrainz)

**URL:** https://community.metabrainz.org/t/gsoc-2019-support-for-reviewing-and-rating-more-entities-critiquebrainz/420291
**Category:** GSoC applications
**Tags:** gsoc-2019, critiquebrainz, musicbrainz
**Created:** [March 13, 2019, 4:02am UTC](https://community.metabrainz.org/t/gsoc-2019-support-for-reviewing-and-rating-more-entities-critiquebrainz/420291 "2019-03-13T04:02:02Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![spellew](https://community.metabrainz.org/letter_avatar_proxy/v4/letter/s/dec6dc/32.png) [@spellew](https://community.metabrainz.org/u/spellew)
#### Post date: [March 13, 2019, 4:02am UTC](https://community.metabrainz.org/t/gsoc-2019-support-for-reviewing-and-rating-more-entities-critiquebrainz/420291/1 "2019-03-13T04:02:02Z")

</div>

# GSoC 2019: Support For Reviewing and Rating More Entities (CritiqueBrainz)

## Personal Information

Name: Shamroy Pellew

IRC: spellew

Email: [spellew1298@gmail.com](mailto:spellew1298@gmail.com)

Personal Website: [https://shamroy.me/](https://shamroy.me/)

GitHub: [spellew · GitHub](https://github.com/spellew)

LinkedIn: [https://linkedin.com/in/shamroyp](https://linkedin.com/in/shamroyp)

Time Zone: UTC−05:00

* * *

## Project Details

**Overview**

Currently CritiqueBrainz’ users can review release groups, events, and places. I plan on expanding this, by implementing reviews for other MusicBrainz entities. This metadata will be retrieved from MusicBrainz through the **mbdata** module, and I’ll be extending the CritiqueBrainz back-end and the front-end to support reviews for these entities. Here are a few mockups of the changes to the web interface:

I plan on adding new options to the entity selector in the top-right corner of the site.

 ![1](https://community.metabrainz.org/uploads/default/original/3X/4/8/48e0ad65047a370f4d133be5ecea30d37887d2ea.png)

Then, when users search for one of these new entities, the backend functions I plan to write, will handle the query and returning the respective entities.

 ![2](https://community.metabrainz.org/uploads/default/original/3X/9/a/9a8606d6f91bc53eb396da401c89cb5ede329ded.png)

These entities will be given their own pages, crafted from Jinja templates, and displaying information from database queries.

 ![3](https://community.metabrainz.org/uploads/default/original/3X/9/8/987958133dd0f0b7f4b093efbb639c553e04e4fc.png)

Users will be able to write reviews for these entities using the WYSIWYG editor, and it’ll look the same as if they were writing reviews for any other entity.

 ![4](https://community.metabrainz.org/uploads/default/original/3X/9/5/95d907d04de6b7fb3ca54c00f6439cb54c33e40c.png)

After the review is posted, anybody can navigate to the entity page and click on the review to see it.

 ![5](https://community.metabrainz.org/uploads/default/original/3X/7/a/7a59dca5c920c91f1ebdfae1b9850523ab591e8a.png)

Here are some nonfinal, sample scripts I plan to run on the database:

- admin/schema\_changes/16.sql

- admin/sql/create\_types.sql

Here is some sample code, the final code I write during the summer will of course support more entities:

- critiquebrainz/frontend/external/musicbrainz\_db/includes.py

- critiquebrainz/frontend/external/musicbrainz\_db/serialize.py

- critiquebrainz/frontend/external/musicbrainz\_db/utils.py

 ![schema](https://community.metabrainz.org/uploads/default/original/3X/a/5/a5724e653939c3c26e4e6b2f44565a7190dc2889.png)

I also plan on importing entity ratings using the MusicBrainz database, and incorporating this data into the CritiqueBrainz entity pages. I would accomplish this by adding the corresponding entity meta models, like `LabelMeta`, and joining it to the queries to the database. This data would then be serialized, and retrievable from the frontend.

* * *

**Proposed Timeline**

**Community Bonding:** I’ll sit in on weekly meetings, and familiarize myself with the community, my mentor, and CritiqueBrainz, as I work on bug fixes/features related to my proposal.

**Phase 1**

**Week 1 (May 27):** Continue familiarizing myself with the source code and documentation. Make adjustments to the SQL scripts in order to support reviews for the new entities.

**Week 2 (June 3):** Implement the searching of the new entities by making relevant changes to search.py and the corresponding Jinja template.

**Week 3 (June 10)** : Produce code using mbdata models to retrieve data from the database for queries regarding **works**.

**Week 3.75 (June 14)** : Produce code using mbdata models to retrieve data from the database for queries regarding **artists**.

**Week 4.5 (June 20)** : Produce code using mbdata models to retrieve data from the database for queries regarding **recordings**.

**Week 5.25 (June 26)** : Produce code using mbdata models to retrieve data from the database for queries regarding **labels**.

**Week 6 (July 1):** Implement the creation of these entities by making relevant changes to review.py and the corresponding Jinja template.

**Phase 2**

**Week 7 (July 8):** Produce blueprints for **works** and create the Jinja templates corresponding to this new entity.

**Week 7.75 (July 12):** Produce blueprints for **artists** and create the Jinja templates corresponding to this new entity.

**Week 8.5 (July 18):** Produce blueprints for **recordings** and create the Jinja templates corresponding to this new entity.

**Week 9.25 (July 24):** Produce blueprints for **labels** and create the Jinja templates corresponding to this new entity.

**Week 10 (July 30):** Write tests checking if the creation and retrieval of mock **works** succeeds and if the corresponding entity page is updated.

**Week 10.75 (August 5):** Write tests checking if the creation and retrieval of mock **artists** succeeds and if the corresponding entity page is updated.

**Week 11.5 (August 9):** Write tests checking if the creation and retrieval of mock **recordings** succeeds and if the corresponding entity page is updated.

**Week 12.25 (August 15):** Write tests checking if the creation and retrieval of mock **labels** succeeds and if the corresponding entity page is updated.

**Week 13 (August 19):** Buffer period — ensure goals were reached.

* * *

## Other Information

My name is Shamroy Pellew, and I am a current undergraduate student at the University of Buffalo, located in Buffalo, New York, USA. I participated in Google Code-in 2017, and that was my first real introduction to MetaBrainz. I’m looking forward to sticking around contributing.

**Q:** Tell us about the computer(s) you have available for working on your SoC project!

**A:** I’ll be using my laptop while working on my SoC project, it’s a ASUS ZenBook UX330UA (Core i5 Processor, 8GB RAM) running Ubuntu 18.04 LTS.

**Q:** When did you first start programming?

**A:** I started programming my the summer between my sophomore and junior year of highschool — it’s been almost three years since then. The first languages I learned were Python and JavaScript.

**Q:** What type of books do you read? (Please list a series of BBIDs as examples. (And feel free to also list music you listen to!))

**A:** I mainly read fiction books. Here’s the BBIDs of books I’ve previously read and enjoyed: [Great Expectations [c7023278-b25c-419e-9061-33bd55cca45e]](https://bookbrainz.org/work/c7023278-b25c-419e-9061-33bd55cca45e), [A Thousand Splendid Suns [ad011741-edb6-45c8-b2e7-55af23fe1cc9]](https://bookbrainz.org/work/ad011741-edb6-45c8-b2e7-55af23fe1cc9), and [The World According To Garp [21ae8ac6-0b05-49bd-b76a-28a1d075dc9e]](https://bookbrainz.org/work/21ae8ac6-0b05-49bd-b76a-28a1d075dc9e). And here’s my favorite song at the moment, [Ace [ad2365e7-a6ba-4c97-b304-d166d58a87c3]](https://musicbrainz.org/recording/ad2365e7-a6ba-4c97-b304-d166d58a87c3).

**Q:** What aspects of the project you’re applying for (e.g., MusicBrainz, AcousticBrainz, etc.) interest you the most?

**A:** I’m interested in the languages and frameworks that the project will be coded in, gaining experience in them would be a great aid. I also support the openness of CritqueBrainz, and it’s availability to anyone with internet access. I can see myself and some of my colleagues using the API sometime in the future, and as such I’d like to continue work on the project after SoC ends.

**Q:** Have you contributed to other Open Source projects? If so, which projects and can we see some of your code? If you have not contributed to open source projects, do you have other code we can look at?

**A:** I participated in Google Code-in 2017, here’s some pull requests from that: [MBS-9590: Rewrite the instrument list in React/JSX by spellew · Pull Request #595 · metabrainz/musicbrainz-server · GitHub](https://github.com/metabrainz/musicbrainz-server/pull/595),

[MBS-9606: Rewrite MusicBrainz ISRC index page in React/JSX by spellew · Pull Request #603 · metabrainz/musicbrainz-server · GitHub](https://github.com/metabrainz/musicbrainz-server/pull/603),

[MBS-9607: Rewrite MusicBrainz not found pages in React/JSX by spellew · Pull Request #602 · metabrainz/musicbrainz-server · GitHub](https://github.com/metabrainz/musicbrainz-server/pull/602).

Also, here’s some of my public GitHub repositories:

[GitHub - spellew/ambrosia: An all in one, meal planner, recipe book, and virtual assistant, determined to get you living a healthy lifestyle. · GitHub](https://github.com/spellew/ambrosia) (hackathon project)

[GitHub - spellew/logs-analysis-project · GitHub](https://github.com/spellew/logs-analysis-project) (udacity)

[GitHub - spellew/OAuth2.0: Starter Code for Auth&Auth course · GitHub](https://github.com/spellew/OAuth2.0) (udacity)

[GitHub - spellew/itemize · GitHub](https://github.com/spellew/itemize/) (udacity)

[GitHub - spellew/frontend-nanodegree-feedreader · GitHub](https://github.com/spellew/frontend-nanodegree-feedreader) (udacity)

[https://github.com/spellew/cse-115-project-2](https://github.com/spellew/cse-115-project-2) (class project)

[https://github.com/spellew/cse-116-project-1](https://github.com/spellew/cse-116-project-1) (class project)

**Q:** What sorts of programming projects have you done on your own time?

**A:** In my own time, I’ve mostly done web development projects involving JavaScript and Python. Some technologies I’ve used include React, Node.JS, Flask, Bottle, React Native, SQL, VueJS, Express etc.

**Q:** How much time do you have available, and how would you plan to use it?

**A:** I believe I’ll have most weekends and weekday evenings available to work on my project, due to me pursuing an internship over the summer. Therefore, I should be able to devote at least 30 hours to the project every week, maybe more.

---

<div class="post-metadata">

### Author: ![spellew](https://community.metabrainz.org/letter_avatar_proxy/v4/letter/s/dec6dc/32.png) [@spellew](https://community.metabrainz.org/u/spellew)
#### Post date: [March 13, 2019, 4:04am UTC](https://community.metabrainz.org/t/gsoc-2019-support-for-reviewing-and-rating-more-entities-critiquebrainz/420291/2 "2019-03-13T04:04:55Z")

</div>

This is a very initial draft of my proposal, I’m looking forward to feedback and I’ll be answering any questions.

---

<div class="post-metadata">

### Author: ![Freso](https://community.metabrainz.org/user_avatar/community.metabrainz.org/freso/32/25_2.png) [@Freso](https://community.metabrainz.org/u/Freso)
#### Post date: [March 14, 2019, 12:08pm UTC](https://community.metabrainz.org/t/gsoc-2019-support-for-reviewing-and-rating-more-entities-critiquebrainz/420291/3 "2019-03-14T12:08:57Z")

</div>

> [@spellew](#):
>
> I participated in Google Code-in 2017

You ended up a finalist too. Don’t sell yourself short. 🙂 (Lots of people _participated_ in GCI, but only a very small and select handful of people were finalists.)

Other than that, no real comments. The application is a bit short though. Maybe look over some of the accepted GSoC applications from previous years for some inspiration on how to add some more meat? Other than that, hopefully @iliekcomputers (and/or @mr_monkey) can maybe provide some feedback on the technical side of the application. 🙂

---

<div class="post-metadata">

### Author: ![spellew](https://community.metabrainz.org/letter_avatar_proxy/v4/letter/s/dec6dc/32.png) [@spellew](https://community.metabrainz.org/u/spellew)
#### Post date: [April 7, 2019, 9:47pm UTC](https://community.metabrainz.org/t/gsoc-2019-support-for-reviewing-and-rating-more-entities-critiquebrainz/420291/4 "2019-04-07T21:47:53Z")

</div>

Revamped entire proposal with new idea due to issues with BookBrainz API.

---

<div class="post-metadata">

### Author: ![ferbncode](https://community.metabrainz.org/letter_avatar_proxy/v4/letter/f/71e660/32.png) [@ferbncode](https://community.metabrainz.org/u/ferbncode)
#### Post date: [April 8, 2019, 4:30pm UTC](https://community.metabrainz.org/t/gsoc-2019-support-for-reviewing-and-rating-more-entities-critiquebrainz/420291/5 "2019-04-08T16:30:31Z")

</div>

Hey @spellew, thanks a lot for posting your proposal. Nice work here :), I have a few questions/suggestions whose answers you can consider for later updating your proposal. (No rush and these questions are in no way a requirement 🙂 ). I am aware the deadline is tomorrow already. Apologies for being so late in adding some comments.

1. It would be good if you could modify your timelines such that we finish one entity at a time. That way, it makes easier to plan again or decide on what to do in case of any bottlenecks.

2. Do you have ideas about importing ratings of entities from MusicBrainz to CritiqueBrainz? That would be awesome to have as well, especially since you plan to add more entities like artists which already have ratings on MusicBrainz.

---

<div class="post-metadata">

### Author: ![spellew](https://community.metabrainz.org/letter_avatar_proxy/v4/letter/s/dec6dc/32.png) [@spellew](https://community.metabrainz.org/u/spellew)
#### Post date: [April 8, 2019, 5:43pm UTC](https://community.metabrainz.org/t/gsoc-2019-support-for-reviewing-and-rating-more-entities-critiquebrainz/420291/6 "2019-04-08T17:43:46Z")

</div>

Hi @ferbncode, thank you for your timely and constructive feedback!

1. I modified the timeline, so the blocks were broken up by entity. I’m a bit unsure about how long it should take exactly to work with each entity, so I’m tentatively giving each entity an equal amount of my time. In practice though, I think after I work on the first entity, it should be easier to write code for each consecutive entity.

2. I did look into importing ratings of entities from MusicBrainz. I’m also a bit unsure on this, but correct me if I’m wrong, it seems like just including the meta models for each entity and joining them when getting entities by gids is all that’s needed. Of course, there would also be changes to the structure of the object that needs to be serialized.

- /frontend/external/musicbrainz\_db/utils.py

---

<div class="post-metadata">

### Author: ![Freso](https://community.metabrainz.org/user_avatar/community.metabrainz.org/freso/32/25_2.png) [@Freso](https://community.metabrainz.org/u/Freso)
#### Post date: [March 11, 2020, 5:08pm UTC](https://community.metabrainz.org/t/gsoc-2019-support-for-reviewing-and-rating-more-entities-critiquebrainz/420291/7 "2020-03-11T17:08:20Z")

</div>


