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
Fixes #790: API now generates badges #791
Conversation
@harshit98 @djmgit @ParthS007 @yashLadha |
Hi @gabru-md! It looks like one or more of your builds have failed.
|
Hi @gabru-md! It looks like one or more of your builds have failed.
|
Hi @gabru-md! It looks like one or more of your builds have failed.
|
Hi @gabru-md! It looks like one or more of your builds have failed.
|
Hi @gabru-md! It looks like one or more of your builds have failed.
|
Codecov Report
@@ Coverage Diff @@
## development #791 +/- ##
==========================================
Coverage 100% 100%
==========================================
Files 1 1
Lines 43 43
==========================================
Hits 43 43 Continue to review full report at Codecov.
|
from api.utils.response import Response | ||
from api.utils.svg_to_png import SVG2PNG | ||
from api.utils.merge_badges import MergeBadges | ||
|
||
|
||
router = Blueprint('generateBadges', __name__) | ||
|
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.
please remove this extra line
Hi @gabru-md! It looks like one or more of your builds have failed.
|
@djmgit the change you have suggested is failing the build. So I am reverting it. |
'Could not find any JSON')) | ||
|
||
csv_name = data['csv'] | ||
image_name = data['image'] |
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.
use data.get() format to avoid exception
str(e), | ||
'Could not find any JSON')) | ||
|
||
csv_name = data['csv'] |
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.
please check for the availability of minimum required parameters and raise required error responses
@@ -4,8 +4,8 @@ | |||
class File(db.Model): | |||
__tablename__ = 'File' | |||
|
|||
filename = db.Column(db.String(100), NULLABLE=False) | |||
filetype = db.Coloumn(db.string(100), NULLABLE=False) | |||
filename = db.Column(db.String(100), nullable=False, primary_key=True) |
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.
How can you set filename as primary key? How are you making sure that it will be unique?
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.
uuid.uuid4
and uuid.uuid1
provide unique names always.
I already had it discussed with @yashLadha and @ParthS007 since they raised the same doubt
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.
okay
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.
and we are using uuid.uuid4
for generating the names. therefore it will always be unique.
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.
Please see comments inline
@djmgit please review again. I've made the changes. |
This PR has added generating badges functionality implemented from scratch. Cheers! removed my config Fixes Travis fix modifies .gitignore foe firebase Adds fix for travis Fixes Coadcy Errors Removes Extra Line revert Made Changes
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.
@gabru-md what about the manually entered data? I mean when no csv is there, people can enter data manually right? What about that. We also need a parameter for that.
@djmgit for the manual data we will first save it into a CSV and then apply the same method for generation of badges. I am creating an issue for the same and will send a PR by the end of the day. In this way, the current proposed badge making functionality will remain isolated from the fact that the input was manual or csv. As we can see in the previous version it caused a lot of Please merge this @djmgit |
Fixes #790
Checklist
development
branch.Preview Link
Changes proposed in this pull request:
Thank You!