Skip to main content

VDL Tools

Project description

VDL Tools

This repository contains a set of tools which are used at Vibrant Data Labs.

Tools

Installing a new package

The package is intended to work with pip, however pip does not support adding package reference to pyproject.toml. So that the most reliable way to keep the dependencies in sync is to:

  1. Add the package to pyproject.toml file, to the [dependencies] section
  2. Run pip install -e . to install the package in editable mode, which will trigger the installation of the dependencies

Version Management and Publishing

This project uses Hatchling as the build backend and follows semantic versioning.

Bumping the Package Version

The version is stored in vdl_tools/__init__.py and managed through hatchling. To bump the version:

  1. Manual version update:

    # Edit vdl_tools/__init__.py and update the __version__ string
    # For example, change from "0.0.2" to "0.0.3"
    
  2. Using hatch (recommended):

    # Patch version bump (0.0.2 -> 0.0.3)
    hatch version patch
    
    # Minor version bump (0.0.2 -> 0.1.0)
    hatch version minor
    
    # Major version bump (0.0.2 -> 1.0.0)
    hatch version major
    
    # Set specific version
    hatch version "0.1.0"
    

Building the Package

To build the distribution packages (wheel and source distribution):

# Install hatch if not already installed
pip install hatch

# Clean any previous builds
rm -rf dist/

# Build the package
hatch build

This will create:

  • dist/vdl_tools-<version>-py3-none-any.whl (wheel distribution)
  • dist/vdl-tools-<version>.tar.gz (source distribution)

Publishing to PyPI

Prerequisites

  1. Install publishing tools:

    pip install twine
    
  2. Configure PyPI credentials:

    Option A - Using .pypirc file:

    # Create ~/.pypirc with your credentials
    cat > ~/.pypirc << EOF
    [distutils]
    index-servers = pypi
    
    [pypi]
    username = __token__
    password = <your-pypi-api-token>
    EOF
    

    Option B - Using environment variables:

    export TWINE_USERNAME=__token__
    export TWINE_PASSWORD=<your-pypi-api-token>
    

Publishing Process

  1. Test on PyPI Test (recommended first step):

    # Upload to test PyPI first
    twine upload --repository-url https://test.pypi.org/legacy/ dist/*
    
    # Test installation from test PyPI
    pip install --index-url https://test.pypi.org/simple/ vdl-tools
    
  2. Publish to production PyPI:

    # Upload to production PyPI
    twine upload dist/*
    

Complete Release Workflow

Here's the complete workflow for releasing a new version:

# 1. Ensure you're on the main branch and up to date
git checkout main
git pull origin main

# 2. Bump the version
hatch version patch  # or minor/major as appropriate

# 3. Commit the version bump
git add vdl_tools/__init__.py
git commit -m "Bump version to $(hatch version)"

# 4. Create a git tag
git tag "v$(hatch version)"

# 5. Build the package
rm -rf dist/
hatch build

# 6. Upload to test PyPI (optional but recommended)
twine upload --repository-url https://test.pypi.org/legacy/ dist/*

# 7. Upload to production PyPI
twine upload dist/*

# 8. Push changes and tags to GitHub
git push origin main
git push origin --tags

Verification

After publishing, verify the package is available:

# Check on PyPI
pip install vdl-tools==<new-version>

# Or upgrade existing installation
pip install --upgrade vdl-tools

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vdl_tools-0.0.5.tar.gz (23.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vdl_tools-0.0.5-py3-none-any.whl (23.4 MB view details)

Uploaded Python 3

File details

Details for the file vdl_tools-0.0.5.tar.gz.

File metadata

  • Download URL: vdl_tools-0.0.5.tar.gz
  • Upload date:
  • Size: 23.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.13

File hashes

Hashes for vdl_tools-0.0.5.tar.gz
Algorithm Hash digest
SHA256 1f249d506477170ffa6ee9d56d37e7c8e28647ed145d87d4c24d87b636322a6a
MD5 140a18a37a6791f0a0a08acf49ea0d0f
BLAKE2b-256 717801b06c8101b9e519908c44d458c3965be53b54cbd02990b74a2b999899eb

See more details on using hashes here.

File details

Details for the file vdl_tools-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: vdl_tools-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 23.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.13

File hashes

Hashes for vdl_tools-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 81a98d378703f12f595a6a21d2d04aab83dc38e71ce8530e4098028d6f444268
MD5 bdc875c79f4e370a280f5dee57c54e17
BLAKE2b-256 d66aca6b6376c0d9f1ff38950a9fc0bf81be0f2c1f70db00fa09ec5086abf50c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page