best-practice-and-impact / gptables

Good Practice Tables - an XlsxWriter wrapper to write consistently formatted statistical tables to Excel.
http://gptables.rtfd.io
Other
37 stars 4 forks source link

Validate formatting attributes #48

Closed foster999 closed 4 years ago

foster999 commented 4 years ago

Users can enter formatting arguments that are not implemented in xlsxreader. These raise an error once passed to a xlsxwriter Format object init e.g.: 'Format' object has no attribute 'set_potatoe'

It would be preferable to catch these when a Theme is initialised. We should get all Format methods starting with "set_" and use this list to validate. This would support all formats in the users xlsxwriter version.

Validate formats in:

foster999 commented 4 years ago

Added method to Theme. Could move this to util type function, for use across Theme and GPTable that take formatting data

foster999 commented 4 years ago

Additional formatting implemented in #63, but not validated

foster999 commented 4 years ago

Validation of GPTable additional formatting and Theme format setting implemented in #64