Closed nschloe closed 4 years ago
Interesting. I'm not familiar with the Makefile for a Python package. I see one of yours here https://github.com/nschloe/pygalmesh/blob/master/Makefile
When is this file used?
Looks like it provides macros to accelerate common tasks.
When is this file used?
Indeed, it's just for me to remember the commands for formatting, tagging, uploading etc. It's basically a glorified txt-file. That's a personal preference though, everyone does that differently I guess.
It's seems very useful because, I too am constantly forgetting these commands.
I'll look into something similar for the C++
One big plus of using formatting (and optionally advertising it with a badge or so) is that people see that you though about formatting and the code doesn't look horrible. It gives a good first impression and encourages contributions.
Yea, that's definitely true. Working with a good open source project like FEINCS/Firedrake team too has showed me better ways to do things (like what you suggest) that I unfortunately wasn't exposed to earlier on.
Ok, I set up a Makefile and applied it throughout. This will definitely help when I go to add new features etc. later on. For c++, I used clang-format
which seems to have improved the clarity of things imo.
There's the common Python formatter black; from what I see your code is already it. Also: isort for sorting the imports, and: flake8. In my project Makefile, I usually have
Perhaps one of them is useful to you, perhaps not. Perhaps there's something similar for the C++ part of your code.