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
. Runpython check_setup.py
to 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
python
,git
, andpytest
should run. - Read How To Write Good Scientific Software.
15:15–17:00
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
- 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 .
.
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/