Skip to content

swincas/cnc-computing-course

Repository files navigation

cnc-computing-course

Content for the CAS Cookies-n-Code Computing Course (CN5)

  • yes, the slides are pretty full... this is because this repo shall (alongside course material) mainly serve as a resource to find useful information

TODO

Notes

Installable Parts

Important

the cn5_pkg is installable. This way you can use the utility functions easily in your own scripts.

  • the cn5_pkg package contains functions used across diferent sessions in the cn5 course

  • To install simply call the following from within your virtual environment:

pip3 install git+https://github.com/swincas/cnc-computing-course.git
  • You can then use the function as usual:
from cn5_pkg import cn5
cn5.runtime_estimate(<args>)

Important

If you find the cn5_pkg package useful for your work, a brief acknowledgement would be appreciated: We/I acknowledge the Cookie Monsters from the Swinburne Centre for Astrophysics and Supercomping (CAS), who made their utility functions available on github (https://github.com/swincas/cnc-computing-course.git).

For Cookie Monsters (Presenters)

  • to use the custom cn5_style.css in the marpit slides proceed as follows
    1. open project in VSCode
    2. add Marp for VSCode addon
    3. open workspace settings
    4. search for marp theme
    5. under Markdown › Marp: Themes add the following path styles/cn5_style.css
  • when presenting it is useful to enable screencast mode
    • enable via ctrl+shift+P > Developer: Toggle Screencast Mode
    • ensures people can see your keystrokes
  • compiling the requirements files can be done easily using uv
uv pip compile pyproject.toml --extra cn5course -o requirements.txt                 #no mpi
uv pip compile pyproject.toml --extra cn5course --extra mpi -o requirements_mpi.txt #with mpi (for OzSTAR)
  • compiling the presentations to html can be done by calling the following from root
marp content/session*/*.md --allow-local-files --theme ./styles/cn5_style.css
  • using the Live Preview extension you can view the slides in VSCode

Preliminary Tasks For Attendees

  • create git account
  • get OzStar account
  • become member of OzStar project
  • install git
    • Linux (Ubuntu): apt-get install git
    • Mac: brew install git
    • Windows: download from here
  • clone the Cn5 repo
git clone https://github.com/swincas/cnc-computing-course.git

Agenda

  1. Day 1
    1. bash intro
    2. git and github
    3. ssh keys
  2. Day 2
    1. python and venvs
    2. hpc and ozstar
    3. data formats
  3. Day 3
    1. good practises
    2. interactive computing
    3. uv and mise
  4. Day 4
    1. OzSTAR tour
  5. Day 5
    1. vscode
    2. end2end workflows
    3. Q&A

Repo Structure

  • cn5_pkg/
    • installable package
    • contains function used throughout the course that might also be useful in your research
  • content/
    • course material
  • data/
    • contains data used and generated throughout the course
  • gfx/
    • graphics used in presentations and generated when running scripts
  • styles/
    • custom Cn5 styles
      • css style for the slides
      • mplstyle for plots
  • templates/
    • templates to copy and paste
    • i.e., for slides
  • legacy/
    • contains layouts of previous versions of Cn5
  • .python-version
    • python version used for development
    • used by uv
  • cn5_cheatsheet
    • cheat sheet of useful commands
  • mise.toml
    • version control of programs used in the project
    • specific to mise-en-place
  • pyproject.toml
    • file specifying the project
    • necessary for installation of cn5_pkg/
    • contains
      • dependencies
      • version
      • authors
  • requirements_mpi.txt
    • repirements for installation of packages used throughout the course
    • includes mpi4pi
    • compiled from pyproject.toml
    • install via pip3 install -r requirements_mpi.txt
  • requirements.txt
    • repirements for installation of packages used throughout the course
    • excludes mpi4pi
    • compiled from pyproject.toml
    • install via pip3 install -r requirements.txt
  • uv.lock
    • current state of the python environment as observed by uv

About

Content for the CAS Cookies-n-Code Computing course

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 7