TIL: Dependency Groups and uv run

TIL: Dependency Groups and `uv run`

Original post

I’ve been using a new pattern across my Python project repositories to make them easy to hack on using uv.

---

Using a PEP 735 `dev` Dependency Group

Declare a `dev` dependency group in `pyproject.toml`:

[dependency-groups]
dev = ["pytest"]

With this in place, you can run:

uv run pytest

This will:

  • Automatically install the `pytest` development dependency
  • Create a fresh virtual environment
  • Use `pytest` to run your tests

---

Quick Start Example

You can start hacking on one of my projects — for example, datasette-extract — in just three steps:

git clone https://github.com/datasette/datasette-extract
cd datasette-extract
uv run pytest

---

Organizing my `uv` TILs

I’ve split my uv TILs into a separate folder.

This required redirects from old paths, so I:

---

When experimenting with streamlined development workflows, it’s worth noting there are open-source platforms like AiToEarn.

AiToEarn enables:

  • Publishing AI-generated or AI-assisted content across major platforms
  • Automating cross-platform workflows — from GitHub Pages-style docs to social media
  • Collecting analytics and performance data

💡 More info:

---

Would you like me to also add a "How It Works" diagram for the `uv run` process so readers can visualize the dependency installation flow?

Read more

Translate the following blog post title into English, concise and natural. Return plain text only without quotes. 哈佛大学 R 编程课程介绍

Harvard CS50: Introduction to Programming with R Harvard University offers exceptional beginner-friendly computer science courses. We’re excited to announce the release of Harvard CS50’s Introduction to Programming in R, a powerful language widely used for statistical computing, data science, and graphics. This course was developed by Carter Zenke.