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.4.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.4-py3-none-any.whl (23.4 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vdl_tools-0.0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 e615f4e892d4a21b4a73223a289df6a99722ebc3ecca091108b1ce64350ea14d
MD5 e283bfce4bc410776179846bc369ec47
BLAKE2b-256 f8549c2bc735a3056632e2b3cadcfed1bf054d8aa37679628db6ea3bb551cfa0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vdl_tools-0.0.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 98e2c9f261d56caa5968b53be09e717ab18b010262526e9ffe6acabfbf4a035b
MD5 f474dc027fc2d109dd5271e40e47e05c
BLAKE2b-256 0e76209f894794bcc44a0e0a49d930fb159dc70529e4cda1f46b2c0285552fe7

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