These are chat archives for yasp-dota/yasp

21st
Apr 2015
Daniel Houston
@DanielHouston
Apr 21 2015 10:07
Looks like I have retriever working with the secret; I've added my main steam account to the permanent list in scanner.js and it appears to be recognising the id. How do I now track changes against that id/get any metrics for it?
Also - I've been looking through the Java code in the parser; There's quite a bit that could be done! Even simply refactors for the sake of easier to read code. How do you/the yasp team feel about large scale refactors?
Howard Chung
@howardchung
Apr 21 2015 11:16
Depending on what you want to do with the MMR data, you may not need scanner at all. Retriever by itself just provides an API to get MMR data for accounts that you have as friends.
If you have suggestions, please make an issue for them on GitHub! Or submit a pull request and work incrementally, and we'll review the changes as you go.
You may want to write your own application logic that just pulls MMR data every x interval. Scanner will be continuously checking the sequential API for new matches, so that's how it knows to update after every ranked game played by a user. But that's not as plug-and-play, it's currently set up to work with Kue and MongoDB, which may not fit your use case
Daniel Houston
@DanielHouston
Apr 21 2015 11:23
I'll dig through retriever and figure out it's api. Thanks
Daniel Houston
@DanielHouston
Apr 21 2015 12:18
Perfect. I've got what I need. Very simple!
I'll spend some time going through Main.java and raise things on github.
Daniel Houston
@DanielHouston
Apr 21 2015 13:16
So are a lot of people who contribute to YASP students?
Howard Chung
@howardchung
Apr 21 2015 16:55
Mostly. Albert and I probably write 98% of the code, and we're both students.
Daniel Houston
@DanielHouston
Apr 21 2015 16:57
I'm impressed; Wish I could have produced anything like this while also studying
Daniel Houston
@DanielHouston
Apr 21 2015 18:08
Are there any system level tests? I want to test some refactoring i've done in onChatEvent.
Howard Chung
@howardchung
Apr 21 2015 18:09
We have tests written in mocha. If you just want to run a single parser test, you can do mocha -g download (tests downloading a replay and parsing it)
or, if you just want to test the parser, you can build it with maven and then pipe a replay through it
test files are in this repo: https://github.com/yasp-dota/testfiles
the parser test does a full end-to-end, it attempts to download the replay (but from github rather than valve), runs it through the parser, post-processes it with JS, and inserts into db
but if you just want to make sure the parser doesnt crash, the maven build and run approach is faster
Here's a sample command I've used previously to test quick Java changes
mvn -f parser/pom.xml package && java -jar parser/target/stats-0.1.0.one-jar.jar < ../testfiles/1193091757.dem > output.json
that assumes you clone testfiles as a peer to yasp
alternatively you could just wget a single file and then use the path to that
Howard Chung
@howardchung
Apr 21 2015 18:15
npm test runs the full test suite, when you push to GitHub we also have Travis CI set up to automatically run the tests
Daniel Houston
@DanielHouston
Apr 21 2015 18:18
Thanks
Howard Chung
@howardchung
Apr 21 2015 19:26
are you just switch/casing the chat event types?
Daniel Houston
@DanielHouston
Apr 21 2015 19:33
Switching on chat event type, abstracted it out so that common actions against an chat event are only called once, cleaned up variables so the code is simpler to read.
Moved to a package structure more typical of Java. Though that has seemed to have caused problems
Howard Chung
@howardchung
Apr 21 2015 20:55
When you're ready make a PR and we'll take a look
the YASPCombatLog classes will be deprecated when spheenik updates clarity to contain the methods we're using
Chris92
@Chris92de
Apr 21 2015 22:28
Apparently I have a match in my history that was played on 01-01-1970, basically a timestamp of 0
can't find it tho
On this link, sort the Heroes table by Last in an ascending order: http://yasp.co/players/44192087
45 years ago...
Howard Chung
@howardchung
Apr 21 2015 23:40
I don't see it. . . can you link directly to the match page?
oh wait I see
you're talking about hte last played heroes
yeah, if you've never played a game with a hero it displays as timestamp 0
we can change it to "never"
Howard Chung
@howardchung
Apr 21 2015 23:46
fixed in dev branch, thanks for pointing it out. Bug reports are usually better off as issues in repo, so we can check it off