Skip to content

Commit

Permalink
Initial meta changes
Browse files Browse the repository at this point in the history
This will require further changes on review when the course has been written
  • Loading branch information
Robadob authored Jan 10, 2024
1 parent 289ed9b commit ef65223
Show file tree
Hide file tree
Showing 8 changed files with 132 additions and 36 deletions.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
# Building the Site Locally

Both of these steps should be followed within `rterm`.

## Setup

```r
# Setup mirrors
options(repos = c(
carpentries = "https://carpentries.r-universe.dev/",
CRAN = "https://cran.rstudio.com/"
))
# Setup install from github
install.packages("devtools")
library(devtools)
# Install Uni of Shef Varnish theme
install_github("RSE-Sheffield/uos-varnish")
# Install remaining official carpentries packages
install.packages(c("sandpaper", "tinkr", "pegboard"))
```
## Development Server

```r
sandpaper::serve()
```

--------------

# The Carpentries Workbench Template Markdown Lesson

This lesson is a template lesson that uses [The Carpentries Workbench][workbench].
Expand Down
3 changes: 3 additions & 0 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ contact: '[email protected]'
# Order of episodes in your lesson
episodes:
- introduction.md
- profiling-introduction.md
- profiling-functions.md
- profiling-lines.md

# Information for Learners
learners:
Expand Down
Binary file added episodes/fig/pando-python-hex-sticker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions episodes/profiling-functions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: "Function Level Profiling"
teaching: 0
exercises: 0
---

:::::::::::::::::::::::::::::::::::::: questions

- TODO

::::::::::::::::::::::::::::::::::::::::::::::::

::::::::::::::::::::::::::::::::::::: objectives

- TODO

::::::::::::::::::::::::::::::::::::::::::::::::
17 changes: 17 additions & 0 deletions episodes/profiling-introduction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: "Introduction to Profiling"
teaching: 0
exercises: 0
---

:::::::::::::::::::::::::::::::::::::: questions

- TODO

::::::::::::::::::::::::::::::::::::::::::::::::

::::::::::::::::::::::::::::::::::::: objectives

- TODO

::::::::::::::::::::::::::::::::::::::::::::::::
17 changes: 17 additions & 0 deletions episodes/profiling-lines.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: "Line Level Profiling"
teaching: 0
exercises: 0
---

:::::::::::::::::::::::::::::::::::::: questions

- TODO

::::::::::::::::::::::::::::::::::::::::::::::::

::::::::::::::::::::::::::::::::::::: objectives

- TODO

::::::::::::::::::::::::::::::::::::::::::::::::
41 changes: 39 additions & 2 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,45 @@
site: sandpaper::sandpaper_site
---

This is a new lesson built with [The Carpentries Workbench][workbench].
![Welcome to Performance Profiling & Optimisation (Python) Training!
](episodes/fig/pando-python-hex-sticker.png){
alt='Performance Profiling & Optimisation (Python) Training'
style='padding: 2%'}

The training curriculum for this course is designed for researchers that are writing Python and lack formal training. The curriculum covers how to assess where time is being spent during execution of a Python program, it also provides a high level understanding of how code executes and how this maps to the limiting factors of performance.

[workbench]: https://carpentries.github.io/sandpaper-docs
If you are now comfortable using Python, this course may be of interest to supplement and advance your programming knowledge. This course is particularly relevant if you are writing research code and desire greater confidence that your code is both performant and suitable for publication.

<!-- TODO: course duration? -->
<!-- TODO: confident code syllabus? -->


## Learning Objectives
<!-- Aim for 3-4 objectives for every 6 hours of training -->
<!-- SMART Objectives
- Specific
- Measureable
- Attainable (within the span of the course)
- Relevant
- Time-bound (implicitly the length of the course)
-->
<!-- Evaluation tool: https://web.cs.manchester.ac.uk/iloadvisor/ -->
After attending this training, participants will be able to:

- identify the most expensive functions and lines of code using `cprofile` and `line_profiler`.
- evaluate code to determine the limiting factors of it's performance.
- recognise and implement optimisations for common limiting factors of performance.

:::::::::::::::::::::::::::::::::::::::::: prereq

## Prerequisites

Before joining Performance Profiling & Optimisation (Python) Training, participants should be able to:

- implement basic algorithms in Python
- follow the control flow of Python code, and dry run the execution in their head or on paper.

See the [Research Computing Training Hub](https://sites.google.com/sheffield.ac.uk/research-training/research-training) for other courses to help with learning these skills.
<!-- TODO: could make a dedicated page (like https://carpentries.github.io/lesson-development-training/markdown-github-primer.html) that highlights specific courses/resources. -->

::::::::::::::::::::::::::::::::::::::::::::::::::
45 changes: 11 additions & 34 deletions learners/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,53 +2,30 @@
title: Setup
---

FIXME: Setup instructions live in this document. Please specify the tools and
the data sets the Learner needs to have installed.

<!--
## Data Sets
<!--
FIXME: place any data you want learners to use in `episodes/data` and then use
a relative link ( [data zip file](data/lesson-data.zip) ) to provide a
link to it, replacing the example.com link.
-->
Download the [data zip file](https://example.com/FIXME) and unzip it to your Desktop
-->

## Software Setup

::::::::::::::::::::::::::::::::::::::: discussion

### Details

Setup for different systems can be presented in dropdown menus via a `solution`
tag. They will join to this discussion block, so you can give a general overview
of the software used in this lesson here and fill out the individual operating
systems (and potentially add more, e.g. online setup) in the solutions blocks.

:::::::::::::::::::::::::::::::::::::::::::::::::::

:::::::::::::::: solution

### Windows

Use PuTTY
This course uses Python and was developed using Python 3.11, therefore it is recommended that you have a Python 3.11 or newer environment.

:::::::::::::::::::::::::
<!-- Todo suggest using a venv?-->

:::::::::::::::: solution

### MacOS

Use Terminal.app

:::::::::::::::::::::::::


:::::::::::::::: solution

### Linux

Use Terminal

:::::::::::::::::::::::::
The non-core Python packages required by the course are `snakeviz` and `line_profiler` and can be installed via `pip`.

```input
pip install snakeviz line_profiler[all]
```

:::::::::::::::::::::::::::::::::::::::::::::::::::

0 comments on commit ef65223

Please sign in to comment.