-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
feat: import/export assets commands #19217
Conversation
df7b2e0
to
7d8946f
Compare
e97df46
to
625b774
Compare
7d8946f
to
aa9df9b
Compare
Codecov Report
@@ Coverage Diff @@
## master #19217 +/- ##
==========================================
+ Coverage 66.72% 66.75% +0.03%
==========================================
Files 1667 1669 +2
Lines 64222 64331 +109
Branches 6484 6484
==========================================
+ Hits 42849 42943 +94
- Misses 19692 19705 +13
- Partials 1681 1683 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
6b8956b
to
c532d79
Compare
# pylint: disable=unused-argument | ||
def __init__(self, contents: Dict[str, str], *args: Any, **kwargs: Any): | ||
self.contents = contents | ||
self.passwords: Dict[str, str] = kwargs.get("passwords") or {} |
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.
self.passwords: Dict[str, str] = kwargs.get("passwords") or {} | |
self.passwords: Dict[str, str] = kwargs.get("passwords", {}) |
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 the suggestion! There's a subtle difference here that I want to capture; if passwords
is passed as a keyword argument and is falsy (most likely None
) we want it to be a dict, which is why I did the pattern with or
instead of .get
.
* feat: import/export assets commands * Add overwrite test * Fix tests (cherry picked from commit 51061f0)
SUMMARY
This PR introduces two new commands (
ImportAssetsCommand
andExportAssetsCommand
). The commands will be used to export all assets from Superset into a ZIP file, as well as back into Superset, with the objective of managing the assets from source control.Depends on #19216.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A
TESTING INSTRUCTIONS
Added unit tests.
ADDITIONAL INFORMATION