Creating lab assignments

Workflow for creating lab assignments

Create Development repostiory on GitHub:

Create local development repository

using Pkg
mv labN labN-dev
cd labN-dev
cp -r ../lab-template/* .
cp -r ../lab-template/{.gitignore,.github} .

Make local repository and commit template files

git init
git add .gitignore .github docker-compose.yml environment.yml LICENSE src test
git commit -m "template"

Rename to use main branch, connect to remote repo and push to GitHub

git branch -m master main
git remote add origin
git push -u origin main

Create & Switch to solution branch

git checkout -b solution

Make exercises (named exN.jl or exN.ipynb) and tests (named test/testN.jl)

git add ex?.jl ex?.ipynb test/test?.jl
git commit -m "new exercise"

Setup test directory

Once assignments is ready for continuous integration testing, create/update the Project.toml file in test directory to include needed packages:

git add test/Project.toml test/test?.jl
git commit -m "tests for exN"
git push -u origin solution`

Check solution passes CI testing

Check status of tests from Github Actions tab .

Make Julia Markdown version of solutions

julia -e 'using Weave; convert_doc("ex1.ipynb","ex1.jmd");'
julia -e 'using Weave; convert_doc("ex2.ipynb","ex2.jmd");'
julia -e 'using Weave; convert_doc("exN.ipynb","exN.jmd");'
git add ex?.jl ex?.jmd; git commit -m "convert from ipynb"
git checkout main
git checkout solution exN.jl
git checkout solution exN.jmd
git checkout solution test/testN.jl
git checkout solution Project.toml
git checkout solution test/Project.toml
julia -e 'using Weave; convert_doc("ex1.jmd","ex1.ipynb");'
julia -e 'using Weave; convert_doc("ex2.jmd","ex2.ipynb");'
julia -e 'using Weave; convert_doc("exN.jmd","exN.ipynb");'
git add ex?.jl ex?.jmd ex?.ipynb test/test?.jl
git commit -m "cleaned ex"
git push

Create Starer Repository for Students

Create starter repostiory on from development repository

git add *
git add .gitignore .github # .travis.yml
git commit -m "init"
git branch -m master main
git push --set-upstream origin main

Make original branch for comparison purposes and switch back to main branch

git checkout -b original
git push -u origin original
git checkout main

Check that you’re happy with the labN-start repository

Serve HTML version of labs

Set GitHub to serve html versions of labs.

Distribute new laboratory assignment

Go to