-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Import getorg data #81
base: master
Are you sure you want to change the base?
Conversation
community/settings.py
Outdated
|
||
gh_key = 'Your_github_token' | ||
|
||
#https://developers.google.com/maps/documentation/javascript/get-api-key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code does not comply to PEP8.
Origin: PEP8Bear, Section: all.autopep8
.
The issue can be fixed by applying the following patch:
--- a/tmp/tmp_u3roec1/community/settings.py
+++ b/tmp/tmp_u3roec1/community/settings.py
@@ -126,5 +126,5 @@
gh_key = 'Your_github_token'
-#https://developers.google.com/maps/documentation/javascript/get-api-key
+# https://developers.google.com/maps/documentation/javascript/get-api-key
GEOPOSITION_GOOGLE_MAPS_API_KEY = 'YOUR_API_KEY'
community/settings.py
Outdated
|
||
gh_key = 'Your_github_token' | ||
|
||
#https://developers.google.com/maps/documentation/javascript/get-api-key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E265 block comment should start with '# '
Origin: PycodestyleBear (E265), Section: all.autopep8
.
community/settings.py
Outdated
|
||
gh_key = 'Your_github_token' | ||
|
||
#https://developers.google.com/maps/documentation/javascript/get-api-key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code does not comply to PEP8.
Origin: PEP8Bear, Section: all.autopep8
.
The issue can be fixed by applying the following patch:
--- a/tmp/tmpxjkkgmwn/community/settings.py
+++ b/tmp/tmpxjkkgmwn/community/settings.py
@@ -126,5 +126,5 @@
gh_key = 'Your_github_token'
-#https://developers.google.com/maps/documentation/javascript/get-api-key
+# https://developers.google.com/maps/documentation/javascript/get-api-key
GEOPOSITION_GOOGLE_MAPS_API_KEY = 'YOUR_API_KEY'
community/settings.py
Outdated
|
||
gh_key = 'Your_github_token' | ||
|
||
#https://developers.google.com/maps/documentation/javascript/get-api-key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E265 block comment should start with '# '
Origin: PycodestyleBear (E265), Section: all.autopep8
.
@jayvdb , A PR for storing participant geolocation to data model. :) |
This PR uses django-geoposition for storing geolocations and getorg for fetching geolocation of participants for a organisation. |
nice strategy. IMO we need a And then we need the geolocation data model to link to the data in the Worth considering, ... the OpenHub data model will also give us similar user information, so that will also need to be integrated, and we now have the 'coala.io API' user data. Eventually ... we need a single 'person' , with links to various datasets that we import about that person. |
Alright, I will try get some more data from their 👍 |
Sorry @sks444, you do not have the necessary permission levels to perform the action. |
Yeah, I was thinking of it too, we will work on that 👍 |
Sorry @sks444, you do not have the necessary permission levels to perform the action. |
Makes a GET request to the API. | ||
""" | ||
for key, value in org_location_dict.items(): | ||
self.import_data(key, value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line contains following spacing inconsistencies:
- Tabs used instead of spaces.
Origin: SpaceConsistencyBear, Section: all.whitespace
.
The issue can be fixed by applying the following patch:
--- a/tmp/tmpcu_8idl1/geolocation/management/commands/import_geolocation.py
+++ b/tmp/tmpcu_8idl1/geolocation/management/commands/import_geolocation.py
@@ -37,4 +37,4 @@
Makes a GET request to the API.
"""
for key, value in org_location_dict.items():
- self.import_data(key, value)
+ self.import_data(key, value)
geolocation/models.py
Outdated
position = GeopositionField() | ||
|
||
def __str__(self): | ||
return self.name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line contains following spacing inconsistencies:
- Tabs used instead of spaces.
Origin: SpaceConsistencyBear, Section: all.whitespace
.
The issue can be fixed by applying the following patch:
--- a/tmp/tmpcu_8idl1/geolocation/models.py
+++ b/tmp/tmpcu_8idl1/geolocation/models.py
@@ -6,4 +6,4 @@
position = GeopositionField()
def __str__(self):
- return self.name
+ return self.name
from github import Github | ||
import getorg | ||
|
||
# Get an API key (for just querying, give it no write permissions) at https://github.com/settings/tokens |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is longer than allowed. (104 > 80)
Origin: LineLengthBear, Section: all.linelength
.
c.save() | ||
print ("\nContributor, {}, has been saved.".format(c)) | ||
except Exception as ex: | ||
print ("\n\nSomething went wrong saving this contributor: {}\n{}".format(name, str(ex))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is longer than allowed. (100 > 80)
Origin: LineLengthBear, Section: all.linelength
.
geolocation/models.py
Outdated
from django.db import models | ||
from geoposition.fields import GeopositionField | ||
|
||
class Participant(models.Model): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E302 expected 2 blank lines, found 1
Origin: PycodestyleBear (E302), Section: all.python.models
.
geolocation/models.py
Outdated
position = GeopositionField() | ||
|
||
def __str__(self): | ||
return self.name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E101 indentation contains mixed spaces and tabs
Origin: PycodestyleBear (E101), Section: all.python.models
.
geolocation/models.py
Outdated
position = GeopositionField() | ||
|
||
def __str__(self): | ||
return self.name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
W191 indentation contains tabs
Origin: PycodestyleBear (W191), Section: all.python.models
.
Closes #18
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be done in webservices, where it can be more appropriately cached, and then data imported here.
Maybe this should be new repo , If you can create it, I can talk to the getorg ppls and ask them to transfer it to their org. |
Closes #18