This repository contains an example python codebase with accompanying CLI to demonstrate how to set up and publish such a project with modern1 tools.
The contents of this repository themselves are published as a python package that can be imported in python, but also contains a CLI wrapper.
Installing the package
pip install package_publishing_example
Testing it out
>>> from package_publishing_example import revcomp
>>> revcomp('ACGTA')
'TACGT'
$ ppe revcomp ACGTA
TACGT
This codebase uses the following tools:
- uv for project management and publishing to pypi
- ruff for linting and formatting
- pytest for running tests
- typer for creating a CLI
- uv-dynamic-versioning to read the package version from a git tag
The assignments consist of following the steps that were followed to end up with this repository repository structure, e.g. downloading and initializing the tools. Assignment 1 focuses on python package management and publishing with uv, assignment 2 deals with publishing to conda, assignment 3 contains miscellaneous tips in tricks for working with github and linking/synchronizing packages.
Footnotes
-
'Modern' at the time of writing (19.03.2025) ↩