feat: contributor metric#3213
Conversation
3bd762a to
1152b99
Compare
|
Hello @officialasishkumar, thanks for this contribution (and apologies for the delay in getting around to this). We've made some fairly substantial changes to the repo (notably using |
|
Sure @MoralCode Will do by the EOD |
|
@officialasishkumar Rebasing would probably be a better way to update this PR so that the diffs are easier to review because they only contain the changes you made, rather than also containing code from other peoples unrelated PRs that already exist on the main branch. Are you familiar with the process of rebasing in git? Happy to provide guidance if you would like |
21974f8 to
64cd2f4
Compare
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
Signed-off-by: Akshat Baranwal <kysuakshat23@gmail.com>
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
Signed-off-by: Akshat Baranwal <kysuakshat23@gmail.com>
4f525e2 to
91a2bf8
Compare
|
Hey @MoralCode |
|
FYI -- @MoralCode is out of office until early next week. |
| repo = relationship("Repo") No newline at end of file | ||
| repo = relationship("Repo") | ||
|
|
||
| class ContributorEngagement(Base): |
There was a problem hiding this comment.
@officialasishkumar : New database objects should be in a file in {repo root}/augur/application/schema/alembic/versions
I think with the PR open for the other GSOC team the next number in sequence is 35.
That enables alembic upgrades and downgrade.
Co-authored-by: Akshat <kysuakshat23@gmail.com> Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
1304b9a to
299bd90
Compare
sgoggins
left a comment
There was a problem hiding this comment.
Waiting for confirmation from @Ulincsys and @ABrain7710 ... but I think we don't modify the maindatabase creation script, and we do modify the version script ... so a person creating a new install gets all the old tables and your new ones last.
| repo = relationship("Repo") | ||
|
|
||
| class ContributorEngagement(Base): | ||
| __tablename__ = "contributor_engagement" |
There was a problem hiding this comment.
@ABrain7710 / @Ulincsys : Can you confirm that its our practice not to modify the main script for table creation, but to have the versioning script also included so that new installs just get "all the upgrades"?
There was a problem hiding this comment.
The way i've done it in the past for other projects is that both the main schema gets modified AND migrations get created. Then if someone creates a new database, they get the latest schema (this has required a small bit of code when augur detects a new DB and creates the tables to stamp it with the current alembic version). Then that database can be upgraded as time goes on, but new dbs are always starting out on the latest version
Resolve conflict in augur/application/db/models/augur_data.py by keeping both the ContributorEngagement model (from this branch) and the TopicModelMeta/TopicModelEvent models (from upstream).
Upstream main now has alembic versions 35-38 (topic_model_meta, topic_model_event, sync migrations, historical_repo_urls). Renumber the contributor_engagement migration from 35 to 39 so it chains correctly after the latest upstream migration (38).
Description
This PR introduces contributor metric feature, that records and stores the contributors information that are in different level to the database using a background process with the help of celery.
The final table includes:
Indexes are on repo_id, cntrb_id, username, and platform.
This PR fixes #2992
Notes for Reviewers
Signed commits