Didactyl: a Python-native engine for repository-based tutorials

Didactyl: a Python-native engine for repository-based tutorials

I’ve recently released the first version of Didactyl, a Python-native engine for building repository-based, exercise-driven tutorials.

It is heavily inspired by Rustlings, but is intended for people who want to build similar tutorials around their own Python libraries, tools or codebases.

Didactyl provides the tutorial machinery:

  • repository and exercise scaffolding

  • executable checks

  • hints and supporting material

  • learner progress tracking

  • automatic invalidation when completed files change

  • a terminal interface for navigating and running exercises

The tutorial author provides the content and decides how it is organised.

The original motivation came from wanting to build a practical tutorial for a specialist scientific and engineering modelling library. Existing documentation and notebooks are useful, but I wanted something that lets learners work directly in a repository, edit real Python files and progress through checked exercises.

The project is still at an early stage, and I’m currently working on making the course structure more configurable. In particular, I want tutorial authors to be able to define which materials each exercise includes and whether explanations live alongside exercises or in a separate lesson structure.

I would be interested in feedback from Scientific Python maintainers and contributors who create training or onboarding material:

  • Would this model be useful for teaching your own project?

  • What would you need before adopting something like this?

  • How do you currently organise practical, exercise-based material?

  • Are there common workflows that a general-purpose engine should support?

Repository: GitHub - j-emberton/didactyl: Didactyl is a Python-native engine for building repository-based, exercise-driven tutorials. · GitHub

In case you haven’t seen, GitHub - scipy-lectures/scientific-python-lectures: Tutorial material on the scientific Python ecosystem · GitHub GitHub - numpy/numpy-tutorials: NumPy tutorials & educational content in notebook format · GitHub. Hopefully some of the contributors to those repos can weigh in :slight_smile:

Thanks, appreciate the links. I might look at converting some of these tutorials into the didactyl format to show how it works.

I think notebooks are great, but come with limitations.

They encourage clicking through rather than problem solving. And they don’t present the problem in context in a software engineering environment.

I hope to solve both of those problems with this tool.

Nice initiative! What is the dynamic to enter exercises and solutions? Is it like unit-testing where there are some asserts to pass and the student needs to write a function that passes the assertions? Sorry I didn’t have time to try an example yet, but I’m curious on what is the workflow like.