26 Packaging: Conclusion
26.0.1 Differences in package building tool philosophy
iClicker question:
Setting the programming language differences aside (and the technical issues with the pypkgs-Cookiecutter
at the beginning of last week), which approach to package building did you prefer?
A. Adding package components step-by-step as needed, like you did when using devtools
/usethis
to create an R package.
B. Setting up the project template in one fell swoop (i.e., once at the beginning of the project), like you did when using pypkgs-Cookiecutter
to create an R package.
In class discussion
- What are the advantages and disadvantages of the
devtools
/usethis
software package building approach in R?
- Advantages:
- Not overwhelming for beginners, since you just add one thing at a time.
- Allows you to redo the one thing you made a mistake on.
- Disadvantages:
- Easy to forget to add or do somethings, as you need to run a different command each time.
- Somewhat inefficient as a command needs to be run each time you want to add a new feature to the package.
- What are the advantages and disadvantages of the
pypkgs-Cookiecutter
software package building approach in Python?
- Advantages:
- Minimizes forgetting to dd or do somethings, because you just have one setup step at the beginning.
- Efficient because you just have one setup step at the beginning.
- Disadvantages:
- Can be overwhelming for beginners, since you generate a large number of files at one time.
- Takes a lot of time to when you make a mistake (e.g., typo in package name) because you need to manually got back and fix things.
- Sets everything up at the beginning, including the things you are not yet ready for (e.g., Continuous integration and deployment workflows on GitHub actions) and there are some annoying consequences of this (e.g., notifications about failed checks).