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

Hatch logo

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

  1. Intro (3 minutes)
  2. brief history
  3. why rewrite
  4. status/current users
  5. Project setup (2 minutes)
  6. installation
  7. porting setuptools-based projects
  8. creating new projects, with options
  9. Python management (1 minute)
  10. Packaging (6 minutes)
  11. briefly show pyproject.toml metadata
  12. build targets
  13. metadata hook plugins
  14. file inclusion
    • defaults
    • benefits vs setuptools config
    • VCS support
  15. dev mode
  16. build hook plugins
  17. Dependencies (2 minutes)
  18. commands
  19. auto-sync
  20. workspaces, monorepos
  21. Environments (8 minutes)
  22. basic options
  23. philosophical difference between tox & nox
  24. scripts
  25. context formatting
  26. matrices
  27. overrides
  28. environment plugins
  29. Static analysis via Ruff (2 minutes)
  30. Testing via pytest (2 minutes)
  31. Versioning (2 minutes)
  32. source plugins
  33. bumping
  34. Publishing (1 minute)
  35. Future (1 minute)