7 September 2016
My template repository and file structure for building packages as command line applications with minimal dependencies on pytest, click and pyyaml.
Click is an excellent alternative to argparse for creating command line apps, with really concise type checking and file parsing directly at the entry point to the app.
Logging is managed via a config YAML file that includes comprehensive coverage across different modules allowing only errors and warnings to propagate to the console, while recording logging down to debug level in a logfile that allow debugging to pinpoint problematic submodules in a large application.
Testing is setup by default to use pytest and I plan to include a GitHub Actions CI/CD workflow to run tests on push to the repo.
The package can be easily install by running the setup.py file.
A view of the setup file