Skip to main content

Updating

How Updates Work

When you create a project with SpeedPy, the install script sets up a speedpy Git remote and a speedpy branch. This branch tracks the upstream boilerplate so you can pull in updates.

Pulling Updates

To update your project to the latest version of SpeedPy:

git fetch speedpy
git merge speedpy/master --allow-unrelated-histories

You may encounter merge conflicts if you've modified files that were also updated in the boilerplate. Resolve these conflicts as you would any Git merge.

After Updating

After pulling updates, you should:

  1. Rebuild Docker images to pick up new dependencies:

    docker compose build
  2. Run migrations in case new models were added:

    docker compose run --rm web python manage.py migrate
  3. Install npm packages if package.json changed:

    docker compose run --rm web npm install
  4. Rebuild Tailwind CSS:

    docker compose run --rm web npm run tailwind:build

Updating Python Dependencies

SpeedPy includes an update_pyproject.py script that automates keeping your Python packages up to date. It reads pyproject.toml, fetches the latest version of each pinned dependency from PyPI, and rewrites the file in place.

docker compose run --rm web python update_pyproject.py

The script prints a summary of what changed:

# Django: 5.2.8 -> 6.0.3
# celery: 5.6.1 -> 5.6.2
# whitenoise: already at latest (6.12.0)
...
✓ pyproject.toml updated successfully

After running it, rebuild your Docker image to pick up the new versions:

docker compose build
note

The script preserves package extras (e.g. celery[redis]) and skips entries without a version pin. It always pins to exact versions (==), regardless of the original operator.

warning

Always review the updated pyproject.toml before committing, especially for major version bumps (like Django 5.x → 6.x). Major versions may introduce breaking changes.

Tips

  • Always commit your work before pulling updates so you have a clean state to revert to if needed.
  • Review the changelog before merging to understand what changed.
  • Test your application after merging to catch any breaking changes.