Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plenary: From notebooks to packages #23

Open
2 tasks
scottyhq opened this issue Apr 26, 2024 · 4 comments
Open
2 tasks

Plenary: From notebooks to packages #23

scottyhq opened this issue Apr 26, 2024 · 4 comments
Assignees
Labels
All plenary session for all attendees

Comments

@scottyhq
Copy link
Contributor

scottyhq commented Apr 26, 2024

Lead: Don Setiawan, Romina Piunno
Date: 22/08/2024
Start Time: 0900
Duration: 90
Description: All about python packaging

Details

Learning Outcomes

  • Understanding of modular, object oriented, python programming
  • Understanding on how to turn code in jupyter notebooks to a python package
  • Understanding of the best practice for a scientific software development

People Developing the Tutorial (content creation, helpers, teachers)

Authors: Don & Romina

Summary Description

Dependencies (things people should know in advance of the tutorial)

Some knowledge of Jupyter Notebook, Git, and Installing python package

Technical Needs (GPUs? Large file storage? Unique libraries?)

N/A, All can be done from scratch

Tasks

@scottyhq scottyhq converted this from a draft issue Apr 26, 2024
@jomey jomey added Schedule All plenary session for all attendees and removed Schedule labels Apr 26, 2024
@lsetiawan
Copy link

@RomiP I've given a bit of thought on this and here's my potential idea for the tutorial

Tutorial Outline

  1. Python OOP and modules tutorial
  2. Exercise: Participants go through their project notebooks and start creating python modules. Outcome: Participants now have python modules and can import directly from the original notebook(s)
  3. Simple Python Package Codebase (src/package)
  4. Exercise: Participants move their modules to the designated src/package_name directory. Now try importing... does this work? ask to troubleshoot, what can we do? Outcome: Participants now understand the struggle and non-reproducible nature of their current setup
  5. Setup package metadata and build config (pyproject.toml), dependencies, and licensing
  6. Execise: Participants create a pyproject.toml and choose a license. Then they pip install current directory. Now try importing from their notebook. Tutorial try to install their package directly from github and see the power of this setup Outcome: Participants now understand the structure of pyproject toml and have a grasp of various common licenses.
  7. Further additions for a full fledged package: documentation, tests, build infrastructure. Demo an already built package.

@lsetiawan
Copy link

@RomiP what do you think of the above idea? I'd like your input on that. Thanks 😊

@RomiP
Copy link

RomiP commented Jun 29, 2024

@RomiP what do you think of the above idea? I'd like your input on that. Thanks 😊

@lsetiawan
I love the outline. Do we have an update about making the tut 90mins instead of 45? I'm thinking during the tutorial, we live-code our own small package (and example that comes to mind is a phone book). My previous tutorials on OOP seemed to be well-received following this format. Here's some brainstorming following from your outline

1a. Motivate use of OOP and packaging
1b. Define OOP
1c. Draw out UML style pictogram of phonebook (Attributes: contacts; Methods: add contact, remove contact). To demonstrate inheritance, "contact" will be an abstract class (Attributes: Name, phone number), child classes will be "personal" so this is a friend that also has a "birthdate", or "professional" this is a business that offers a "service" (e.g. electrician)
1d. Implement these classes live (maybe have starter code depending on time constraints)

  1. Exercise

  2. Simple Python Package Codebase (src/package)

  3. Exercise

  4. Setup package metadata etc. but do this using the phonebook code we wrote live

  5. Exercise

  6. Additions - we can again demo using our phonebook code but write tests and things beforehand to save on time

@JessicaS11
Copy link

@lsetiawan @RomiP We've extended this tutorial to be 90 minutes instead of 45. We're excited about the hands-on nature enabling participants to apply the content to their ongoing projects. As a side note: we'd also like to make sure we have enough helpers familiar with this workflow to help participants during the interactive portions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
All plenary session for all attendees
Projects
Status: THURSDAY - 22-08-2024
Development

No branches or pull requests

5 participants