Skip to content

Creating a new python project#

To create a new project, you can do the following:

  1. Make a new directory for your project in the projects/ directory.
  2. Run uv init inside the directory, to initialize the dependencies within the workspace.
  3. Set the version of the project in the pyproject.toml file to 0.0.0.
  4. Create a [dependency-groups] section in the pyproject.toml file and add pytest to the dev group. This will be the place for all your development dependencies that are not needed when importing the project elsewhere.
  5. Create a tests/ directory to handle your pytests.
  6. Add a Makefile with an install and test targets. test can depend on your exact implementation of pytest, you may need to do multi-threads, or skip certain tests, etc.

    install:
        uv sync --all-packages --all-extras
    
    test: install
        uv run pytest