petl-developers / petl

Python Extract Transform and Load Tables of Data
MIT License
1.22k stars 190 forks source link

Cast header to str in toxlsx #600

Closed arturponinski closed 2 years ago

arturponinski commented 2 years ago

This PR has the objective of allowing non-str headers to be passed to toxlsx. This will align behavior with other methods, ie. todb, toavro...

Closes https://github.com/petl-developers/petl/issues/530

Additionaly this PR introduces a refactor of test_xlsx.py to utilize pytest fixtures

Changes

  1. Added casting of header to str(text_type) in toxlsx and appendxlsx https://github.com/petl-developers/petl/pull/600/commits/c251bc5b7566a56a579c415f2b2a08be94767b77
  2. Refactored xlsx test suite in a separate commit https://github.com/petl-developers/petl/pull/600/commits/15f85adf9ffebe360ca29700d67572e8c84fd8f6

Checklist

Use this checklist for assuring the quality of pull requests that include new code and or make changes to existing code.

coveralls commented 2 years ago

Coverage Status

Coverage increased (+0.05%) to 91.813% when pulling e449b97ef6384de8f74067c0bfe80201d5fd6d7b on arturponinski:cast-header-to-str-in-toxlsx into a62aabcc3b20fe189a0875e405184533f1a72376 on petl-developers:master.

juarezr commented 2 years ago
arturponinski commented 2 years ago

@juarezr I believe it is, merged :tada: