Coder Social home page Coder Social logo

garpr's People

Contributors

acoulon99 avatar brandoncookedev avatar garsh0p avatar jamesargy6 avatar jarrodblanton avatar jdtanacredi avatar jessemtso avatar jhertz avatar jiangtyd avatar jschnei avatar necrotaxonomist avatar yedi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

garpr's Issues

Make SmashGG scraper grab all phase_groups for large tournaments.

Currently, for large tournaments with multiple pools/rounds, admins have to insert every round separately (which is tedious and leads to input errors, etc.).

The SmashGG scraper can grab all the phase_group ids for a tournament via the api.smashgg.com/event API endpoint. In particular,

https://api.smashgg.com/event/{event_id}?expand[0]=entrants&expand[1]=groups

will list all the entrants and phase_groups in the event with event ID {event_id}. The event_id is the first of the three numbers; e.g. one pool for CEO has URL https://smash.gg/tournament/ceo-2016/brackets/11787/45262/150428; the event id is 11787 (the phase_group id for that specific pool is 150428). Once we have the phase_group ids, we can use the old API route to gather all the matches (i.e. https://api.smash.gg/phase_group/150428).

PS: We should also ask the SmashGG people if there is a way to grab the tournament name from some API endpoint; it is possible to grab the event name from the above API route, but unfortunately this is usually something like "Melee Singles" as opposed to "CEO 2016".

@BrandonCookeDev @VestboyMyst

feature req: display uncertainty better

not sure what units the current uncertainty is in, but convert to +/- point value, and add to the right of where points are currently displayed on the main rankings page

that, or to keep the aesthetics, add in the ability to hover over the current scores and see the uncertainty, as it does on the player pages

on the player pages the uncertainty should probably be displayed next to the rating as its own text field, not only when not hovered over

Logging Module for Garpr

We need to make a module that writes logs to a file. This will ensure we are able to track issues especially in the long run when we have a lot of users and traffic.

Implement SmashGG Error Handling

Due to the recent discovery of instability in the SmashGG api (likely due to new releases), the SmashGG importer module needs better error handling in case updates like these will continue to be an issue.

feature: admin panel where we can play with trueskill parmeters

somewhere (maybe in the tournaments tab) have a little area with the relevant values we can tweak for trueskill's algorithm

have a field for each where we can enter new ones and maybe its a good idea to have the default values written beside them

also in this area we can have the "X brackets in last Y days" fields for the admin to edit

Smashgg importer is including amateur brackets if they happen to be in the event

this can be seen with Nebs prime 47 which is one of the few ones the amateur bracket is in the smashgg event and not separate on challonge

https://www.notgarpr.com/#/newjersey/tournaments/577d1f4ae592571213091dc8
https://smash.gg/tournament/nebulous-prime-melee-47/brackets

amateur sets are included in our imported version

maybe we need a new feature for the smashgg uploader, where it shows which individual brackets are in that smashgg event and the admin can check off which ones we want to import / consolidate into one bracket

issue merging players on notgarpr.com

currently when i try to merge players i get the confirmation that the two have been merged, but nothing happens. i can do it over and over and get the same result

Rating system using challonge API

If True Skill is being used as the ranking method, is it possible to add options for which ranking method the user wants to use such as Elo or Gicko2 or FIDE? Also, set score 2-1 vs 2-0 should be considered because many tournament organizations calculate the total wins/loses as part of Elo rating.

NJ Privacy and Chill-out Admin/Feature requests

  • add a tab that is viewable only by admins. 'regenerate' will now publish a new PR to this one and not change the main rankings page
  • add a 'publish' button to the admin PR view tab, which will push that PR to the main page and update the date. it will also update the scores of every player's profile and the wins/losses.
  • when viewing player profiles while not signed in, hide the score/uncertainty and only show win/loss record up to the last 'published' PR
  • the tourny tab can remain the same for the most part, but all brackets added between the last 'published' pr and the present date will appear at the top in grey and unclickable if the viewer isnt signed in. (lower priority / optional)

there are several reasons for these changes outlined in the chat

SmashGG scraper not working correctly on some tournaments

The SmashGG scraper doesn't seem to be correctly getting the player names for some tournaments. In particular, the list of player tags sometimes has duplicates for some tags and is entirely missing others.

For example, displaying the players in https://smash.gg/tournament/tiger-smash-4/brackets/11097/21317/70949, we get the list of players:

