henry-sarabia / refind Goto Github PK
View Code? Open in Web Editor NEWMusic recommendations based on recent play history using the Spotify API
Music recommendations based on recent play history using the Spotify API
The function seems to hang when tests are run. This may be caused by the seed parser.
Lister, FromTracks, and other types/functions have names that are not up to par with a good Go package. They should be renamed to better describe their behavior.
Using the package in another library revealed a memory error. A suite of table tests should be added for each function.
The Spotify subpackage currently has no tests. Each of the exported functions should have an associated table test.
The Spotify package used to implement the Spotify Service subpackage has default and optional functions for most client functions. The default functions were used to implement a minimum functional package but must now be changed for the optional functions that allow for better data fetching.
The FromTracks
function should fetch its own tracks to create a playlist.
The Spotify service subpackage has a redundant type that needs to be removed.
Every playlist simple has a description of "description".
Instead, the Playlist function should take an additional string parameter to use as the playlist description.
SpotifyService is a subpackage that implements the MusicService interface. Renaming the subpackage to Spotify simplifies its import and public API.
Every exported function, type, and variable needs to be documented.
Repository needs a README to describe the installation, usage, and goals of the project.
Currently, the Spotify service subpackage is only fetching the default amount of tracks and artists from the default time frame. This should be extended to fetch all 50 allowed tracks and artists from all 3 time frames.
Several types, functions, and constants are being exported as part of the public API when they should not be. This is increasing the surface area of the API and allowing users to depend on parts of the package that can change. They should be unexported.
As it stands, MusicService is too large of an interface to be useful. There are some methods that can be split into its own interface, creating smaller, more agile interfaces.
The Playlist type might be out of scope for this package. It may be better to simply return a list of tracks to users of this package and let them handle the actual playlist creation on their own terms. This will give the package a narrowed scope.
The scry package returns a list of suggested tracks. SpotifyService is in charge of using those tracks to create a playlist for a user.
The Scryer type should only export the few functions a user would use to create a playlist.
Type generator needs a constructor that takes an argument implementing MusicService. This argument will then be wrapped inside a buffer and set as the generator's service.
Currently, the Tracklist function returns a list of tracks primarily using the fromTracks function with fromArtists as a fallback. It would be more straightforward to export two separate functions that use fromTracks and fromArtists separately.
Accepting an interface and returning a struct will allow for simpler testing.
As is stands, the Recommendations function retrieves as many recommendations as it can get using the provided Seeds. Instead, it should accept an integer argument to act as a limit to the number of tracks to return.
FromTracks and FromArtists need names that describe their behavior, not their implementation.
Explicitly naming each field name for table test cases increases readability. See this table test for an example.
Artist and Track types have method Seed. Currently, Seed returns a type Seed even if the necessary data to create that type is not available. The Seed method should return an error if it does not have the necessary data.
The spotify service should export its playlist function to simplify playlist creation from a tracklist. This also means it will need to be tested.
Duplicate tracks are not being perfectly filtered out.
The file seed.go contains code that is no longer being used. It should be removed.
These are the required data functions
The spotify subpackage tests do not have full coverage due to the update to spotify opt functions.
Authenticator is no longer part of the scry package.
Type buffer and its methods are not being tested directly through the refind package's public methods. This means it might be prudent to refactor them into their own package to be tested on their own.
Currently, FromTracks
returns a list of tracks instead of a complete playlist. A user of the scry package will want a complete playlist type.
When a playlist is being generated, artists familiar to the user should be culled from the list. This will introduce the user to more artists they have not encountered yet. In order to do this, a list of top artists and top tracks should be fetched. Concatenate the list of top artists and the top track's artists. Finally, invalidate any generated tracks with an artist from that list.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.