Skip to content
This repository has been archived by the owner on Jan 23, 2025. It is now read-only.

Private user ratings #40

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open

Conversation

RishiRajSahu
Copy link
Contributor

Before running the code, create the new tables in the db

CREATE TABLE group_project_result (
    user_id DECIMAL(10,0),
    project_id DECIMAL(10,0),
    group_id DECIMAL(10,0),
    old_rating DECIMAL(5,0),
    new_rating DECIMAL(5,0),
    rating_ind DECIMAL(1,0),
    create_date DATETIME YEAR TO FRACTION(3) DEFAULT CURRENT,
    modify_date DATETIME YEAR TO FRACTION(3) DEFAULT CURRENT,
    rating_order INTEGER,
    PRIMARY KEY (user_id, project_id, group_id) 
    CONSTRAINT group_project_result_pkey);


CREATE TABLE group_user_rating (
    user_id DECIMAL(10,0) NOT NULL, 
    group_id DECIMAL(10,0) NOT NULL,
    rating DECIMAL(10,5) DEFAULT 0 NOT NULL, 
    phase_id DECIMAL(3,0) NOT NULL, 
    vol DECIMAL(10,5) DEFAULT 0 NOT NULL, 
    rating_no_vol DECIMAL(10,5) DEFAULT 0 NOT NULL, 
    num_ratings DECIMAL(5,0) DEFAULT 0 NOT NULL, 
    mod_date_time DATETIME YEAR TO FRACTION(3) DEFAULT CURRENT, 
    create_date_time DATETIME YEAR TO FRACTION(3) DEFAULT CURRENT, 
    last_rated_project_id DECIMAL(12,0), 
    PRIMARY KEY (user_id, phase_id, group_id) 
    CONSTRAINT pk_group_user_rating);

fyi @gondzo

@RishiRajSahu
Copy link
Contributor Author

@gondzo overall code looks good to me. Its good that we just override the function with additional group params and didn't altered any logic wrt rating calculation.

I have yet to run the code on local machine and test data load, depending upon the time taken we will proceed for batching support.

Other two points to consider after local run are -

  1. Inital date to be considered for group projects need not be from 2009 as this feature is new may be just 2017 should work.
  2. Java 5 version on prod might be an issue so we might have to fallback on reading from file only, but will update you regarding that after confirming.

</Property>
<Property name="HistoryLength">
<Value>50</Value>
<Value>300</Value>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gondzo what does history length mean here ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

number of recent projects that affect member rating

</Property>
<Property name="PhaseIds">
Copy link
Contributor Author

@RishiRajSahu RishiRajSahu Jun 3, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gondzo these new properties PhaseIds and Cutoffs are they for your testing only ? as we cutoff dates hardcoded inside the code also.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, I just copied this entire config file from scripts/dde/RatingQubits.xml (the one in conf directory was outdated)

@gondzo
Copy link
Collaborator

gondzo commented Jun 3, 2020

  1. date cutoff shouldn't be an issue as there is no data before 2017 for groups so nothing will be returned by the queries anyway
  2. let me know if we need to do anything about ssl support for java 5

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants