-
Notifications
You must be signed in to change notification settings - Fork 88
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
Improve table & columns description formatting (#98) #79
Improve table & columns description formatting (#98) #79
Conversation
Seems pretty safe. In the mean time, could you also fix the CLA check? Normally it is due to you didn't configure your github handle(username, email) in your local box. |
metadata_service/api/column.py
Outdated
""" | ||
try: | ||
description = self.parser.parse_args()['description'] |
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.
@verdan , I assume it won't affect the atlas backend?
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.
It shouldn't. go ahead!!
the backend code looks fine. So once we are agree with the FE part, we are good to go with this pr. And please increase the version as well. |
db42b03
to
4e869b7
Compare
Codecov Report
@@ Coverage Diff @@
## master #79 +/- ##
==========================================
+ Coverage 74.8% 74.85% +0.04%
==========================================
Files 19 19
Lines 1008 1010 +2
Branches 88 88
==========================================
+ Hits 754 756 +2
Misses 231 231
Partials 23 23
Continue to review full report at Codecov.
|
Please note that I've got rid of reqparse because of this (also faced issues while writing unit tests): |
""" | ||
try: | ||
description = json.loads(request.json).get('description') |
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.
What do you all think about having a check for what happens if the description is None
? Does self.client.put_column_description
end up handling this (in that case no need for a check here), or will the description be deleted?
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.
I've checked it locally (via Postman):
- {"description": ""} - this request payload will truncate description
- request payload with no "description" tag ends with {"msg": "Encountered exception: None"} and description data stay untouched
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.
Thanks for confirming the behavior for empty string and None
. They behave as we expect, so no changes would be needed.
Summary of Changes
Introduced support of Markdown descriptions for tables & columns.
This module changes are intended to pass description text as a request body (instead of using URI parameter).
Related changes at amundsenfrontendlibrary.
Tests
Unit tests for table and column description upsertion have been modified
Documentation
Markdown description format demo:
https://rexxars.github.io/react-markdown/