Code Monkey home page Code Monkey logo

ncas-isc's People

Contributors

agstephens avatar alaniwi avatar amanning9 avatar dwest77a avatar eardkdw avatar feggleton avatar jackleland avatar japamment avatar lecjlg avatar mahir-sparkess avatar nf679 avatar spepler avatar tommygod3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ncas-isc's Issues

Updates required for NCAS ISC 2021

  • Agree clear strategy for advertising course and student registrations
  • Write a description of the technologies/approaches that will be used to teach the online course
  • Liaise with workshop team about using the JASMIN accounts
  • Discuss/agree how Git/GitHub will be used in the context of the online course
  • Discuss/agree how the exercises will be presented/changed for the online course
  • Review all teaching presentations and update old material
  • Modify final day to include pulling data from a weather web service API (instead of plugging in a sensor)
  • Prune timetable to fit into 5 days, including 1 hour lunch break + 1 morning break (15 mins) + 1 afternoon break (15 mins)

Write a new exercise: scraping observations from the web, writing and plotting

The task that we need some work done on is the creation of a new exercise for the ISC course. We previously ran this exercise:

https://github.com/ncasuk/ncas-isc/blob/master/python/presentations/logging-data-from-serial-ports/LDFSP_Slides.pdf

It involved each person on the course (in person) connecting a simple serial logging instrument into their laptop and collecting some readings from it. This gave them some useful skills:

  • understanding that/how you can connect a device/instrument to your computer and collect measurements
  • reading/formatting those measurements
  • constructing a valid NetCDF file (data and metadata) from that data
  • reading that file and plotting with matplotlib

The next course will be run remotely so we need a different exercise. My proposed exercise would work as follows:

  1. We point each individual at a free weather web-API (you will need to find one) that allows you to provide a latitude/longitude location and read a time series of observations of temperature or rainfall (you need to decide which of these is used - all attendees should collect the same data.
  2. Each attendee will need to write some code to contact the API and get a time series of ~100 measurements for their location. They need to all get data for the same time period (because all the data will be graphed together later).
  3. They should then construct a CF-netCDF file using that data and appropriate metadata. This will include:
  • creating global attributes (i.e. who, where, why, how, what)
  • creating a main variable (e.g. temperature or rainfall) - with appropriate variable attributes
  • creating a time coordinate variable (and dimension) - with appropriate attributes
  • creating latitude and longitude auxiliary coordinate variables that are linked to the main variable
  • creating a unique filename of the format: "_.nc"
  1. They should transfer their data to a common location, probably a Group Workspace on JASMIN
  2. Finally, they should attempt to read the data from all the files (or at least their own), and to use matplotlib to generate a line graph of all the time series on a single plot. The plot should have a legend or labels showing the lat/lon location of each line.

Overview of Python section of the course

This is how we plan to run the Python part of the course:

  1. Use the Powerpoint slides to do the teaching (with some modifications as required)
  2. For each exercise, provide a notebook that includes all the aims, tasks, info, but without code.
  3. Provide a version of (2) that includes the code to demonstrate the answers.

Cheat sheet for indexing/slicing

We should make our own Python cheat sheet with the diagram of boxes and boundaries from the 'Learning Python' presentation 8 (slices).

git clone failing with `early EOF`

I have spent the last hour trying to clone the repo. It was failing with an EOF error

fatal: the remote end hung up unexpectedly MiB | 6.48 MiB/s  
fatal: early EOF
fatal: index-pack failed

The workaround I found, meant that I couldn’t access any of the branches but have found a workaround around the workaround.
Posting here in case others have the same issue. The solution seemed to be:

  1. git clone --depth 1 https://github.com/ncasuk/ncas-isc.git Get a shallow clone
  2. git fetch --unshallow turn the shallow clone into a full repo
  3. git remote set-branches origin '*' allow access to remote branches
  4. git fetch fetch the remote branches
  5. git checkout notebooks change branch

Updates to git and github intro

  • Update git/github tutorial or just use the sheet in #71
  • Do we need the second github presentation?
  • Make sure our instructions are simple for the access token generation and usage.

The Team

Who are we?

  • Ag
  • Alison
  • Richard
  • Sam
  • Andy
  • Alan
  • Mahir
  • Jack
  • Alex
  • Dan

Staffing issues:

  • no one staff member needs to be available all day for everyday
  • aim for 5 helpers per session
  • be proactive to help people who might be finding it hard

Student numbers:

  • might be 35 students

Create example Notebook for Exercise 1 of Python intro

@alaniwi, here is the plan for the first exercise:

  • Create a branch of the ISC course repo [1] called: notebooks
  • Add a directory in the repo: .../python/notebook
  • Download a local copy of the old exercises word document [2] to use as a reference for copying content
  • Using the JASMIN Notebook Service, translate the exercise 1 content from here into a new Notebook called: ex01_variables_types.ipynb
    • include the solutions within the tasks
    • eventually, we will (1) have a version with solutions, (2) have a version called <name>_solutions.ipynb with the solutions.
  • Commit that notebook to your new branch at: .../python/notebooks/ex01_variables_types.ipynb
  • Get @agstephens to review the content

Resources:

Populate the materials and resources page

  • Create top-level resources.md file
    • Resource - short name of resource
    • Description - longer description of the resource
    • Link - URL or location of resource
    • Last reviewed - date when we last checked it was still valid

Create clear pre-course instructions, should include: set up github account and access token.

Decide what will be covered in pre-course setup and how we will cover the initial setup/connecting to JASMIN teaching session. Based on experience in recent JASMIN workshops, people turn up not having done the pre-course exercise and only a few turn up for a trouble shooting session, so it is better to move this content to the start of the main course. This will need to include setting up of MobaXterm, connecting to the JASMIN training accounts and obtaining GitHub accounts.

Move to Python 3

We need to move the course to Python 3.

Need to update:

  • slides
  • exercises
  • solutions
  • example code / data

And everything needs testing.

GitHub auth

Go here:

https://github.com/settings/tokens

Click: "Generate new token"

In Note, put: "repo-access"

Tick the "repo" checkbox

Click: Generate token

Copy the generated token (it is a string starting with: ghp_) and save it to a local your password manager.

Then, when you want to clone a repo, insert the <username>:<token>@ string into the URL, e.g.:

https://fred:[email protected]/foo/baa

Or, should we tell them to put the token into their global git config?

Decide on presenters for each session

We have two extra volunteers this year to present: Mahir and Jack

  • allocate a presentation for each
  • do a run-through before the course and provide feedback

How will we teach git/github in the online course?

When we teach the Python section of the ISC remotely, we will not be working in a Linux shell environment. This means that teaching the command-line git interface is not going to be as straightforward. There are a few ways we could approach this:

Option 1: Remove the teaching of git/github from the course completely

Option 2: Include more demos of using git/github - but without real-world practice for the students

Option 3: Frequently switch to the Linux environment (using the JASMIN Training Accounts, on the sci servers) - and encourage users to create push their notebooks to github.

I think it is logical to go for Option 3, with the following:

  • add in some regular git-stops, between teaching the Python, where we demo the git/github interactions and hope that they copy us
  • add in a Slack channel "#git-help" - and provide 1-to-1 support as required

@spepler @rsmith013 @japamment @alaniwi - what do you think?

Edit structure of Python presentations

There are several places in the course where we present multiple presentations between exercises.
Would it be better to merge these together to provide a more flowing presentation set?
I wonder if, psychologically, it is better to have 1, longer presentation than multiple smaller ones. Hoping to avoid the "another one" effect.

I would propose we merge the following:

  • 02_basics -> 03_ceda-bool -> 04_save-as-script
  • 05_flow -> 06_ceda-and-or-not
  • 08_slice -> 09_list_comprehensions
  • 14_func (remove content after STOP) -> 14_ceda-funcobj
  • 16_lib -> 17_ceda-scripts
  • 18_ceda-sets -> 19_ceda-dict

pdb and single-character variables

The example has

(Pdb) x

to show the value of x. This happens to work, but many other single characters are pdb commands. It would be worth mentioning that if a pdb command exists then this will be done in preference to printing out variable contents, so that if you do not get the expected behaviour then either use a longer variable name or else do an explicit print(...)

Create new versions of the Python presentations

In order to update the Python presentations we need to:

  • Go through each presentation in the python intro folder [1]
  • For each presentation:
    • Update any errors/bugs/inconsistencies - changes to Python
    • Update the intro/outro presentations so that they are appropriate for working in a Notebook environment
    • Update any content that needs context to explain usage with Notebooks
  • Add a new presentation explaining notebooks and how we will use them: 00_notebooks.ppt:
    • include pointers to the JASMIN Notebook Service
    • explain where attendees will find their login, course resources etc

Resources:

Ongoing planning for NCAS ISC 2021

Planning doc:

https://docs.google.com/document/d/1DiK5wlUd8Lmwe8JC2Ynlrwr7VpDaYk4n8om-utLS1eM/edit#heading=h.mmcn8m5c7jue

Current timetable:

https://docs.google.com/spreadsheets/d/1kQFoRHLFU1IkaXChtMhLQaZCsGrITe8Dkok4rvHXubE/edit#gid=0

Planning timeline

  • 20/09:
    • AP: Tell Andy and Dan what is happening
    • AP: Send an invite to everyone to put the course in their calendars
    • RS/AP: Finalise video
    • LW: Tell people who expressed an interest last time
    • PT: Tweet the video on CEDA channels
    • PT: Create a slide about the ISC to add to slide sets
    • AP: Tell CEDA/NCAS on Slack about the course, and encourage people to use the video or slide when they are communicating with others
    • MR: First draft of weather API exercise
  • 27/09:
    • AP: Create a first draft of the course schedule
  • 18/10:
    • AS/MR/JL/AM: Discuss who will teach which sessions
  • 08/11:
    • AS/RS: Review weather API exercise and decide who is running it
    • AS/AP/PT: Plan rules of engagement regarding Zoom/Slack etc.
    • AS/RS/MR: Finalise all outstanding notebooks
    • AP/AM: Catch up with Matt Pritchard re: exercise 00
    • AP: Create clear joining instructions
    • AP: Talk to Kate about the social thing on Monday
    • AP: Create a student timetable
    • AS: Review notebooks and slides
    • AS/SP: Finalise schedule
    • AS/SP: Update Linux materials and Git planning
    • AS/SP/RS/AH/AI/AP: Nominate and add understudies to the teaching schedule
  • 15/11:
    • 16/11: Do a trial run of Slack/Zoom testing.
  • 22/11:
    • 22/11 - Course begins
    • 26/11 - Course ends

Advertising the course

See: https://docs.google.com/document/d/1DiK5wlUd8Lmwe8JC2Ynlrwr7VpDaYk4n8om-utLS1eM/edit#heading=h.o492x2y76u6v

Follow-up

Things to remember:

  • On the course, ask people to agree to: "I am happy for my feedback and comments to be used in publicity"

Move all the rest of the Python intro exercises into Notebooks

Create Notebooks for:

  • ex01_variables_types - alan
  • ex02_control_flow - richard
  • ex03_lists_slicing - alan
  • ex04_tuples - richard Alan took this one (provisionally - see slack)
  • ex05_input_output - alan
  • ex06_strings - alan
  • ex07_aliasing - alan
  • ex08_functions - alan
  • ex09_scripts_libraries - richard
  • ex10_sets_dicts - alan
  • ex11_oop

when should we use functions slide

The slide mentions that a function can be desirable "even if it is only called once". Which sort of implies that if it's called from more than one place then it is definitely desirable, but it doesn't say it explicitly. We ought to spell it out.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.