Feature/Bracket URL - #93
Conversation
…normalize database with new field, set url for challonge entries where possible
| return self.text | ||
|
|
||
| def get_url(self): | ||
| return self.text |
There was a problem hiding this comment.
this should be self.url, right?
|
you're right! made both fixes. |
| TOURNAMENTS_COLLECTION_NAME = 'tournaments' | ||
| PENDING_TOURNAMENTS_COLLECTION_NAME = 'pending_tournaments' | ||
| mongo_client = MongoClient(host=config.get_mongo_url()) | ||
| mongo_client = MongoClient(host='mongodb://devuser:devpass01@127.0.0.1/admin') |
There was a problem hiding this comment.
hmm we really should get the parameters from config, since they are different on stage/prod.
if the sys.path.append(os.path.abspath(os.path.dirname(__file__) + '/../')) isn't working for some reason then it is okay if the script has to be run from the root directory.
…hould run this file instead of start.sh
… un/pw in plaintext to dev console)
* ignore OOR players * this commit should fix the region stuff * fixed rankings for merge
…GARPR to NOTGARPR
* Implementing Phase-id to Bracket Name send to frontend. * Added some frontend to handle the array of brackets * Added api url endpoint, resource, angular frontend to handle bracket population on GUI, and javascript to handle the api call to populate the map of bracket names * Quick change to the frontend * Added JS for adding discluded phases to POST parameters. Server.py edited to handle getting the discluded_phases from the POST args. Changed frontend where id of checkbox holds the phase id being checked * Renamed variables. Rearranged code. Needing to add js that gets all checkboxes and puts them in the post params * Added function to fire when checkbox is changed. Added attribute on input node to hold the phase id * Set everything to be checked off the bat. Add tournament phase id to the post params right away. * Altering test code to work for additional parameter in SmashGGScraper object. Fails exclusion test. * API for excluding phases from smashgg event should be fixed. * Critical JS fix for the frontend. * Altered Server and JS to handle GET parameters for getting the SmashGG bracket map as opposed to a parameter in url path * Added parser arguments for the Tournaments URL in the server to accept list of excluded phases from SmashGG imports * Successfully populating the phases on the Garpr GUI on SmashGG tournament url input into the textbox. * On checkbox of smashgg phase we either add or remove it from list of excluded phases to send to the api. * Included some debug messages to run when hit * Changed logic. Get all groups. Get excluded Phases. Get groups from excluded phases. remove those groups from all the groups total. Then we can only process groups still in the overall list * Bug Fix: On cancel clears the smash GG brackets. In Progress: Status message telling user phases are being pulled from Smash GG In Progress: Clearing Smash GG data on modal losing focus. * Feature: Added message to indicate to user that Phases are being imported Feature: Disable Submit button until http call to get phases comes back. * Added dynamic message changing based on user input. Might want to add messages to help user insert correct url. * Bug Fix: Now removes smash gg phases and data when the modal loses focus. Prevents silly errors or reloading the page. * Reengineered Scraper to accept INCLUDED phases as opposed to Excluded phases * Refactored SmashGg instances to SmashGG * Made necessary naming convention edits.
* make TestServer faster by not setting up db every time * update mongomock version in requirements.txt * trying stable mongomock version
…normalize database with new field, set url for challonge entries where possible
|
|
||
| class Tournament(object): | ||
| def __init__(self, type, raw, date, name, players, matches, regions, orig_ids=None, id=None): | ||
| def __init__(self, type, raw, url, date, name, players, matches, regions, orig_ids=None, id=None): |
There was a problem hiding this comment.
bleh, so there is a bit of a problem with this: now everywhere we initialize a Tournament (in dao or elsewhere), we need to update this argument (because of this tons of tests are failing).
i think the solution is to: a) actually update all of these references b) add url as an optional named parameter at the end (i.e. put url="" or url=None at the end of the list of parameters).
eventually we need to clean up how these models work (which is what the ORM refactor was intended to do).
| scraper.get_matches(), | ||
| regions) | ||
| regions, | ||
| scraper.get_url()) |
There was a problem hiding this comment.
I think this should be url=scraper.get_url(); right now I think it is assigning this to alias_to_id_map so urls are not showing up.
* added link to bracket if we have one in the database (only challonge right now) * Add external url to challonge/smashgg tournaments. run add_url.py to normalize database with new field, set url for challonge entries where possible * suggested changes * no message * "fixed" import (just created config parameters manually) * move url script back to root, pulling config from config file * point to correct collection when updating pending_tournaments * Update README.md * Update README.md * Added start script with Windows ending lines. Any Windows developer should run this file instead of start.sh * quickfix: remove console.logs from webapp (especially ones that write un/pw in plaintext to dev console) * ignore OOR players (ripgarpr#62) * ignore OOR players * this commit should fix the region stuff * fixed rankings for merge * hotfix: Added Georgia to the list of regions. Renamed instaces of NJ GARPR to NOTGARPR * hotfix: SmashGG Importer now natively ignores empty phases * quickfix: save alias mappings on submit * Added new regions to the UI. * Hotfix: Sort players properly, not case sensitive * SmashGG - Importer GUI Phase Listings (ripgarpr#91) * Implementing Phase-id to Bracket Name send to frontend. * Added some frontend to handle the array of brackets * Added api url endpoint, resource, angular frontend to handle bracket population on GUI, and javascript to handle the api call to populate the map of bracket names * Quick change to the frontend * Added JS for adding discluded phases to POST parameters. Server.py edited to handle getting the discluded_phases from the POST args. Changed frontend where id of checkbox holds the phase id being checked * Renamed variables. Rearranged code. Needing to add js that gets all checkboxes and puts them in the post params * Added function to fire when checkbox is changed. Added attribute on input node to hold the phase id * Set everything to be checked off the bat. Add tournament phase id to the post params right away. * Altering test code to work for additional parameter in SmashGGScraper object. Fails exclusion test. * API for excluding phases from smashgg event should be fixed. * Critical JS fix for the frontend. * Altered Server and JS to handle GET parameters for getting the SmashGG bracket map as opposed to a parameter in url path * Added parser arguments for the Tournaments URL in the server to accept list of excluded phases from SmashGG imports * Successfully populating the phases on the Garpr GUI on SmashGG tournament url input into the textbox. * On checkbox of smashgg phase we either add or remove it from list of excluded phases to send to the api. * Included some debug messages to run when hit * Changed logic. Get all groups. Get excluded Phases. Get groups from excluded phases. remove those groups from all the groups total. Then we can only process groups still in the overall list * Bug Fix: On cancel clears the smash GG brackets. In Progress: Status message telling user phases are being pulled from Smash GG In Progress: Clearing Smash GG data on modal losing focus. * Feature: Added message to indicate to user that Phases are being imported Feature: Disable Submit button until http call to get phases comes back. * Added dynamic message changing based on user input. Might want to add messages to help user insert correct url. * Bug Fix: Now removes smash gg phases and data when the modal loses focus. Prevents silly errors or reloading the page. * Reengineered Scraper to accept INCLUDED phases as opposed to Excluded phases * Refactored SmashGg instances to SmashGG * Made necessary naming convention edits. * make TestServer faster by not setting up db every time (ripgarpr#107) * make TestServer faster by not setting up db every time * update mongomock version in requirements.txt * trying stable mongomock version * added link to bracket if we have one in the database (only challonge right now) * Add external url to challonge/smashgg tournaments. run add_url.py to normalize database with new field, set url for challonge entries where possible * suggested changes * no message * "fixed" import (just created config parameters manually) * move url script back to root, pulling config from config file * point to correct collection when updating pending_tournaments * test fixes * use named paramater in function call
-Add 'url' database field to tournament/pending tournament collections
-Populate field using existing raw data of challonge brackets (where possible)
-Initialize url field on tournament creation
-Display url link on tournament page if it's value is non-null
NOTE: in order to set up the database, add_url.py must be run. This file serves to complete the first two bullets above.