Python Package Best Practices

This lesson by the Molecular Sciences Software Institute (MolSSI) teaches users MolSSI’s best practices in Python package setup. To see the full MolSSI’s education mission statement, please click here.

MolSSI best practices provides a starting point to get into software development operations to ensure that your code is reliable and reproducible while decreasing long-term maintenance requirements, increasing long-term viability, and allow others to work on your code base to assist your own efforts. Before starting into MolSSI best practice one must first think about the user base of a given project whether this is a project only used by yourself, within a small group, or a large community project. If your project is small and personal you may want to consider each topic in detail before implementing while for large community projects each topic is quite crucial.

This lesson is under continual development, please report issues to the workshop repository. If you see a subject you would like to contribute to, submit a pull request!


Setup Download files required for the lesson
00:00 1. Python Package Set-up What is the layout of a Python package?
How can I quickly create the structure of a Python package?
What license should I choose for my project?
00:45 2. Intro to Version Control with Git How do I use git to keep a record of my project?
01:20 3. Using GitHub How do I use git and GitHub?
01:55 4. Python Coding Style How can I write python code that is readable?
02:40 5. Deciding Package Structure How should I break my code into modules?
How can I handle imports in my package?
03:35 6. Code Collaboration using GitHub How can others contribute to my project on GitHub?
How can I contribute to the projects of others?
04:10 7. Python Testing How is a Python module tested?
05:20 8. Continuous Integration How can we automate testing?
How do we link a repository on GitHub to continuous integration services?
06:50 9. Documentation How can we document out module?
07:50 10. Deployment How can you get your project out there?
09:20 Finish

The actual schedule may vary slightly depending on the topics and exercises chosen by the instructor.

Legacy Lessons

Retired lessons are shown below. These are lessons which are no longer recommended by MolSSI, but may be useful if you are looking for information on a particular topic.

Continuous Integration using Travis-CI How can we automate testing?
How do we link a repository on GitHub to continuous integration services?