Code Monkey home page Code Monkey logo

three-games's People

Contributors

mgeiger avatar mkazin avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

three-games's Issues

Tech debt cleanup

It's Python project night.

Current CodeClimate reports project stats:

  • Score B
  • 1 day of debt

Let's pay down some debt!

GameRecommendation output confusing - total hours missing

When printing the list of game recommendations the column on which they games are sorted does not appear in the output. Only average hours is shown (alongside a list of users, split into friends and non-friends). This is unintuitive.

Refactor GraphDb's use of "center"

GraphDb's use of NetworkX isn't fully implemented.

  • insert_players() is only used by unit tests. Otherwise the graph is unpopulated
  • As of now, game_recommendations() still performs manual BFS traversal using the provided "center" node
  • Instead, we should investigate NetworkX's capability to traverse for us
  • Instead of passing in the center node, the node's ID (steam_id of a player) should be provided, which should then be queried in the vertices.

Clean up logging

I'm unhappy with what I'm seeing in the logs for crawling_tester.py
Let's clean it up, make it more helpful.
This may be useful in determining why I'm only seeing friends show up in that script, and no friends-of-friends.

Implement disjunction option for Filters?

I tried playing around with GameNameTraversalFilter in crawling_tester, changing it from filtering out multiple forms of Magic: The Gathering and ended up getting an empty recommendation list.
This was because it's implemented as a conjunction. Do I want to provide a mechanism for specifying disjunction is required?

Properly solve the backtracking issue from 10/8

When I was working on traversing the graph I ran into some issues in the recursion.
First among these was recursing over already-queried Players (who had also been appended into the player_cache).
My naive solution to this was first to add a second parameter into the recursion function to allow checking for backtracking. I then determined I could simplify this by using player_cache.
I now believe this may have been a mistake.
The reason: a Player skipped due to backtracking may require different handling than one due to graph_depth.

Example:

  • Suppose the following list of relationships:
    Alice -> Bob, Debra
    Bob -> Carl
    Carl -> Debra
    Debra -> Eustice

  • Using the graph traversal system I currently employ, after three recursions the Bob branch would be:
    Alice -> Bob -> Carl -> Debra

  • If the max_depth was set to 3, we would not query for Debra's relationships, but we would add her to the cache.

  • The problem occurs when we exit Bob's recursion stack, return to iterating over Alice's friends, and re-encounter Debra.

  • At this stage, Debra is skipped due to being in the cache. So despite being well within the specified graph depth, we would never build up the other branch under Alice:
    Alice -> Debra -> Eustice

Build CI system

  • TravisCI is good, can use aws-sg-mngr as template

  • Set up static analysis

  • Set up test coverage

  • Add status badges in README

Refactor MockSteamApi, fix coverage for edge cases

SteamApi was upgraded to handle a few edge cases:

  1. User profile is private
  2. User owns no games
    This created extra code paths which are untested. That dropped the coverage rating to F on that file.

Your mission should you choose to accept it:

  • Update MockSteamApi to return actual Steam responses
  • Pass this data to SteamApi class when MockSteamApi is used to allow these code paths to execute on test data

Refactor GraphDb.game_recommendations()

  1. It doesn't belong under GraphDb - a data structure. Move to gameRecommendations, probably as a static method
  2. Also move the TraversalFilters
  3. It is currently returning a hashmap of games. There's no real need for this, a list would be easier to understand. Instead, let's just have it returned the sorted list from (the now-misnamed) sort_by_playtime() (i.e. merge the two functions)
  4. The method is already a little long, so let's break it up.

Fix failing tests in Travis

Travis CI does not contain a config/auth.conf file .
It's failing on at least one of the unit tests due to trying to use a non-mocked function.

Make sure friend-of-friend crawling is working

Check the mock data in MockSteamApi and the tests using it to see if we are actually expecting to see recommended games owned by friends of friends. I'm not seeing any in crawling_test.py

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.