Creating Libraries and Packages: Difference between revisions
Created page with "02 {{PackageDevelopmentSidebar}} '''Package development''' is the process of organizing your research code, functions, and..." |
|||
| Line 16: | Line 16: | ||
<div style="background-color: #f8f9fa; border-left: 4px solid #005A9C; padding: 15px; margin-bottom: 10px;"> | <div style="background-color: #f8f9fa; border-left: 4px solid #005A9C; padding: 15px; margin-bottom: 10px;"> | ||
''' | [[Developing R packages|'''Package Development in R''']]<br> | ||
R has a deeply ingrained culture of package development. This guide covers the essential anatomy of an R package, using tools like <code>devtools</code> and <code>roxygen2</code> to automate documentation, and best practices for organizing your statistical modeling code. | R has a deeply ingrained culture of package development. This guide covers the essential anatomy of an R package, using tools like <code>devtools</code> and <code>roxygen2</code> to automate documentation, and best practices for organizing your statistical modeling code. | ||
</div> | </div> | ||
<div style="background-color: #f8f9fa; border-left: 4px solid #ffc107; padding: 15px; margin-bottom: 10px;"> | <div style="background-color: #f8f9fa; border-left: 4px solid #ffc107; padding: 15px; margin-bottom: 10px;"> | ||
'''[[Package Development in Python]]'''<br> | '''[[Developing python packages|Package Development in Python]]'''<br> | ||
Modern Python packaging emphasizes clean project structures and declarative configuration. Learn how to structure your directories, configure a <code>pyproject.toml</code> file, and manage dependencies to make your machine learning models or data pipelines easily <code>pip</code>-installable. | Modern Python packaging emphasizes clean project structures and declarative configuration. Learn how to structure your directories, configure a <code>pyproject.toml</code> file, and manage dependencies to make your machine learning models or data pipelines easily <code>pip</code>-installable. | ||
</div> | </div> | ||
Revision as of 20:42, 28 June 2026
Template:PackageDevelopmentSidebar
Package development is the process of organizing your research code, functions, and data into a standardized, structured format that can be easily shared, installed, and reused. While a collection of isolated scripts might suffice for exploring a local dataset, bundling your code into a formal package is essential when you want to distribute your particular algorithm or datasets for use by the general academic community
This page connects you to our dedicated guides for the department's most commonly used languages and outlines the broader principles of distributing software.
1. Language-Specific Guides
The mechanics of building a package differ significantly depending on your programming language of choice. We maintain detailed, step-by-step tutorials for both R and Python.
Package Development in R
R has a deeply ingrained culture of package development. This guide covers the essential anatomy of an R package, using tools like devtools and roxygen2 to automate documentation, and best practices for organizing your statistical modeling code.
Package Development in Python
Modern Python packaging emphasizes clean project structures and declarative configuration. Learn how to structure your directories, configure a pyproject.toml file, and manage dependencies to make your machine learning models or data pipelines easily pip-installable.
2. Beyond the Code
Writing the functions is only half the battle. A successful, widely adopted package requires clear instructions and automated maintenance.
Writing Good Documentation (TBW)
Guidelines for writing clear READMEs, vignettes, and function-level docstrings. Good documentation lowers the barrier to entry and helps other researchers understand how to apply your computational tools to their own data.