Code Monkey home page Code Monkey logo

experts-app-backend's People

Contributors

erlichmen avatar littleq0903 avatar patt0 avatar scarygami avatar smokybob avatar

Stargazers

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

Watchers

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

experts-app-backend's Issues

update index.yaml to allow activity masters to be retrieved ordered by date

So that a request like this could work:

https://elite-firefly-737.appspot.com/_ah/api/expertstracking/v2.0/activityMaster/activityMaster?limit=100&email=expert%40gmail.com&order=-date

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.

Switch authentication to rely on Google(+) ID instead of Email

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.

Impact formula by Product Group and Category

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:

  • which activity types are relevant for a Product
  • scoring/weight/formula to get the Impact of each activity type for the overall "GDE Impact"

Consistence problem on delete activity posts

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 :

  1. In the Delete Activity Post endpoint we modify also the parent Activity Record to delete the Activity Post reference

  2. 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 
    
    
  3. 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...

Area of Expertise

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:

  • have a PGs dedicated to Activities, so the Product charts and reporting will be clear for everybody that is working on activities only independently of the Experts that made them
  • have AreaOfExpertise dedicated to the Experts, so we can have charts and reporting which is cross Product but most likely relative to a specific area

In the coming days, the Experts Masterlist will be updated with the Area of expertise instead of the Product Groups.

The proposal is to:

  • have a area of expertise type (like the PGs) mostly to have a configurable but set list of possible Area Of Expertise (fields: id, description)
  • rename product groups on the account object to Areas of Expertise

Not able to load records

I was adding a new normal record, then this happen:

Image:
image

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"
 }
}

The metrics of the different activity posts should be added, not averaged

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.

More social fields for the Account Entity

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.

Activity Group Update

The current Technology activity tags should fall under the following larger 4 categories:

Content: #blogpost,#video,#article,#tutorial,#forumpost,

techdocs,#book,#translation,#opensourcecode

Speaking: #techtalk

Testing: #bugreport

Pack Leader: #interview, #community

Update the PG AT AG Master List with the required changes

gdeProgram renamed to #expertsProgram

Expert Masterlist - Experts from all category

  • Remove the filter to consider only Technology Experts
  • Map "Descriptive" Expert category to the tag version and use it in the type column
  • Area of Expertise (PG) Validation should be against PGs filtered by the Expert's category
  • Email After daily job with recap by category (and no verbose list of what was unchanged)

Onboarding Experts from other area of expertise

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:

  1. Do they need a Google + ID or we want to support other Auth methods? <- Yes, needed for the Cloud endpoints
  2. New Activity Types (with associated tags) for each area of expertise and new Activity groups needs to be defined.
  3. Are there "Products" for other area of expertise?

Changes to the current data structure are needed to support the features listed above.

Do not use Account.type to identify deleted accounts from the program

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.

Email for New Activity with reply to update

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.

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.