Nanosystems Lab Cookiecutter

Introduction

This project focused on developing and deploying a standardized Python library template to improve software quality, consistency, and efficiency within the Nanosystems Laboratory at the University of Hawaii at Manoa. The lab relies heavily on Python-based software libraries for lab automation and experimental control, but prior workflows suffered from inconsistent project structures, manual setup overhead, and error-prone deployment processes. To address this, I customized and extended the Hypermodern Python Cookiecutter framework into a lab-specific template that automatically generates well-structured Python projects with modern best practices, including testing, documentation, and CI/CD pipelines.

Primary Contribution

My primary contribution was evaluating existing templating tools, selecting the feature-rich Hypermodern Python Cookiecutter as the template foundation, and modifying it to align with the lab’s requirements. This included expanding Python version support to 3.9–3.12, replacing third-party CLI tooling with Python’s built-in argparse module for improved compatibility, and adding dynamic configuration options during project generation. I validated the template by migrating several of the lab’s existing automation libraries to the new structure, writing unit tests, and ensuring successful publication to PyPI. I also created a user guide to simplify adoption by lab members with varying levels of Python experience.

Conclusion

Through this project, I gained practical experience with Python packaging ecosystems (Poetry, PyPI), testing (Nox), CI/CD automation (Github Actions), and documentation (Sphinx). Beyond technical skills, the project taught me how to balance usability and features, document workflows, and gather user feedback. to balance feature richness with usability, document complex workflows clearly, and gather user feedback to iteratively improve tooling. It reinforced the importance of standardization and automation in research software environments, particularly when multiple contributors and long-term maintenance are involved.