Talks: Hatch: The only tool you need
Friday - May 17th, 2024 2:45 p.m.-3:15 p.m. in Ballroom A
Presented by:
Description
Title
Hatch: The only tool you need
Category
Packaging/tooling
Duration
30 minutes
Description
While other language ecosystems have a streamlined workflow that involves a single tool like Rust's Cargo and JavaScript's npm, maintaining Python projects has historically involved learning and using an ever-growing set of tools:
- packaging:
distutils
,setuptools
,flit
- dependency management:
pip
,pip-tools
,poetry
- Python management:
pyenv
, Homebrew, Windows store - environments:
virtualenv
,tox
,nox
- versioning:
pbr
,setuptools_scm
,bump2version
,versioneer
- builds:
pip
,build
- publishing:
twine
- ...
This talk explains how Hatch can be that unified tool for Python.
Audience
Programmers at any level that wish to simplify their development experience.
Level
Any
Objectives
Attendees will learn how to manage the entire lifecycle of a project with Hatch from creation to publishing.
Outline
- Intro (3 minutes)
- brief history
- why rewrite
- status/current users
- Project setup (2 minutes)
- installation
- porting setuptools-based projects
- creating new projects, with options
- Python management (1 minute)
- Packaging (6 minutes)
- briefly show
pyproject.toml
metadata - build targets
- metadata hook plugins
- file inclusion
- defaults
- benefits vs setuptools config
- VCS support
- dev mode
- build hook plugins
- Dependencies (2 minutes)
- commands
- auto-sync
- workspaces, monorepos
- Environments (8 minutes)
- basic options
- philosophical difference between
tox
&nox
- scripts
- context formatting
- matrices
- overrides
- environment plugins
- Static analysis via Ruff (2 minutes)
- Testing via pytest (2 minutes)
- Versioning (2 minutes)
- source plugins
- bumping
- Publishing (1 minute)
- Future (1 minute)