jazzband / tablib

Python Module for Tabular Datasets in XLS, CSV, JSON, YAML, &c.
https://tablib.readthedocs.io/
MIT License
4.59k stars 590 forks source link

feat: ods: add style to datetime, date and time values #594

Closed pascalfree closed 1 month ago

pascalfree commented 2 months ago

This solves #210 but for the ods format.

Let me know if you agree with this approach in general. I will then apply the same for datetime and time types.

Code is inspired by https://stackoverflow.com/a/28577394 I tested it with LibreOffice 7.3 so far.

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 92.68%. Comparing base (9c82f70) to head (8189db6). Report is 2 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #594 +/- ## ========================================== + Coverage 92.66% 92.68% +0.01% ========================================== Files 28 28 Lines 2958 2966 +8 ========================================== + Hits 2741 2749 +8 Misses 217 217 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

claudep commented 2 months ago

Would you be able to add some test for that change?

I find the commit message a bit misleading, as this is fixing ods export functionality, not ods reading.

pascalfree commented 2 months ago

I changed the title and added tests.

The tests currently fail, because the datetime export has a bug that was previously covered by the import: #595

claudep commented 2 months ago

Please rebase after merge of #595