TIL (Today I Learned)

The TIL series of articles contains very short articles documenting something I learned “today”.

Today I learned you can use uv to install CLI tools with extra dependencies.

Today I learned how to use uv to escape uv and go back to using venv and pip for a given project.

Today I learned how to quickly switch back and forth between two different git branches.

Today I learned how to publish a Python package to PyPI with uv.

Today I learned that I can use the percent sign to run commands from inside Jupyter notebooks.

Today I learned how to use shell scripting to activate my virtual environment automatically when I change directories.

Today I learned about 5 useful pytest options that let me control what tests to run with respect to failing tests.

Today I learned how to call a makefile from within another makefile.

Today I learned how to create git aliases in my .gitconfig file.

Today I learned how to automatically push code changes while I'm doing live coding, for example while teaching.

Today I learned how to use named tuples to improve readability and flexibility of test parametrisations in pytest.

Today I learned how to automatically delete local git branches that have been merged already.

Today I learned that you can run custom Python code when Python starts-up, before running other scripts or programs.

Today I learned how to find the commits that affected a specific file with git log.

Today I learned how to customise the Python REPL on start-up.

Today I learned how to create nested git repositories through the submodules command.

Today I learned how to create an alias to activate my Python virtual environments with a single-word command.

Today I learned how to use VS Code's sticky scroll feature.

Today I learned how to rename a git branch from the CLI.