Skip to content
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

Bounty Payout Milestone 1-Review #5027

Merged
merged 41 commits into from
Oct 23, 2019
Merged

Conversation

androolloyd
Copy link
Contributor

@androolloyd androolloyd commented Aug 16, 2019

Description

New Model:

Organization
- name
- groups (Many to Many relationship to auth.Group)

Model Updates:

Profile
- orgs (Many to Many relationship to dashboard.Organization)

sync_profile updates:

- updated to account for change to orgs referenced above

New Management Command:

- app/management/sync_orgs_repo.py
- no arguments presently
- designed to be run as a long running cron job
Refers/Fixes

#4969

Testing

	Organization
	- name
	- groups (Many to Many relationship to auth.Group)
Model Updates:
	Profile
	- organizations (Many to Many relationship to dashboard.Organization)

sync_profile updates:
	- updated to account for change to organizations referenced above

New Management Command:
	- app/management/sync_orgs_repo.py
	- no arguments presently
	- designed to be run as a long running cron job
@androolloyd androolloyd changed the title Bounty Payout Milestone 1 Bounty Payout Milestone 1-DRAFT Aug 16, 2019
	- Reverted the change around profile.organizations due to its usage in user hover cards
	Profile Model
	- organizations restored
	- orgs key added for the sync work
@codecov
Copy link

codecov bot commented Aug 23, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@1cb0949). Click here to learn what that means.
The diff coverage is 14.63%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #5027   +/-   ##
=========================================
  Coverage          ?   17.96%           
=========================================
  Files             ?      207           
  Lines             ?    17473           
  Branches          ?     2399           
=========================================
  Hits              ?     3139           
  Misses            ?    14323           
  Partials          ?       11
Impacted Files Coverage Δ
app/app/utils.py 18.51% <0%> (ø)
app/app/management/commands/sync_orgs_repos.py 0% <0%> (ø)
app/app/settings.py 78.81% <100%> (ø)
app/dashboard/models.py 38.28% <48.38%> (ø)
app/git/utils.py 14.76% <9.52%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1cb0949...e5fc617. Read the comment docs.

@codecov
Copy link

codecov bot commented Aug 23, 2019

Codecov Report

Merging #5027 into master will decrease coverage by 0.16%.
The diff coverage is 10.58%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5027      +/-   ##
==========================================
- Coverage   29.72%   29.55%   -0.17%     
==========================================
  Files         236      237       +1     
  Lines       20005    20166     +161     
  Branches     2855     2882      +27     
==========================================
+ Hits         5946     5960      +14     
- Misses      13817    13961     +144     
- Partials      242      245       +3
Impacted Files Coverage Δ
app/app/utils.py 21.6% <0%> (-0.31%) ⬇️
app/app/management/commands/sync_orgs_repos.py 0% <0%> (ø)
app/app/settings.py 79.19% <100%> (ø) ⬆️
app/git/utils.py 40% <13.04%> (-1.5%) ⬇️
app/dashboard/models.py 50.46% <87.5%> (+0.22%) ⬆️
app/dashboard/views.py 12.96% <0%> (ø) ⬆️
...rketing/management/commands/no_applicants_email.py 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2a2cadc...a03df45. Read the comment docs.

@androolloyd androolloyd marked this pull request as ready for review August 24, 2019 00:20
@androolloyd androolloyd requested a review from danlipert as a code owner August 24, 2019 00:20
@androolloyd androolloyd changed the title Bounty Payout Milestone 1-DRAFT Bounty Payout Milestone 1-Review Aug 24, 2019
Copy link
Contributor

@danlipert danlipert left a comment

Choose a reason for hiding this comment

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

Looks good so far - just a few questions and some style guidelines to make our PRs easy to review 👍

app/app/management/commands/sync_orgs_repos.py Outdated Show resolved Hide resolved
app/app/management/commands/sync_orgs_repos.py Outdated Show resolved Hide resolved
app/app/management/commands/sync_orgs_repos.py Outdated Show resolved Hide resolved
@@ -121,41 +121,41 @@ def needs_review(self):
"""Filter results by bounties that need reviewed."""
Copy link
Contributor

Choose a reason for hiding this comment

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

In this file, can you just include the logic changes and ditch all the style changes? I'm guessing you have some kind of automated tool in your IDE or something like that, and while I appreciate the style fix up, different contributors have different style fixing preferences in their IDEs so we get a lot of PRs where style changes are just going back and forth which makes it hard to review.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Noted, will revert those changes, and just add the logic.

@danlipert danlipert force-pushed the feature/bounty-payout-4969 branch from 2f3a51b to 58105e6 Compare September 16, 2019 08:17
@androolloyd androolloyd force-pushed the feature/bounty-payout-4969 branch from 5323ae1 to 7f41c2a Compare September 16, 2019 12:49
Copy link
Contributor

@octavioamu octavioamu left a comment

Choose a reason for hiding this comment

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

Tested on my local but there is a problem with the token so is not taking private orgs, left a comment.

app/git/utils.py Outdated Show resolved Hide resolved
androolloyd and others added 5 commits October 1, 2019 11:16
	- additional exception handling and error messages to help debugging any issues with user profiles
	- private organizations should now correctly be capturable when they are granted access during login
	- adding a per_page limit of 100 to the calls as a stop gap to proper pagination handling
@octavioamu
Copy link
Contributor

def sync_profile(handle, user=None, hide_profile=True) is getting the profile hidden since is by default

@octavioamu octavioamu mentioned this pull request Oct 2, 2019
- added a missing comma as per the PR,
- created a merge migration from the most recent master.

Merge branch 'master' of github.com:gitcoinco/web into feature/bounty-payout-4969
@octavioamu
Copy link
Contributor

def sync_profile(handle, user=None, hide_profile=True) is getting the profile hidden since is by default

@androolloyd did you found a way to look around this?


if 'message' in org_repos:
print(org_repos['message'])
continue
Copy link
Member

Choose a reason for hiding this comment

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

^ remove the if block ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no, same as above, anytime we see a message key in the returning object, we want to log it and skip to the next element, the error's are vague but are only caused by a couple of things, permissions errors are the most prevelant

@octavioamu octavioamu merged commit b9c515f into master Oct 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants