-
-
Notifications
You must be signed in to change notification settings - Fork 775
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
[WIP] Grants #2393
[WIP] Grants #2393
Conversation
docker-compose.yml
Outdated
pgweb: | ||
image: sosedoff/pgweb | ||
environment: | ||
- DATABASE_URL=postgres://postgres:postgres@db:5432?sslmode=disable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[error] wrong indentation: expected 6 but found 8 (indentation)
docker-compose.yml
Outdated
environment: | ||
- DATABASE_URL=postgres://postgres:postgres@db:5432?sslmode=disable | ||
links: | ||
- db |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[error] wrong indentation: expected 6 but found 8 (indentation)
docker-compose.yml
Outdated
links: | ||
- db | ||
ports: | ||
- "8081:8081" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[error] wrong indentation: expected 6 but found 8 (indentation)
Codecov Report
@@ Coverage Diff @@
## master #2393 +/- ##
=========================================
+ Coverage 29.98% 30.5% +0.51%
=========================================
Files 171 181 +10
Lines 13430 13908 +478
Branches 1790 1815 +25
=========================================
+ Hits 4027 4242 +215
- Misses 9270 9533 +263
Partials 133 133
Continue to review full report at Codecov.
|
/* eslint-disable no-console */ | ||
|
||
$(document).ready(function() { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More than 2 blank lines not allowed. (no-multiple-empty-lines)
app/assets/v2/js/grants/new.js
Outdated
$(this).removeClass('is-dragging'); | ||
}); | ||
|
||
$("#img-project").on('change', function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strings must use singlequote. (quotes)
app/assets/v2/js/grants/new.js
Outdated
|
||
$("#img-project").on('change', function() { | ||
if (this.files && this.files[0]) { | ||
var reader = new FileReader(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected blank line after variable declarations. (newline-after-var)
app/assets/v2/js/grants/new.js
Outdated
$('#js-drop span').hide(); | ||
$('#js-drop input').css('visible', 'invisible'); | ||
$('#js-drop').css('padding', 0); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing spaces not allowed. (no-trailing-spaces)
Missing semicolon. (semi)
$('#js-newGrant').validate({ | ||
submitHandler: function(form) { | ||
|
||
var data = {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected blank line after variable declarations. (newline-after-var)
|
||
waitforWeb3(function() { | ||
tokens(document.web3network).forEach(function(ele) { | ||
let option = document.createElement('option'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected blank line after variable declarations. (newline-after-var)
"""Return the string representation of a Grant.""" | ||
return f"id: {self.pk}, status: {self.status}, title: {self.title}, description: {self.description}" | ||
|
||
class Subscription(SuperModel): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E302 expected 2 blank lines, found 1
app/assets/ens/index.js
Outdated
from | ||
}, function(err, result) { | ||
if (err) | ||
return console.error(err); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected console statement. (no-console)
app/assets/ens/index.js
Outdated
if (err) | ||
return console.error(err); | ||
if (result.error) | ||
return console.error(result.error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected console statement. (no-console)
.travis.yml
Outdated
@@ -41,6 +30,15 @@ jobs: | |||
- cp app/app/travis.env app/app/.env | |||
- pip install pip setuptools --upgrade | |||
- pip install codecov | |||
# Fetch and Install GeoIP database files. | |||
- sudo apt-get update && sudo apt-get install -y libmaxminddb-dev | |||
- wget http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[error] line too long (87 > 80 characters) (line-length)
.travis.yml
Outdated
# Fetch and Install GeoIP database files. | ||
- sudo apt-get update && sudo apt-get install -y libmaxminddb-dev | ||
- wget http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz | ||
- wget http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.mmdb.gz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[error] line too long (90 > 80 characters) (line-length)
.travis.yml
Outdated
local-dir: _build/site | ||
fqdn: docs.gitcoin.co | ||
target-branch: gh-pages | ||
on: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[warning] truthy value should be true or false (truthy)
app/dashboard/tip_views.py
Outdated
@@ -117,7 +118,7 @@ def receive_tip_v3(request, key, txid, network): | |||
these_tips = Tip.objects.filter(web3_type='v3', txid=txid, network=network) | |||
tips = these_tips.filter(metadata__reference_hash_for_receipient=key) | these_tips.filter(metadata__reference_hash_for_funder=key) | |||
tip = tips.first() | |||
is_authed = request.user.username == tip.username or request.user.username == tip.from_username | |||
is_authed = request.user.username.lower() == tip.username.lower() or request.user.username.lower() == tip.from_username.lower() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E501 line too long (131 > 120 characters)
@@ -128,7 +129,7 @@ def receive_tip_v3(request, key, txid, network): | |||
elif tip.receive_txid: | |||
messages.info(request, 'This tip has been received') | |||
elif not is_authed: | |||
messages.error(request, f'This tip is for {tip.username} but you are logged in as {request.user.username}. Please logout and log back in as {tip.username}.') | |||
messages.error(request, f'This tip is for @{tip.username} but you are logged in as @{request.user.username}. Please logout and log back in as {tip.username}.') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E501 line too long (168 > 120 characters)
app/marketing/admin.py
Outdated
@@ -106,6 +106,8 @@ def membership_length_in_days(self, instance): | |||
return 'Unknown' | |||
|
|||
|
|||
|
|||
admin.site.register(AccountDeletionRequest, GeneralAdmin) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E303 too many blank lines (3)
from marketing.mails import quarterly_stats | ||
from marketing.models import EmailSubscriber | ||
from marketing.models import EmailSubscriber, LeaderboardRank |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
F401 'marketing.models.EmailSubscriber' imported but unused
queryset = queryset.filter(email__startswith=filter_startswith) | ||
queryset = queryset.order_by('email') | ||
email_list = set(queryset.values_list('email', flat=True)) | ||
def handle(self, *args, **options): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E303 too many blank lines (2)
* web3.js 1.0.0 implented. now to rebuild web3 functionality. * implementing grant contract deployment in web3 1.0. contracts deploying, need to wire out db. * contract deployed on grant creation and data saved correctly db. * signatures receovering correctly. On plane, need internet to see if transactions submit to the chain. Next to implement approve, then cancel functionality. * working on subscriptions. signatures aubmitting twice for some reason... * appove functionality working. Ironing out tx submission by subminer. tx is currently reverting on submission. Almost there. * appove functionality working. Ironing out tx submission by subminer. tx is currently reverting on submission. Almost there. * successful transaction from miner with hard coded data. need to make dynamic and coordinate with Mark on miner migration. * successful transactions from miner with hardcoded data and successfully storing single record of subscription in db. * back to successful transaction from miner and correct storage after merge * run linters * added cancel functionality * made fund functionality dynamic. Still need to iron out why the approve function isn't setting limit. Probably a decimals thing. * address comments by mbeacom * a few more changes re: mbeacom * easy changes while writing view specific tickets * change subscription_cancel url, revert network max_length in models * removed show.html * added period_seconds to Subscription model * implement adding block_number data * implement block_number data * run migrations to resolve circleci sql issue * update package.json to master * update package-lock.json * removing and re-running migrations
…#2485) * Update grant models with help_text and require login on some grant views Signed-off-by: Mark Beacom <[email protected]> * Whoops - revert base return in gh_login
* Update new grant to save team members and full receipt from transaction - squash migrations * Whoops json import
Refactor landing page for grants
…conflicting dashboard migration files
grant/cancel-contribute revamp
Ks contract versioning
Description
The goal of this PR is to introduce the
grants
module into the Gitcoin core platform.Checklist
Affected core subsystem(s)
grants