<scraper.smashgg.SmashGGPlayer object at 0x7f0ed366c4d0> Druggedfox
<scraper.smashgg.SmashGGPlayer object at 0x7f0ed366c310> SmashBob SquarePants
<scraper.smashgg.SmashGGPlayer object at 0x7f0ed366c650> ESAM
<scraper.smashgg.SmashGGPlayer object at 0x7f0ed366c610> KPAN
<scraper.smashgg.SmashGGPlayer object at 0x7f0ed366c9d0> Milkman
<scraper.smashgg.SmashGGPlayer object at 0x7f0ed366c250> stingers
<scraper.smashgg.SmashGGPlayer object at 0x7f0ed366c850> DAB
<scraper.smashgg.SmashGGPlayer object at 0x7f0ed366c8d0> NIX
<scraper.smashgg.SmashGGPlayer object at 0x7f0ed366c950> Trix
<scraper.smashgg.SmashGGPlayer object at 0x7f0ed366c490> SmashBob SquarePants
<scraper.smashgg.SmashGGPlayer object at 0x7f0ed366c550> dansofree
<scraper.smashgg.SmashGGPlayer object at 0x7f0ed366c290> Landry
<scraper.smashgg.SmashGGPlayer object at 0x7f0ed366c2d0> Wei
<scraper.smashgg.SmashGGPlayer object at 0x7f0ed366c510> loverboy
<scraper.smashgg.SmashGGPlayer object at 0x7f0ed3548510> Spinjump
<scraper.smashgg.SmashGGPlayer object at 0x7f0ed3548490> 92Greatness
<scraper.smashgg.SmashGGPlayer object at 0x7f0ed3548390> Gato
<scraper.smashgg.SmashGGPlayer object at 0x7f0ed35483d0> Perthro
<scraper.smashgg.SmashGGPlayer object at 0x7f0ed3548410> dansofree
<scraper.smashgg.SmashGGPlayer object at 0x7f0ed3548450> DarkLava
<scraper.smashgg.SmashGGPlayer object at 0x7f0ed35484d0> Cohenski
<scraper.smashgg.SmashGGPlayer object at 0x7f0ed3548550> Matchu
<scraper.smashgg.SmashGGPlayer object at 0x7f0ed3548350> DAB
<scraper.smashgg.SmashGGPlayer object at 0x7f0ed3548650> NIX

which contains "SmashBob SquarePants" twice and doesn't contain "One Falcon Punch Man" at all. This issue also comes up in the bracket https://smash.gg/tournament/super-nebulous-4/brackets/11335/14961/50953.

@BrandonCookeDev @VestboyMyst

support for marking players as OOR for ratings calculation

first we should just do it manually. but good way to do it would be to use activity criteria, i.e. for nebs64, player has to have entered X number of tournaments... or has to have certain amount of significance (would need to calc rankings twice for that i think).

this is probably what im gonna work on next

Admin: unmerge/break up all events on a player profile into separate profiles

This profile is made up of several different people, all with the tag 'Seven' or '7' or 'Se7en' or some variation https://www.notgarpr.com/#/newjersey/players/56d093074d75216110485add

currently the only way to rectify this is to delete and reupload all of those tournaments, then go through and merge the proper accounts appropriately. in the future can we have a way for admins to break up an entire list of a player's events back into separate player profiles

so it would do something like 'Player X' --> 'Player X (1)' + 'Player X (2)'.... and then an admin can merge each individually / rename them accordingly

request: way to manually tag certain sets to be omitted from calculation

this is needed in several instances:

  • when a player is DQed/has to leave early after playing >=1 set in a bracket
  • when TOs mark DQs as 0-2 losses
  • when TOs do 'DIY seeding' for topX brackets involving giving some players random losses to put them into losers

smashgg allows you to see if a set was won by DQ so those can probably be added to the omit list automatically. admins will need a manual method for sure, but there should be some checks planned to prevent abuse

feature req: score vs time plot in in player pages

when a player clicks on his / her name, the ability to see their score over time in a simple chart on their profile page. one for each region if they are in multiple regions

not sure how hard it is to do this (or if it will require more computation when regenerating) but something like what chess.com does would be nice

maybe include the values on the side that are relavant, like percentile, strongest opponent beaten, average opponent skill?
image

request: things to improve deleting duplicate players

some combination or variation of these

  1. if a bracket is deleted and it is a player's only result, can we automatically delete that player from the system?
  2. can we run a script that deletes players with no sets in their profile every week?
  3. a delete button that is only allowed to be used by an admin if the player profile has no sets / entries

Properly get date of results / allow admins to change date/time of results

currently garpr uses the date the bracket was created on challonge instead of the date the event was run (which is an optional field in challonge). we need a way for this to be the first field checked, and it would be nice if admins could change the date/time of results so that they count in the right order

two current issues in NJ
-if someone goes back to recreate pools for an event (TCNJ Barkada) the pools are counted months after the event happened.
-if two locals happen in the same day (jersey japes, knight slash) there is a chance the one that happened 2nd is calculated first if time isnt specified on both of them

admin feature: allow public to submit bracket urls, admin approve/tag

i think this was the original idea years ago and its becoming more important as more events are made

basically add some tab where there is a field for un-signed in users to submit missing URLS (challonge/smashgg) . first system checks if they exist already, if not they add them to some admin dashboard where we can go in and approve/delete them.

not a high priority task but will be welcome eventually. once this is added we can play with the idea of having others submit player merges and having admins approve that too

test cases failing due to incorrect DB permissions

in vagrant env. an example

ERROR: test suite for <class 'test.test_dao.TestDAO'>

Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/nose/suite.py", line 209, in run
self.setUp()
File "/usr/local/lib/python2.7/dist-packages/nose/suite.py", line 292, in setUp
self.setupContext(ancestor)
File "/usr/local/lib/python2.7/dist-packages/nose/suite.py", line 315, in setupContext
try_run(context, names)
File "/usr/local/lib/python2.7/dist-packages/nose/util.py", line 470, in try_run
return func()
File "/home/vagrant/test/test_dao.py", line 16, in setUpClass
MongoClient().drop_database(DATABASE_NAME)
File "/usr/local/lib/python2.7/dist-packages/pymongo/mongo_client.py", line 1051, in drop_database
read_preference=ReadPreference.PRIMARY)
File "/usr/local/lib/python2.7/dist-packages/pymongo/database.py", line 481, in command
codec_options, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/pymongo/database.py", line 393, in _command
allowable_errors)
File "/usr/local/lib/python2.7/dist-packages/pymongo/pool.py", line 213, in command
read_concern)
File "/usr/local/lib/python2.7/dist-packages/pymongo/network.py", line 99, in command
helpers._check_command_response(response_doc, None, allowable_errors)
File "/usr/local/lib/python2.7/dist-packages/pymongo/helpers.py", line 196, in _check_command_response
raise OperationFailure(msg % errmsg, code, response)
OperationFailure: not authorized on garpr_test to execute command { dropDatabase: 1 }

Widget to generate suggested seeding for tournaments

It would be cool to have a feature for TOs to submit a tournament link before starting the bracket, and get an ordered list of it's entrants sorted by skill rating. any players not in the system would go at the bottom. Obviously this shouldn't be the only factor a TO should use in tournament seeding but I think it would be helpful

Set up automated backups

Set up a cron job/jenkins job so the server periodically dumps backups of the db (probably either daily or weekly).

$led Bug: Brackets with tags starting in '$' will not submit properly, players with $ in name get renamed

This can be seen in SKTAR3 with $led and Rowan SSBM #2 with $man<>boi

when clicking submit the 'Are you sure' dialogue comes up like normal, but clicking submit on that will not do anything

this happens if you're creating a new player or tagging them with an existing alias

another example of a bug with $: http://njssbm.com/#/newjersey/tournaments/57072e64e5925764360756d8
from here http://chaoticneutral.challonge.com/chaoticneutralweeklymelee4_7

Pizza$ was renamed to _cel when submitted

It does not seem to happen with Ko$a (because its in the middle I assume)

Not auto filling the players in any nebs primes even though all tags are common

the auto fill function is not working for tags that are very slightly different from the actual tags. for exampl "1 1 Slox" should become "Slox." some of the names will autofill for example- http://njssbm.com/#/nyc/tournaments/574c5d9ce5925732410756df

in this link you can see that NY Joey was auto filled correctly, while every other name has no suggestion come up. these are all common tags, Capt Smuckers, Slox, G$.

tldr - 1 1 Slox = Slox

vagrant test env needs db w/ data and with "fake" admin users for testing

vagrant test env needs db w/ data and with "fake" admin users for testing

should be a DB dump that has actual tournaments (for testing autosuggest, merges, and other admin functionality.

also will need to have "fake" admin accounts (un: test, passwd: test) because this is going in source control, so we dont wanna leak our (hashed) creds

nosetests not installed, and fails within vagrant env

boot VM
nosetests -- not found
run sudo apt-get install python-nose
run nosetests will fail with a bunch of import errors
something is not working correctly with python environment (nose is included in requirements.txt)

admin feature: output all players / tournaments in system

maybe add a page for admins that generates a list of all players in the system across all region databases. if it can order them by some aggregate score it would be good for seeding events in tristate that have a combination of NJ and NY players

also something similar for tournaments. that way we can delete any brackets that are messed up / unused. currently the only way to delete a bad bracket is if it shows up in your region's tournament list

handle OOM errors gracefully

when we had a lot of users hit the site due to posting in NYC SSBM, mongo OOM'd, which led to OOM killer killing the API.

we need to:

  1. handle OOM errors gracefully, restarting things when necessary
  2. rework the way we're using mongo (cacheing maybe?) so that we don't blow memory

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.