Giter VIP home page Giter VIP logo

octomaps's People

Contributors

aviflombaum avatar dblock avatar johnkferguson avatar meowist avatar mrikhter avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

octomaps's Issues

Github Authentication Exposed in Repository

Currently, our authentication for Github is exposed in our repository. This creates a problem for a a few potential reasons:

  1. Someone could use our credentials to login to our github account and change our password.
  2. If someone forks the repository and starts testing it locally on their own machine, their github api queries will count against our 5k per hour limit.

So, I think we should set up a separate file (authentication.rb) to house each of our unique login information. Then when when we test locally, our queries won't count against our github api queries for our deployed heroku app.

This authentication.rb file should be included in our .gitignore file so as to not be uploaded to github.

At the same time, we should set up a separate authentication.rb file on our heroku server to handle authentication for our webapp.

Background Processing for Search Query

Currently, our app crashes on big queries. If someone were to try look up all contributors for a repository like linux, our octomaps will crash (Application Error). I talked to Avi and he said the best way to go about fixing this is the following:

  1. A person searches for 'rails/rails' for the first time.
  2. Octomaps checks its Repositories table (a new postgres table we have to build) to see if there is an instance of rails in it already.
    If rails is already in the database, it moves to the map page and displays the map
    Elsif rails is not in the database, it inserts it into the database with the following properties (name, owner, status, created_at, updated_at). When doing so, it enters its status as new.
    Then if the status is new, it goes to an intermediary page that says something like, "Loading results for rails" While at this page, a background process completes the search. When finished, it moves to the map page and displays results.

Then we can set up heroku to automatically complete these processes in the background.

We will also need a rakefile to help with all this. I'll have to do research on all this.

Avi posted some of the notes from our discussion about this. Here they are:

(https://gist.github.com/8bf2cf97249aa5bdb4ac)
(https://gist.github.com/976bf05837c53048d25b)

This is probably a bit confusing. What I'm going to do is try and set up a Repos table and have it save when a new repo is entered. The logic should be similar to that used with contributors. That's the first step. After that, we can try more advanced stuff.

@aviflombaum @mrikhter @meowist

Gemfile not working properly

Not able to bundle gemfile. Command line looks like below:

$ bundle
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Could not find gem 'google_chart (>= 0) ruby' in the gems available on this machine.

Having issues with following gems:
'net/http'
'uri'
'google_chart'

Can't Push to Update Heroku

Justin set up a heroku app for octomaps. Masha and I have all been added as collaborators. We have made changes to our local branch and pushed them to master. Now we want to take those changes and push them to heroku.

We have typed in git push heroku master and gotten the following error:

 [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to '[email protected]:octomaps.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Merge the remote changes (e.g. 'git pull')
hint: before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

So we need to figure out how to be able to push to heroku.

@aviflombaum @meowist @mrikhter

Add contributor badges

I want to be able to include a little PNG badge in my project that consists of a few parts:

  • the number of contributors on the right, eg. octomaps has 4 contributors
  • a combination of N (eg. 3) flags for the countries of top contributors

This would be cool because the first time someone open-sources a project, their country and flag will be on the project page automagically.

I'll probably contribute this eventually, but if someone wants free programming advice, I'm happy to host you in my office for a day and pair for parts of it.

Delay and Sleep Functionality Removed

I've removed the delay and sleep functionality from our github api requests, because of the following info from github's api:

"We limit requests to 60 per hour for unauthenticated requests. For requests using Basic Authentication or OAuth, we limit requests to 5,000 per hour."

We don't have to try and throttle our requests as it's a per hour limit. Adding a second between each request will not affect this.

In addition, I have also added oauth2 authentication to the app which will make all our requests authenticated.

@mrikhter @meowist

Search from Maps Page finds results but then kicks back to the No Results Page

Searching on the maps page for a new repository that is not in the database will cause octomaps to go to the not found page.

This happens after all of the github api information has been gathered and put in the database. As soon as this is done, the app sends the user to the not found page. If the user enters in the search query again on the not found page, it will correctly return the user to the actual map with the appropriate data.

This is likely a problem with our sinatra routing.

Dev / Stage / Prod server config

Our current config--deploying straight to prod!--is not a best practice. If we continue to work on this app, we should set up subdomains like

dev.octomaps.com: for all development in progress
stage.octomaps.com: for use in reviewing deployed changes pre-prod release
prod (www): for releasing final changes to the public

Def not necessary for Thursday, but wanted to log this issue.

Improve Readme and Documentation

Readme and documentation is a bit behind our current project. We should update them to reflect the current state of the project.

Properly configure an API key/token to use with Octokit

I've set up a Repo class in the repoclass.rb file to interact with repos, users and their locations.

When I tried to test it, I got the following error:

Octokit::Forbidden: GET https://api.github.com/repos/johnkellyferguson/githubmaps/contributors?anon=false: 403: API Rate Limit Exceeded for 108.46.110.191

We need to configure an API key & token to use with our project so we can be testing. I was able to get the api token to work with the github-api gem, but am a little confused about what to do now that we are using the octokit gem.

I already have an API token btw, just don't know how to use it properly. I will be looking through the octokit documentation.

@aviflombaum

Move repo to an organization?

I don't think it's fair to have the repo listed under my name. Perhaps we should move it to be under the Flatiron School organization or under some sort of new organization. Thoughts?

@meowist @mrikhter

heroku repo vs our github repo

I've just deployed a skeleton sinatra app to heroku (woohoo!)

http://octomaps.herokuapp.com/

one snag I can't yet figure out is that by deploying this app on heroku, heroku sets the git remote as heroku-specific:

[email protected]:octomaps.git

I'd like to move this into a branch on our main project repo instead but not sure how to do that without severing the app from Heroku. Can one codebase have two remotes? Seems like that's a recipe for trouble. I think I'll figure this out, just wanted to log this issue here.

Postgres Database limited to 1000

I ran a location lookup on rails/rails and the whole thing went smoothly, we weren't denied by github or anything and I didn't include any delays or sleep.

However, the postgres db only goes up to 1000 rows for some reason, so we will have to fix that.

@mrikhter @meowist

org wide mapping

would be neat if we could map all contributors of the whole organization, not only one repo

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.