Skip to main content

Generate Excel deployment checklists from Dataform repositories

Project description

Dataform Deployment Checklist Exporter

A Python package for generating Excel deployment checklists from Dataform repositories with automatic status tracking.

Features

  • 🔍 Automatically scans all .sqlx files in Dataform repositories
  • 📊 Exports to formatted Excel with color-coded status
  • 🔄 Tracks changes: New, Existed, Deleted files
  • 🎨 Professional Excel formatting with conditional colors
  • 📦 Easy installation and distribution
  • 🚀 Command-line interface

Installation

From Source

cd scripts
pip install -e .

For Distribution (Create wheel)

cd scripts
python setup.py sdist bdist_wheel
pip install dist/dataform-checklist-1.0.0-py3-none-any.whl

Install on Another Machine

# Copy the wheel file to target machine, then:
pip install dataform-checklist-1.0.0-py3-none-any.whl

Usage

Command Line

After installation, use the dataform-checklist command:

# Basic usage
dataform-checklist /path/to/dataform/repo

# With version
dataform-checklist /path/to/dataform/repo -v v1.01.00

# With custom output path
dataform-checklist /path/to/dataform/repo -o /output/path -v v1.02.00

# With custom repository name
dataform-checklist /path/to/dataform/repo -n MyRepo -v v2.00.00

# Full options
dataform-checklist /path/to/repo -o /output -n WWIM -v v1.00.00

As Python Library

from dataform_checklist import DataformInventoryExporter

# Create exporter
exporter = DataformInventoryExporter(
    repository_path="/path/to/dataform/repo",
    output_path="/output/path",
    repository_name="WWIM",
    version="v1.00.00"
)

# Run export
exporter.run()

# Or use individual methods
files = exporter.scan_sqlx_files()
inventory = exporter.create_new_inventory(files)
exporter.export_to_excel(inventory)

Output

Filename Format

PTTEP_Dataform_Deployment_Checklist_{repository_name}_{version}.xlsx

Excel Structure

Index Path/Folder/Directory file_name status
1 dashboard_wwim ins_pbi_well_info.sqlx New
2 datamart_wwim ins_well_allocation.sqlx Existed
3 refined_wwim p2_refined_a_ann_barrier.sqlx Deleted

Status Colors

  • New 🟢 - LightGreen (#90EE90)
  • Existed 🔵 - LightBlue (#ADD8E6)
  • Deleted 🔴 - LightCoral (#F08080)

Distribution

Build Distributable Package

cd scripts
python setup.py sdist bdist_wheel

This creates:

  • dist/dataform-checklist-1.0.0.tar.gz (source)
  • dist/dataform-checklist-1.0.0-py3-none-any.whl (wheel)

Share with Team

  1. Copy wheel file to shared location or network drive
  2. Team members install with:
    pip install dataform-checklist-1.0.0-py3-none-any.whl
    
  3. Run from anywhere:
    dataform-checklist /path/to/repo
    

Upload to Internal PyPI (Optional)

If you have an internal PyPI server:

twine upload --repository internal dist/*

Then team members can install with:

pip install dataform-checklist --index-url http://your-pypi-server

Requirements

  • Python 3.7+
  • pandas >= 2.0.0
  • openpyxl >= 3.1.0

Examples

Local Development

# Install in editable mode for development
pip install -e .

# Run from anywhere
dataform-checklist ~/projects/dataform-repo

Production Use

# Install from wheel
pip install dataform-checklist-1.0.0-py3-none-any.whl

# Schedule daily exports
dataform-checklist /prod/dataform/repo -v "v1.$(date +%Y%m%d).0"

CI/CD Integration

# .github/workflows/checklist.yml
- name: Generate Deployment Checklist
  run: |
    pip install dataform-checklist-1.0.0-py3-none-any.whl
    dataform-checklist . -v "v${{ github.run_number }}.0.0"
    
- name: Upload Checklist
  uses: actions/upload-artifact@v3
  with:
    name: deployment-checklist
    path: PTTEP_Deployment_Checklist_*.xlsx

Uninstallation

pip uninstall dataform-checklist

License

Internal use only - PTTEP Data Engineering Team

Support

For issues or questions, contact the data engineering team.

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

dataform_checklist-1.2.2.tar.gz (88.7 kB view details)

Uploaded Source

Built Distribution

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

dataform_checklist-1.2.2-py3-none-any.whl (58.4 kB view details)

Uploaded Python 3

File details

Details for the file dataform_checklist-1.2.2.tar.gz.

File metadata

  • Download URL: dataform_checklist-1.2.2.tar.gz
  • Upload date:
  • Size: 88.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for dataform_checklist-1.2.2.tar.gz
Algorithm Hash digest
SHA256 c33c9bc2fc7d112440755c311b5293dc074b19879181b9bc0dc4b6924e7f9d0c
MD5 8b7e12f691c962e759ead0442c2cade5
BLAKE2b-256 37c0da59b8ed7a94b96bd5c503de94b1a85dce47e1ecefcaa40d36d9fcef9bf7

See more details on using hashes here.

File details

Details for the file dataform_checklist-1.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for dataform_checklist-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1921bc0ab1a14e3fcaaf3d24cf76df1bac3cbcf80b609467c8ffa322a653984f
MD5 3cd60bfd04fc08f02668bda15e3ebb0a
BLAKE2b-256 560f5d04916288ef87060f3fc013a5ba6f14baf77cff57cc15969fbb5ca0f147

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