Collaborative software development in Python
Dark Energy school: session on Software Engineering
- Install Python version 3.5 or newer. Install the dependencies for
this course using
pip install -r requirements.txt. Run
python check_setup.pyto verify your installation.
- Install an editor, such as Atom or VS Code
- Ensure you can execute commands on the terminal / shell. E.g.,
commands such as
- Read How To Write Good Scientific Software.
End with 15 mins. Q&A, if time allows.
- Discuss best practices for design & collaborative coding.
- How do you best organize a remote collaboration? Meetings, PRs, sprints, chat?
- Discuss classes vs functions; when is OOP needed in practice? Keep it simple—the truth about clever code. Premature optimization.
- How to package your code (vs just keeping it in a notebook)
Students will be able to do the following:
- Make and navigate branches on Git
- Make a git commit to a project
- Submit your change as a pull request on GitHub
- Review someone else's pull request
Modular APIs, testing
- Write a function in Python
- Write a docstring for that function
- Write a test for that function + corner cases
- Execute those tests locally
- Have Travis-CI run these tests online
- Develop your own Python package, installed using
pip install -e ..
Reading from last year
Pre-lesson readings & post-lesson resources:
- Practical Lessons in Peer Code Review - Salsita Software blog http://blog.salsitasoft.com/practical-lessons-in-peer-code-review/
- Better Learning through Code Reviews - Capgemini Engineering blog https://capgemini.github.io/learning/better-learning-code-reviews/
- Why code reviews matter (and actually save time!) - Atlassian Agile Coach https://www.atlassian.com/agile/code-reviews
- 7 ways to up-level your code review skills - Asana blog https://blog.asana.com/2016/12/7-ways-to-uplevel-your-code-review-skills/