googledeveloperexperts / experts-app-backend Goto Github PK
View Code? Open in Web Editor NEWFuture home for the backend source of the GDE Tracking App
License: Apache License 2.0
Future home for the backend source of the GDE Tracking App
License: Apache License 2.0
So that a request like this could work:
At the moment the frontend gets the activities in "random" order, which (lacking pagination, GoogleDeveloperExperts/experts-app-web#171) , means that newly generated activities might not be available (especially now that all the old activities have been merged).
And even with pagination it would be better to have the newest activities loaded first.
Once the index.yaml is updated the frontend should be updated to use the order parameter.
In the backend we only have access to the email address of the authenticated user and not the Google+ ID, so if the email address and the Google+ ID are not from the same account there will be a mismatch and requests will be rejected.
This is a known issue with a potential (slightly dirty) workaround here:
https://code.google.com/p/googleappengine/issues/detail?id=8848#c39
Using the workaround we could use the Google+ ID to check authentication instead of the email, which would prevent the issues that some people with multiple accounts and "wrong" data in the master table have.
its possible as in the case of David Gonzales that there are two, as one was associated with his other GPLUS ID with an email miss match.
From old repo and discussion in the GDE app hangouts.
Different Products values different kind of activities with different weights.
Needed survey with Products to understand:
from the old repo
Basically GDE level aggregated views.
Currently there is a nasty problem when we delete Activity Posts: we delete the Activity Posts, but we don't delete its reference in its parent Activity Record's activity_posts
field.
And then, when we request the said Activity Record, it tries to access to the Activity Post to calculate the metrics, and as the post doesn't exist anymore, we get an internal server error.
I see three possible solutions :
In the Delete Activity Post endpoint we modify also the parent Activity Record to delete the Activity Post reference
Not to use the said reference anymore, as we don't need it really...
Right now we calculate the metrics like this:
def metric_reached(self):
total_reached = 0
if len(self.activity_posts) == 0:
return total_reached
for post_id in self.activity_posts:
post_key = ndb.Key(ActivityPost, int(post_id))
activity_post = post_key.get()
total_reached += activity_post.metric_reached
return total_reached
We could instead directly query the Activity post to get those whose the parent is the current Activity Record:
def metric_reached(self):
total_reached = 0
for activity_post in ActivityPost.query(ActivityPost.id == self.id) :
total_reached += activity_post.metric_reached
return total_reached
Model Activity Posts as Structured Properties
If I understand correctly, every Activity Post is always associated to one and only one Activity Record, i.e. they are not full-fledged entities.
I'm not an expert on Google API Engine, but according to the reference
they seem a good candidate for be modelled as Structured Properties instead of Entities.
That would make some things way easier. If Activity Post were Structured Properties instead of Entities, the consistence problem would disappear by itself...
This happens, deal with it. It's less painful than doing it by hand ;)
One of the last change introduced in the Experts program was that the Area of Expertise, which is assigned to an Expert and in some case, it's not related to a single product (ex. Web Technologies).
The Area of expertise could be stored as Product group, but make sense to have this 2 entities separated, this way we can:
In the coming days, the Experts Masterlist will be updated with the Area of expertise instead of the Product Groups.
The proposal is to:
I was adding a new normal record, then this happen:
I wasn't able to load my records, and not sure if I can add new record in.
Please help.
cURL:
curl 'https://elite-firefly-737.appspot.com/_ah/api/expertstracking/v2.0/activityMaster/activityMaster?limit=100&email=trungdq88%40gmail.com' -H 'origin: https://expertstracking.appspot.com' -H 'accept-encoding: gzip, deflate, br' -H 'accept-language: en-US,en;q=0.8' -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36' -H 'accept: application/json' -H 'referer: https://expertstracking.appspot.com/' -H 'authority: elite-firefly-737.appspot.com' --compressed
Response:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "backendError",
"message": "Internal Server Error"
}
],
"code": 503,
"message": "Internal Server Error"
}
}
Each activity post mean an action that touches a different public (e.g. for an activioty record we can have a blogpost, a conference, and a youtube video, each with their metrics).
The total impact of the activity should be the sum of those activity post, not the average of them. More activity posts mean more people reached.
ActivityPost -> Activity Record
There are two sets of historic GDE activity tracking data, which need to be imported into the app.
GDE Activity Tracking V2 -- most recent, used until end of Q2
https://drive.google.com/open?id=0As4qk14rHviTdE9STy1Sa181clMzNnEyelNodlp6aXc&authuser=0
GDE Activity Tracking V1 -- last used in 2013
https://docs.google.com/a/google.com/spreadsheet/ccc?key=0As4qk14rHviTdHpxMnMtWmNEb253cjFjODA3OVlUbGc#gid=0
It looks like we need to add these three fields LinkedIn GitHub Personal Website in the specs document and backend perhaps under social_linkedin, social_github, social_website.
This will have implication on the app and we need to coordinate @justinribeiro so your data binding fails when you load read-only data.
From old repo
Create a sample plug-in and infos on how to add it to the backend
The current Technology activity tags should fall under the following larger 4 categories:
Content: #blogpost,#video,#article,#tutorial,#forumpost,
Speaking: #techtalk
Testing: #bugreport
Pack Leader: #interview, #community
Update the PG AT AG Master List with the required changes
As we restructure the backend, the need for '#' is not critical and rather distracting.
I have tried to sign in both with a normal window and an incognito window (with 0 extensions allowed in incognito mode) but it fails. Visually the modal to sign in with Google closes but the first screen is still here, nothing happens. I noticed that there are errors in the console as soon as I load the app.
Because people want to use/are using the #gde tag for non-activity-related posts check for the #gdetrack tag instead
This is more of a way to keep track of the TODO than a proper issue, more detailed Analysis/discussion can be done "privately" with Docs and more detailed issues and TODOs will be added to the repo in the future
Currently the app is tailored to fit the "tracking needs" of Technology Google Experts.
The need to track activities is for other area of expertise too so why reinvent the wheel? :)
Some points of discussion about tracking activities for other areas of expertise are the following:
Changes to the current data structure are needed to support the features listed above.
The account entity already supports a deleted flag that is already in use and set to true every time a member is removed from the program.
Deletion happens from Expert Master - Externally Safe using GAS change will be a single line comment.
@reicek please check in the current front end for references for Account.type = deleted and replace them with Account.deleted = True
About 32 accounts have been deleted and will have to have the data reinstated. The python app engine code will also need to be updated so as use the deleted flag instead of the type property.
The description field is a StringProperty that is automatically indexed and supports a max of 1500 bytes.
Let's handle that case.
See GoogleDeveloperExperts/experts-app-web#14
TODO:
Rename the API
Add new client ID 66416776373-3k5goi8hn9d5rih68t8km57iliithohb.apps.googleusercontent.com
Opt In Functionality for GDEs to get notified with an email for each new activity found by the app.
Replying to the email with a specific format (To Be Defined) update the activity metadatas.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.