DiamondLightSource / dls-python3-skeleton

Archived in favour of https://github.com/DiamondLightSource/python-copier-template
Apache License 2.0
1 stars 0 forks source link

Apostrophes in author & author email result in broken setup.cfg #22

Closed garryod closed 2 years ago

garryod commented 2 years ago

When Firstname Lastname and email@address.com are substituted with an author name or email which includes an apostrophe a broken setup.cfg is produced in which erroneous strings exist

coretl commented 2 years ago

Maybe we should be using ConfigParser.write to set those fields rather than a dumb search and replace? They're only set in setup.cfg, so there's only one place to look

garryod commented 2 years ago

Having investigated the usage of ConfigParser for editing of .cfg & .ini files and escaping of strings during substitution updating of the template appears to be the best option despite causing downstream merge conflicts.

Use of ConfigParser or escaping of strings would both require a substantial increase in code complexity in order to maintain the current contract with template writers