Lessons, Labs, and Projects for COMP 215 Intro. to Computational Science at Capilano University
Starter notebooks for lab assignments
In-class lessons, exercises, and reference material.
Weekly notebooks are used during class to structure discussion, answer questions,
and to demonstrate or test ideas that arose during class in a given week.
Students should have a copy open and follow along during class.
foundations : reference notebooks that review and demonstrate fundamental python programming concepts, algorithms, and data structures covered in the weekly lessons
concepts : notebooks that explore the scientific concepts and models covered in the weekly lessons
algorithms : reference notebooks that develop & present re-usable algorithms and/or data structures that are re-used in the lessons, labs, or projects.
Note: for simplicity, rather than trying to import
these as modules,
simply copy-paste what you need into the notebook you are working in.
Sample solutions completed in class and lab.
This folder is for the instructor to post solutions.
Modifying or saving files to this folder can cause "merge conflicts" - please don't.
Problem : retain term history in repo, ideally a branch for each semester.
- keep it as simple as possible for students: reduce chance of mistakes; avoid merge conflicts
- simplest for all if everyone just works in
default
branch
Ideal Solution
: use "release branch" strategy for term archive; with "feature branch" named main
for student work.
- Collab always shows
main
as default branch (or alphabetical), regardless of actual default set in GH - Students less likely to lose changes during fork sync if working in a different branch
- develop courseware, fix bugs in
template
branch (master branch for repo) - each term, create
semester
branch (named for semester; set to default branch on GitHub) - when students fork repo, they create a
main
branch and make this their default branch on GitHub. - students work in their
main
/default
"feature branch". - students can sync fork any time without conflicts; use a pull-request to merge changes into
main
Process
- start of term:
- create a
semester
branch fromtemplate
(git checkout -b 2024.01 template
;git push origin 2024.01
) - make the
2024.01
branch thedefault
on GH - consider removing any
solutions
from previous term's branch to a private local branch
- create a
- student fork; create
main
branch; set it todefault
; work inmain
branch for production (current term):- students open lab assignments, exercises, and examples from
main
- students open lab assignments, exercises, and examples from
- updating courseware during term:
- fix bugs, enhancements, new lessons, etc. in
template
branch - advanced students can also make PR's to
template
branch - merge bug fixes back to
semester
branch only for notebooks not yet modified by students - instructor posts completed workbooks and sample solutions to
solutions
folder insemester
branch - students should always be able to sync / update
semester
branch without conflict - students can use a pull-request to merge changes from
semester
branch tomain
in controlled way
- fix bugs, enhancements, new lessons, etc. in
- end of term:
- merge any changes you want to keep from
semester
branch back intotemplate
branch
- merge any changes you want to keep from
Simple Solution : use "release branch" strategy; work in "semester" release branch each term.
- develop courseware, fix bugs in
main
branch - students work in
semester
branch, which isdefault
branch and copy ofmain
made at start of term. - post solutions and completed workbooks in
instructor
folder ofsemester
branch
Process
- start of term:
- create a
semester
branch from main (git checkout -b 2024-Spr main
;git push origin 2024-Spr
) - make the semester branch the
default
on GH - consider removing any solutions from previous term's branch to a private local branch
- create a
- work in
semester
branch for production (current term):- students open lab assignments, exercises, and examples from
semester
- instructor posts completed workbooks and sample solutions to
instructor
folder onsemester
branch - careful not to update any notebooks in
semeseter
branch that might create merge conflicts for students
- students open lab assignments, exercises, and examples from
- updating courseware during term:
- fix bugs, enhancements, new lessons, etc. in
main
branch - advanced students can also make PR's to
main
branch - merge bug fixes back to
semester
branch only for notebooks not yet modified by students - students should always be able to update
semester
branch without conflict
- fix bugs, enhancements, new lessons, etc. in
- end of term:
- merge any changes you want to keep from
semester
branch back intomain
branch
- merge any changes you want to keep from