VDL Tools
Project description
VDL Tools
This repository contains a set of tools which are used at Vibrant Data Labs.
Tools
- Network Tools
- LinkedIn - Set of methods to interact with LinkedIn via CoreSignal API
- Download Process Images - Helper methods to download, convert and save images to S3 bucket
- Py2Mappr - Python wrapper for generating the OpenMappr player
- Scrape Enrich
- Tag2Network
- Shared 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:
- Add the package to
pyproject.tomlfile, to the[dependencies]section - 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:
-
Manual version update:
# Edit vdl_tools/__init__.py and update the __version__ string # For example, change from "0.0.2" to "0.0.3"
-
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
-
Install publishing tools:
pip install twine
-
Configure PyPI credentials:
Option A - Using
.pypircfile:# 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
-
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
-
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vdl_tools-0.0.3.tar.gz.
File metadata
- Download URL: vdl_tools-0.0.3.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4189c6ebe4280bbf6224c82b34ba3969a45ff61a0a2df23874cc24ec4550052
|
|
| MD5 |
2dacbaa1bb320075e053e69a0609e9e9
|
|
| BLAKE2b-256 |
c803589d788ba7180826de22c37b3f1e8c7c95c7b757803e43efbf92ef3d72dd
|
File details
Details for the file vdl_tools-0.0.3-py3-none-any.whl.
File metadata
- Download URL: vdl_tools-0.0.3-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e3bc050278598aff4de53dd0cb866182f39b7485bc26550ac1dfb936b5fe70c7
|
|
| MD5 |
ac3937a399f9bed8c7a9d16357ef80b2
|
|
| BLAKE2b-256 |
fa03aa9b97a717f250cf92106d535aae99c20bbae996efbbce3cc72f66aa20ac
|