Metadata-Version: 2.4
Name: vdl-tools
Version: 0.0.4
Summary: VDL Tools
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Requires-Python: >=3.10
Requires-Dist: alembic<2.0.0,>=1.13.1
Requires-Dist: awscli<2.0.0,>=1.36.34
Requires-Dist: bokeh<4.0.0,>=3.6.1
Requires-Dist: boto3<2.0.0,>=1.35.93
Requires-Dist: cairosvg<3.0.0,>=2.6.0
Requires-Dist: circlify<1.0.0,>=0.15.0
Requires-Dist: dataclasses-json<1.0.0,>=0.6.3
Requires-Dist: datasets<4.0.0,>=3.1.0
Requires-Dist: geopy<3.0.0,>=2.3.0
Requires-Dist: geotext<1.0.0,>=0.4.0
Requires-Dist: google-api-python-client==2.166.0
Requires-Dist: google-auth-oauthlib<2.0.0,>=1.2.1
Requires-Dist: google-cloud-translate<4.0.0,>=3.11.0
Requires-Dist: igraph<1.0.0,>=0.11.8
Requires-Dist: instructor<2.0.0,>=1.7.0
Requires-Dist: jsonlines<5.0.0,>=4.0.0
Requires-Dist: jsonschema<5.0.0,>=4.17.3
Requires-Dist: markdown3-newtab<1.0.0,>=0.2.0
Requires-Dist: markdown<4.0.0,>=3.4.1
Requires-Dist: more-itertools<10.0.0,>=9.1.0
Requires-Dist: networkx<4.0.0,>=3.0
Requires-Dist: nltk<4.0.0,>=3.8.1
Requires-Dist: numpy<2.0.0,>=1.24.2
Requires-Dist: openai<2.0.0,>=1.57.0
Requires-Dist: openpyxl<4.0.0,>=3.1.1
Requires-Dist: pandas<2.0.0,>=1.5.3
Requires-Dist: plotly<6.0.0,>=5.24.1
Requires-Dist: psycopg2-binary<3.0.0,>=2.9.9
Requires-Dist: pysocks<2.0.0,>=1.7.1
Requires-Dist: pyyaml<7.0.0,>=6.0.1
Requires-Dist: regex<2023.0.0,>=2022.10.31
Requires-Dist: requests-cache<1.0.0,>=0.9.8
Requires-Dist: requests<3.0.0,>=2.32.3
Requires-Dist: scikit-learn==1.6.1
Requires-Dist: scikit-network<1.0.0,>=0.33.1
Requires-Dist: scipy<2.0.0,>=1.10.1
Requires-Dist: selenium~=4.22.0
Requires-Dist: sqlalchemy-utils<1.0.0,>=0.41.2
Requires-Dist: sqlalchemy<3.0.0,>=2.0.21
Requires-Dist: tiktoken<1.0.0,>=0.9.0
Requires-Dist: torch<2.0.0,>=1.13.1
Requires-Dist: transformers<5.0.0,>=4.26.1
Requires-Dist: treelib<2.0.0,>=1.7.0
Requires-Dist: umap<1.0.0,>=0.1.1
Requires-Dist: url-normalize<2.0.0,>=1.4.3
Requires-Dist: webdriver-manager<5.0.0,>=4.0.1
Requires-Dist: wikipedia-api<1.0.0,>=0.7.1
Requires-Dist: xlsxwriter<4.0.0,>=3.0.9
Description-Content-Type: text/markdown

# VDL Tools

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

## Tools

- [Network Tools](./vdl_tools/network-tools/)
- [LinkedIn](./vdl_tools/LinkedIn/) - Set of methods to interact with LinkedIn via CoreSignal API
- [Download Process Images](./vdl_tools/download_process_images) - Helper methods to download, convert and save images to S3 bucket
- [Py2Mappr](./vdl_tools/py2mappr) - Python wrapper for generating the OpenMappr player
- [Scrape Enrich](./vdl_tools/scrape_enrich/)
- [Tag2Network](./vdl_tools/tag2network/)
- [Shared Tools](./vdl_tools/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:

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](https://hatch.pypa.io/latest/) 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:**
   ```bash
   # 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):**
   ```bash
   # 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):

```bash
# 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:**
   ```bash
   pip install twine
   ```

2. **Configure PyPI credentials:**
   
   Option A - Using `.pypirc` file:
   ```bash
   # 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:
   ```bash
   export TWINE_USERNAME=__token__
   export TWINE_PASSWORD=<your-pypi-api-token>
   ```

#### Publishing Process

1. **Test on PyPI Test (recommended first step):**
   ```bash
   # 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:**
   ```bash
   # Upload to production PyPI
   twine upload dist/*
   ```

#### Complete Release Workflow

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

```bash
# 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:

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

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