jbkinney / logomaker

Software for the visualization of sequence-function relationships
MIT License
179 stars 34 forks source link

use warnings instead of print #18

Closed ruxi closed 3 years ago

ruxi commented 3 years ago

Use warnings instead of print so warning messages can be hidden from reports

atareen commented 3 years ago

If you read the logomaker source, you'll see that we've written LogomakerError to deal with errors along with the handle errors decorator. It would be inconsistent to introduce the warnings module only here and not everywhere else in the package. Thus, I can't accept this. It was this type of reasoning that made me not accept your previous PR also.

ruxi commented 3 years ago

@atareen: Thanks for elaborating on the reason.

Can you provide some guidance on the appropriate way to prepare the PR so that it conforms with the LogomakerError convention? The main motivation for making the change is that error message Warning: Character 'X' is not in color_dict. Using black is flooding the reports I'm generating.

Editing the source code of logomaker on local was able to fix it, but it's not a permanent solution. Do you have a suggestion