Open scottyhq opened 2 months ago
@RomiP I've given a bit of thought on this and here's my potential idea for the tutorial
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 setuppyproject.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.@RomiP what do you think of the above idea? I'd like your input on that. Thanks 😊
@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)
Exercise
Simple Python Package Codebase (src/package)
Exercise
Setup package metadata etc. but do this using the phonebook code we wrote live
Exercise
Additions - we can again demo using our phonebook code but write tests and things beforehand to save on time
@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.
Lead: Don Setiawan and 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 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