StephenOTT / GitHub-Analytics

GitHub Issues Tracker reporting and analytics (Project Management Reporting and Analytics)
199 stars 22 forks source link

App doesn't have controllers for Download or Analyze #8

Closed vasisht closed 10 years ago

vasisht commented 10 years ago

app.rb doesn't have controllers for download data or analyze.

StephenOTT commented 10 years ago

Yes :(. I have not got to modifying code into the proper sinatra set. GitHub-Time-Tracking is setup. But Analytics you still have to go into: https://github.com/StephenOTT/GitHub-Analytics/tree/master/Ruby/src to actually get anything to work. There are also several dependencies that are not gems at the moment, and there is a patch that you need to apply to Sawyer gem (https://github.com/lostisland/sawyer/pull/15) and reroll the gem locally for the app to work.

This will all be fixed in the next iteration. The Analytics Apps will function the same way GitHub-Time-Tracking works, and be very modular.

vasisht commented 10 years ago

Is there a Readme or a set of instructions?

StephenOTT commented 10 years ago

I can put some readme together for the current iteration. but i would rather spend the time and just get the proper app working.

Do you have a use case you can share that you are trying to report on, and I can get the app up and running for that use case first?

vasisht commented 10 years ago

The use case is to display metrics on the issues, types of issues and breakdown based on categories for a private repository. We have some basic statistics but your visual representation is more appealing.

StephenOTT commented 10 years ago

So for your immediate need, what specific questions do you want to answer?

Provide some "questions" you want to answer, and i will try to get those up sooner than later

StephenOTT commented 10 years ago

There is just too many different variations to do everything at once. So just need some questions that you want to answer to work from.

vasisht commented 10 years ago

To begin with these would be helpful:

Issues created and closed per month Issue events timeline Issue count per user.

Thanks for the quick response.

StephenOTT commented 10 years ago

Okay those are pretty quick to do.

For Issue count this is just a straight Issue Count or is there a time element? Issues Created per user per month?

vasisht commented 10 years ago

Just straight issue count.

StephenOTT commented 10 years ago

k

StephenOTT commented 10 years ago

Okay have the issues being downloaded along with integrated comments. + refactored code so the Sawyer reroll is not required.

screen shot 2014-04-17 at 7 49 57 pm

StephenOTT commented 10 years ago

Forgot to re-add the Date Parsing (GitHub Rest API does not return a date format that MongoDB likes.)

Date Parsing code added as module

screen shot 2014-04-17 at 8 02 53 pm

StephenOTT commented 10 years ago

@vasisht hows this looking:

screen shot 2014-04-17 at 10 54 10 pm

StephenOTT commented 10 years ago

screen shot 2014-04-17 at 11 02 48 pm

vasisht commented 10 years ago

That looks good. I'll test it out and let you know how it goes.

vasisht commented 10 years ago

Issues open per user works. It doesn't pass the oauth tokens when downloading data from the repo, so it won't work with private repositories.

StephenOTT commented 10 years ago

Were you able to login/authenticate?

On Friday, April 18, 2014, vasisht notifications@github.com wrote:

Issues open per user works. It doesn't pass the oauth tokens when downloading data from the repo, so it won't work with private repositories.

— Reply to this email directly or view it on GitHubhttps://github.com/StephenOTT/GitHub-Analytics/issues/8#issuecomment-40811876 .

StephenOTT commented 10 years ago

Okay i updated the code a little. There was a scope missing for private repos, additional scope has been added: https://github.com/StephenOTT/GitHub-Analytics/blob/master/app/app.rb#L11

It now works. Login/Authenticate, Run the download. When you select "Analyze" look in the URL. You will get a sinatra error at first. Just change the URL structure. In the URL is says "StephenOTT/Test1". Change that to your private repo. This will be resolved shortly. Code is already written, just not turned on for this app. When its turned on it will let you See all Repos your have downloaded, and then access each repo. If you want to see this in action download and load the GitHub-Time-Tracking App.

The Analyze is not working yet. Just got the find missing dates code working. Will implemented later today.

vasisht commented 10 years ago

Great. It works with the private repo now. Thanks.

StephenOTT commented 10 years ago

@vasisht see below for some updates. will be uploaded shortly.

screen shot 2014-04-18 at 6 35 58 pm

screen shot 2014-04-18 at 6 35 51 pm

StephenOTT commented 10 years ago

dates still need some cleanup/sorting on the tables. still working on a more elegant solution. Old code was fairly messy.

Missing Dates has been implemented. Will have to add correlation between Open and Closed for "last Date. Likely should be a Column Chart format. But still dealing with Timeline Axis formatting issues when using Chartkick and Column charts with time data. Will likely move to another library.

StephenOTT commented 10 years ago

Repo listings page is just a temp holder when a better idea of the various analysis that will be conducted. Will just keep adding analysis options there until more elegant solution becomes apparent for the needed data.

StephenOTT commented 10 years ago

Okay changes have been uploaded.

There were also some changes to the download process as not all issues and comments were downloading for large repos.

Note that there is no Catching at the moment for going over your GH API limit. So watch for this when you are deal with repos with lots of issues and comments.

The app still needs to cleanup. but the start of it is there.

vasisht commented 10 years ago

It looks great. I will see if I can think of any analyses I can add in. Thanks again for all the help.

StephenOTT commented 10 years ago

Sorting has been added to the Per Month breakdown and updated chart to stacked column.

screen shot 2014-04-19 at 2 06 35 am

vasisht commented 10 years ago

The stacked column for open/closed is a better option. It's easier to visualize the trend.

StephenOTT commented 10 years ago

Also added Week analysis

screen shot 2014-04-20 at 4 08 23 pm

StephenOTT commented 10 years ago

@vasisht Note that there is a bug with the Week Analysis. This bug is being caused by what looks like a bug in Ruby: https://bugs.ruby-lang.org/issues/9764

Ruby seems to be having issues parsing Week Numbers that are based on a 0-53 week rather than 1-52 week numbers (iso8601). Waiting to see what they say on the bug report.

In the mean time i have also add Label Assignments breakdown:

screen shot 2014-04-21 at 3 13 24 am

I am going to disable Weekly breakdown for now as it will crash the app whenever a week is loaded that is week 53 or week 00.

StephenOTT commented 10 years ago

@vasisht Repo Issue Events has been added. First pass on timeline breakdown is by Month.

screen shot 2014-04-21 at 5 50 10 am

StephenOTT commented 10 years ago

@vasisht Weekly breakdown of Open/Close has been resolved.

vasisht commented 10 years ago

@StephenOTT There still seems to be an issue with how the day of the week is being calculated for the converted_date in get_issues_closed_per_week. One of the entries was 2013-52-3, which is not a valid date string.

StephenOTT commented 10 years ago

can you provide a screenshot? just need to see the issue in context

StephenOTT commented 10 years ago

I see the problem. I thought i had a proper workaround for the Week Number issue, but it caused another issue.

Will have to go back and take another look.

The framework is all there, it is just the sums by week numbers

vasisht commented 10 years ago

1 2

I printed out the date strings to debug.

StephenOTT commented 10 years ago

@vasisht go ahead and try again (see latest commits). I came up with a solution for the week issue. Increased the processing time a little bit, and can use a little code refactor once we are sure it is working.

But download some data and test it out to see how well it works and "figures crossed" that it produces the correct results. I tested on a few repos and it appears to be functioning correctly. But give it a shot and let me know.

vasisht commented 10 years ago

It works now. I can see breakdown of issues both by month and by week.

StephenOTT commented 10 years ago

Great. Will close this issue for now.

Events will be working in the coming days. Code is already there. Just need a few updates with the latest Weeks Code

vasisht commented 10 years ago

Cool! It's pretty useful as is. The labels view can get very messy with higher number of labels (> 20).

StephenOTT commented 10 years ago

ya that problem, will be resolved as part of #10 - both time and filtering based on selections like labels.

StephenOTT commented 10 years ago

Issue Queue Events has been updated and is working. The Table results needs a little work to make it more functional. But the purpose of the view is achieved.

When #10 is implemented all of the views will get filters so specific views into information can be achieved in a more "ad hoc reporting" manner