Reference materials and information on reuse and accessibility
What makes code re-useable?
- Wilson, et al. Best Practices for Scientific Computing
- Ten Simple Rules for Reproducible Computational Research
- FAIR data principles
- A nice guide to structuring your python repo
Packages
Package managers
Package managers automate the process of installing pre-built packages in a way that fits your system. When a package manager is working ideally on your system, it knows which packages are installed already, and their versions, and knows how to follow the instructions for new packages so as to identify dependencies, generate a workflow, and execute the workflow to build and install the package and its requirements.
The first rule of package managers is to pick one and use that all the time. Don’t install packages manually or use other managers, which can create a mess. Unfortunately, it is not always possible to use only one package manager.
- Wikipedia’s list of package management systems
Package development
Someone has to make those nice packages. Maybe that’s you. Ideally your package is amenable to automated installation because it follows the conventions expected by package installers. Package generation tools exist for R, Python and other languages.
Package generation tools
- devtools for R packages
- quickie intro to devtools
- introduction to using Python’s setuptools
There are also best practices for structuring your repositories.
- General discussion of best practices for R Packages
- Python Project Template Guide
- A nice guide to structuring your python repo see the workspace reference for hadley wickham guide to R packages.
- …or search for templates online
These are best practices for data repositories, but I find them useful for code as well
- Dryad’s instructions to Name files and directories in a consistent and descriptive manner
- Dryad’s instructions to Organize files in a logical schemaf
Standing up an accessible service
Sometimes the best way to make your work accessible to others is to provide the code. In other cases, it is better to provide functionality directly through a web application, a web service, or other means.