Structuring Coding Projects
Creating an effective, clean structure for a coding project is a challenge. Large code structures follow Conway’s Law in that the code will end up looking like the communication structure of the developers. Small open-source libraries, applications, and research projects, however, don’t feel such influences. You therefore might have more freedom, but this can lead to the paradox of choice.
Reasonable organization depends on the type and size of code. A python application will look quite different from a library which will be quite different from a repository of reproducible research (science repo). While some structure is imposed on the first two categories by frameworks and distribution tools, the science repo is wide open and many conflicting opinions exist. Here we examine common organization for each code type, and make some sane suggestions for taming your project’s complexity.
Objectives
In this module, we will:
- See how a modern python library is structured
- Review common structures of python applications
- Examine the “science repo” and possible organization
- Discuss distribution channels
Reading
Additional Resources
- Packaging a python library
- Python Application Layouts
- Research code opinion 1
- Research code opinion 2
- Good Enough Practices in Scientific Computing