This project uses uv to manage dependencies. uv is pretty good at automatically sync-ing. But if you need to explicitly set everything up, try:
just installThis will create a virtualenv at ./.venv and install dependencies with uv.
To list all Just tasks, run just --list:
Available recipes:
build # Build the package
build-docs # Build the documentation
check # Check type annotations with pyright
clean # Clean up loose files
compile # Generate locked requirements files based on dependencies in pyproject.toml
default # By default, run checks and tests, then format and lint
docs # Live generate docs and host on a development webserver
format # Format with black and isort
install # Install all dependencies
lint # Lint with flake8
man # Generate man page and open for preview
mkdocs # Run mkdocs
publish # Build the package and publish it to PyPI
shell # Open a bash shell with the venv activated
sphinx TARGET # Run sphinx
tag # Tag the release in git
test # Run tests with pytest
tox # Run tests using tox
update # Update all dependencies
upgrade # Update all dependencies and rebuild the environment
upload # Upload built packages
To update the modules being used, run:
just updateTo activate the venv in a subshell:
just shellTo fire up an interactive console:
just consoleNote that I haven't figured out how to auto-exec code on load - you'll need to import everything. The easiest thing may be to use full fat Jupyter, potentially with jpterm.
There are four main just tasks:
just format- format with black and isortjust check- check type annotations with pyrightjust test- run tests with pytestjust lint- lint with flake8 and validate-pyproject
To run all four in a row, simply run just. Then, run individual checks until
you're happy with it, and run just again to make sure all is well.
I usually lean on github actions for checking the test matrix, but just tox
should run them with tox. An avenue to explore may be acting smarter about
installing versions of python listed in the test matrix.
Docs for published projects are automatically generated by readthedocs, but you can also preview them locally by running:
just docsThis will use mkdoc's dev server - click the link, good to go. It even
supports hot reload!
Run just to do final checks.
Update the CHANGELOG.md file to detail the changes being rolled into the new version.
I do my best to follow semver when updating versions.
I try to use git tags to tag versions - there's a just task:
just taggit push origin main --tagsThis should trigger a GitHub Action which publishes to PyPI and creates a GitHub Release. Go to GitHub and make sure it worked.
RTD should build automatically but I find there's a delay so I like to kick it off manually. Log into RTD, log in, then go to the pyee project page and build latest and stable.
It's not official, but I like to announce the release on Bluesky and Mastodon.
If you want to publish the package manually, run:
just publishThis should automatically build the package and upload with uv.