raspberrypi / pico-project-generator

Tool to automatically generate a Pico C SDK Project
BSD 3-Clause "New" or "Revised" License
303 stars 74 forks source link

Use templating for generated files #39

Closed matiasilva closed 3 years ago

matiasilva commented 3 years ago

This PR adds templating for the various generated files, allowing us to separate logic from text formatting. It pulls out a considerable amount of strings and text into files. This makes the main code a lot cleaner and readable. It also means we can easily extend the project generator to do many more things if needed.

JamesH65 commented 3 years ago

That looks much better - nice one. The problem with this being my first Python program is you simply don't know what libraries exist to help you out!

matiasilva commented 3 years ago

There's quite a large diff in the main Python file, mostly owing to large blocks of text being removed but also due to applying autopep8 (https://www.python.org/dev/peps/pep-0008/).

JamesH65 commented 3 years ago

Might be worth applying autopep8 first on a new branch, to keep whitespace and technical changes separate - makes doing a review diff difficult if they are mixed together.

matiasilva commented 3 years ago

Might be worth applying autopep8 first on a new branch, to keep whitespace and technical changes separate - makes doing a review diff difficult if they are mixed together.

Yes, good idea. See #40.

JamesH65 commented 3 years ago

Going to have to revert this as found a load of problems.