-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
fix(import_datasources): --sync flag works correctly #18046
fix(import_datasources): --sync flag works correctly #18046
Conversation
…s cli command. Also added unit tests for all of the edge cases (with both metrics & columns, with just columns, and with just metrics)
…Removing it might cause headaches for someone trying to work on this particular piece of code in the future
@geido Are you able to approve running workflows for me as I am a first-time contributor? |
Sure thing |
…ts since the merge
…ts since the merge
…om:CybercentreCanada/superset into fix/superset-cli-import-datasources-s-flag Updated the cli_tests.py file as the merge that was completed changed the format of the unit test. I needed to update my unit tests to the new format
Codecov Report
@@ Coverage Diff @@
## master #18046 +/- ##
=======================================
Coverage 65.94% 65.95%
=======================================
Files 1584 1584
Lines 62055 62055
Branches 6273 6273
=======================================
+ Hits 40925 40926 +1
+ Misses 19509 19508 -1
Partials 1621 1621
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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 fixing this, @cccs-Dustin!
* Added code that properly accepts the -s flag on the import-datasources cli command. Also added unit tests for all of the edge cases (with both metrics & columns, with just columns, and with just metrics) * Files were reformated using the 'pre-commit run --all-files' command * added '*args: Any' back into v0.py as it did not need to be removed. Removing it might cause headaches for someone trying to work on this particular piece of code in the future * Fixed the merge conflict as the cli.py was moved to another directory * Modified my created unit tests to work with the new format of uni tests since the merge * Modified my created unit tests to work with the new format of uni tests since the merge * Fixed errors which were encountered while using the unit tests
* Added code that properly accepts the -s flag on the import-datasources cli command. Also added unit tests for all of the edge cases (with both metrics & columns, with just columns, and with just metrics) * Files were reformated using the 'pre-commit run --all-files' command * added '*args: Any' back into v0.py as it did not need to be removed. Removing it might cause headaches for someone trying to work on this particular piece of code in the future * Fixed the merge conflict as the cli.py was moved to another directory * Modified my created unit tests to work with the new format of uni tests since the merge * Modified my created unit tests to work with the new format of uni tests since the merge * Fixed errors which were encountered while using the unit tests
* Added code that properly accepts the -s flag on the import-datasources cli command. Also added unit tests for all of the edge cases (with both metrics & columns, with just columns, and with just metrics) * Files were reformated using the 'pre-commit run --all-files' command * added '*args: Any' back into v0.py as it did not need to be removed. Removing it might cause headaches for someone trying to work on this particular piece of code in the future * Fixed the merge conflict as the cli.py was moved to another directory * Modified my created unit tests to work with the new format of uni tests since the merge * Modified my created unit tests to work with the new format of uni tests since the merge * Fixed errors which were encountered while using the unit tests
SUMMARY
/superset/superset/cli.py
, as the previous code was not properly assigning a boolean value to sync_columns and sync_metrics.superset/tests/integration_tests/cli_tests.py
for 3 new unit tests to make sure the --sync flag is working correctly.By modifying the code in
/superset/superset/cli.py
, the Superset import_datasources cli now correctly functions with the --sync flag.TESTING INSTRUCTIONS
superset import-datasources -p ~/datasets/data.yaml
superset import-datasources -s "metrics,columns" -p ~/datasets/data.yaml
ADDITIONAL INFORMATION