Skip to content

Latest commit

 

History

History
174 lines (124 loc) · 3.9 KB

File metadata and controls

174 lines (124 loc) · 3.9 KB

Releasing Volley Python SDK

This guide explains how to release a new version of the Volley Python SDK.

Prerequisites

  1. Ensure all tests pass:

    pytest
  2. Ensure the code is formatted:

    black volley tests examples
  3. Update the version in volley/version.py:

    __version__ = "1.0.0"  # Update to new version
  4. Update the version in setup.py:

    version="1.0.0",  # Update to new version
  5. Ensure you have PyPI credentials configured:

    # Install twine if not already installed
    pip install twine
    
    # Configure PyPI credentials (if not already done)
    # Create ~/.pypirc or use environment variables

Release Steps

1. Update Version

Update the version in both volley/version.py and setup.py following Semantic Versioning:

  • MAJOR version for incompatible API changes
  • MINOR version for backwards-compatible functionality additions
  • PATCH version for backwards-compatible bug fixes

2. Build the Package

# Clean previous builds
rm -rf dist/ build/ *.egg-info

# Build source distribution and wheel
python setup.py sdist bdist_wheel

3. Test the Package

Verify the package can be installed:

# Test installation from local build
pip install dist/volley-python-1.0.0.tar.gz

# Or test the wheel
pip install dist/volley_python-1.0.0-py3-none-any.whl

4. Create a Git Tag

Tag the release with a semantic version (e.g., v1.0.0):

git add volley/version.py setup.py
git commit -m "Bump version to 1.0.0"
git tag -a v1.0.0 -m "Release version 1.0.0"
git push origin v1.0.0
git push origin main

Important: The tag name must start with v and match the version in volley/version.py and setup.py (without the v prefix).

5. Publish to PyPI

Test PyPI (recommended first step):

# Upload to Test PyPI
twine upload --repository testpypi dist/*

# Test installation from Test PyPI
pip install --index-url https://test.pypi.org/simple/ volley-python

Production PyPI:

# Upload to PyPI
twine upload dist/*

6. Create GitHub Release

  1. Go to the GitHub repository: https://github.com/volleyhq/volley-python
  2. Click "Releases" → "Draft a new release"
  3. Select the tag you just created (e.g., v1.0.0)
  4. Add release notes describing the changes
  5. Publish the release

7. Verify Release

Test that the release can be installed:

# In a clean environment
pip install volley-python

# Or install specific version
pip install volley-python==1.0.0

Versioning

Follow Semantic Versioning:

  • MAJOR version for incompatible API changes
  • MINOR version for backwards-compatible functionality additions
  • PATCH version for backwards-compatible bug fixes

Example Release Workflow

# 1. Update versions
# volley/version.py: __version__ = "1.0.0"
# setup.py: version="1.0.0"

# 2. Format code
black volley tests examples

# 3. Run tests
pytest

# 4. Build
python setup.py sdist bdist_wheel

# 5. Test build
pip install dist/volley-python-1.0.0.tar.gz

# 6. Commit and tag
git add volley/version.py setup.py
git commit -m "Bump version to 1.0.0"
git tag -a v1.0.0 -m "Release version 1.0.0"
git push origin v1.0.0
git push origin main

# 7. Publish to PyPI
twine upload dist/*

# 8. Create GitHub release manually
# Go to GitHub and create a release with the tag

Notes

  • The package name on PyPI is volley-python
  • Users can install with: pip install volley-python
  • Users can install specific versions: pip install volley-python==1.0.0
  • The package name in setup.py must match the PyPI package name
  • The repository URL in setup.py must match the GitHub repository path

PyPI Package Name

The package name volley-python matches:

  • PyPI package: volley-python
  • GitHub repository: volleyhq/volley-python
  • Python import: import volley