chore(export): Added ability to export chart YAML files with Unicode characters, fix #20331
SUMMARY
Improve chart YAML export for multi-language users 🌐. Now every user can read and review their chart files in their native language.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
Set name of any charts/dashboard as below strings then export them:
- Chinese: 中文
- Japanese: にほんご
- Russian: Русский язык
ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in SIP-59)
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
Thanks @xyb for the change. Would you mind adding either a unit or integration test?
@john-bodley Certainly. I've previously dedicated some time to exploring the optimal location for writing unit tests, yet I was unable to identify an appropriate spot within the tests directory. Could you possibly offer some guidance on where the unit test code should be situated, and what would be the best approach to handling fixtures?
@john-bodley Certainly. I've previously dedicated some time to exploring the optimal location for writing unit tests, yet I was unable to identify an appropriate spot within the tests directory. Could you possibly offer some guidance on where the unit test code should be situated, and what would be the best approach to handling fixtures?
Take a look at: https://github.com/apache/superset/blob/master/tests/integration_tests/charts/commands_tests.py
@john-bodley @dpgaspar I've added some tests, but I'm not familiar with superset and its testing framework, I'd greatly appreciate it if someone could take a look at it and provide some guidance on how to improve it.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 83.50%. Comparing base (
76d897e) to head (14d94f4). Report is 158 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #28008 +/- ##
===========================================
+ Coverage 60.48% 83.50% +23.01%
===========================================
Files 1931 522 -1409
Lines 76236 37482 -38754
Branches 8568 0 -8568
===========================================
- Hits 46114 31298 -14816
+ Misses 28017 6184 -21833
+ Partials 2105 0 -2105
| Flag | Coverage Δ | |
|---|---|---|
| hive | 49.11% <0.00%> (-0.06%) |
:arrow_down: |
| javascript | ? |
|
| mysql | 77.18% <100.00%> (?) |
|
| postgres | 77.30% <100.00%> (?) |
|
| presto | 53.66% <0.00%> (-0.14%) |
:arrow_down: |
| python | 83.50% <100.00%> (+20.01%) |
:arrow_up: |
| sqlite | 76.79% <100.00%> (?) |
|
| unit | 58.96% <40.00%> (+1.33%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@john-bodley @dpgaspar Before merging, are there any remaining changes or tasks I should complete to ensure a smooth merge?
Thank you for adding the tests. We can merge this only if/when @dpgaspar re-reviews it :D
@dpgaspar gently ping
@villebro If there's anything I can do, please don't hesitate to let me know.
Looks like this is stuck (again) in need of a rebase. Assuming this is still needed, let's see if we can get it through :D
@rusackas rebased