Skip to content

Learn how to package your code effectively for better collaboration, distribution, and reuse of your code. This workshop is being held at the Data Science Mini-Conference, but is available for anyone to complete in their own time.

License

Notifications You must be signed in to change notification settings

nhsengland/package-your-code-workshop

Repository files navigation

Package Your Code - Data Science Mini-Conference Workshop

This repository contains materials for the "Package Your Code" workshop held at the Data Science Mini-Conference. The workshop aims to teach participants how to package their code effectively for better collaboration, distribution, and reuse.

Workshop Overview

In the live section of this workshop, we will cover the following topics:

  • Dependency Management: Learning how to manage project dependencies using tools like uv and splitting dependencies into production, development, and documentation categories.
  • Packaging with pyproject.toml: Understanding the structure and purpose of pyproject.toml files, and how to use them to define project metadata and dependencies so you can reuse your code in other projects.
  • Mkdocs and Mkdocstrings: Setting up documentation for your project using mkdocs and mkdocstrings to create user-friendly and maintainable documentation.

There is also bonus content available in the repository, which can be explored at your own pace, including:

  • Cookiecutter Templates: Using cookiecutter templates to quickly scaffold new projects with best practices in mind.
  • Setting up Pre-Commit Hooks: Implementing pre-commit hooks to automate code quality checks, enforcing coding standards, and preventing secrets from being committed to version control.
  • Setting up CI/CD with GitHub Actions: Automating testing, building, and deploying your code using GitHub Actions for continuous integration and continuous deployment.

Pre-requisite Knowledge

The workshop assumes that participants have a basic understanding of the following concepts:

Pre-requisite Description
Python Knowledge of how to write and run Python code
Git Basic command line usage and version control concepts
GitHub Familiarity with repositories, Codespaces, and forking
RAP Understanding of the core principles of Reproducible Analytical Pipelines (RAP), particularly the levels of RAP
Virtual Environments & Package Management Basic understanding of virtual environments and package management in Python (e.g., pip, venv, conda, etc.)

Workshop Website

The workshop materials are hosted on a dedicated website built with MkDocs: Package Your Code Workshop. On the website, you will find information about the workshop, how to get started, and the workshop content itself.

Have an issue?

If you encounter any issues or have questions, please open an issue in this repository. We welcome feedback and contributions to improve the workshop materials.


Licence

Unless stated otherwise, the codebase is released under the MIT Licence. This covers both the codebase and any sample code in the documentation.

HTML and Markdown documentation is © Crown copyright and available under the terms of the Open Government 3.0 licence.

About

Learn how to package your code effectively for better collaboration, distribution, and reuse of your code. This workshop is being held at the Data Science Mini-Conference, but is available for anyone to complete in their own time.

Topics

Resources

License

Stars

Watchers

Forks

Languages