Maintaining & Sustaining Software Intermediate 11m

Python Package Development Best Practices

This lesson covers best practices for building Python packages, focusing on scientific software. It explains how to structure packages, write tests, manage dependencies, and distribute packages via PyPI.

Learning outcomes

  • Apply best practices for structuring Python packages for scientific software
  • Demonstrate how to write comprehensive tests and manage dependencies
  • Implement version control workflows for collaborative package development
  • Create clear documentation using tools like Read The Docs
  • Configure continuous integration for automated testing and deployment

Prerequisites

Git, Python

Cite this lesson

Metadata from CITATION.cff.

APA

Nash, J. A., Altarawy, D., Barnes, T. A., Ellis, S. J., Irrgang, M. E., Marin-Rimoldi, E., Pritchard, B., Radifar, M., Smith, D. G. (2021). Best Practices in Python Package Development (Version 2021.08.0). (Version 2021.08.0). UC OSPO Network. https://doi.org/10.34974/2H9M-0E15

BibTeX
@misc{python_package_development_best_practices_2021,
  author    = {Nash, Jessica A. and Altarawy, Doaa and Barnes, Taylor A. and Ellis, Samuel J. and Irrgang, M. Eric and Marin-Rimoldi, Eliseo and Pritchard, Benjamin and Radifar, Muhammad and Smith, Daniel G.A.},
  title     = {Best Practices in Python Package Development (Version 2021.08.0)},
  year      = {2021},
  publisher = {UC OSPO Network},
  url       = {https://doi.org/10.34974/2H9M-0E15},
  doi       = {10.34974/2H9M-0E15},
  version   = {2021.08.0}
}