Skip to main content

migration-tools

A Python toolkit for data migration validation, preflight checks, and reporting.

Install

pip install migration-tools

Quick start

from migration_tools import (
    setup_logger,
    load_dataset,
    load_mapper,
    init_outputs,
    run_preflight_checks,
    check_output_date_formats,
    run_date_correlation_check,
    write_outputs,
    print_summary,
    generate_html_report,
)

logger = setup_logger(log_dir="logs")

data      = load_dataset("dataset1.xlsx", logger=logger)
migration = load_mapper("mapper.xlsx", logger=logger)
output_success, output_failed = init_outputs(migration)

# Pre-flight: column presence, mapping coverage, date format
run_preflight_checks(
    data,
    migration,
    date_columns=["Datevalue", "Datevalue"],
    date_format="%d.%m.%Y",
    logger=logger,
)

# ... your conversion loop ...

# Post-conversion checks
check_output_date_formats(output_success, date_format="%d.%m.%Y", logger=logger)
run_date_correlation_check(output_success, logger=logger)

# Write outputs and summary
output_zucc, output_fail = write_outputs(output_success, output_failed, "dataset1", logger)
print_summary(len(data), len(output_success), len(output_failed), output_zucc, output_fail, 12.4, logger)

# Generate HTML report
generate_html_report(
    dataset_name="dataset1",
    total_rows=len(data),
    success_count=len(output_success),
    failed_count=len(output_failed),
    execution_time=12.4,
    output_success=output_success,
    output_failed=output_failed,
    logger=logger,
)

CLI

# Run preflight checks only
migration-tools validate --dataset dataset1.xlsx --mapper mapper.xlsx

# Validate and generate an HTML report
migration-tools report --dataset dataset1.xlsx --mapper mapper.xlsx --format html

# Validate and generate an Excel report
migration-tools report --dataset dataset1.xlsx --mapper mapper.xlsx --format excel

# Both formats at once
migration-tools report --dataset dataset1.xlsx --mapper mapper.xlsx --format both

# Custom date columns and format
migration-tools validate \
    --dataset dataset1.xlsx \
    --mapper mapper.xlsx \
    --date-cols PaatosPaiva VoimassaolonAlkamisPaiva \
    --date-format "%d.%m.%Y"

Supported file formats

File Formats supported
Dataset .xlsx, .csv, .json
Mapper .xlsx, .json

What gets validated

Check When
Required columns present in dataset Pre-flight
Mapping coverage (all value combos have a mapper row) Pre-flight
Source date format Pre-flight
Near-duplicate / whitespace column names Pre-flight
Output date format after transformation Post-conversion
Decision_FromDate ≤ Decision_ToDate Post-conversion
Actualization_Date matches Decision_FromDate Post-conversion

Publishing a new version

  1. Bump version in pyproject.toml and __init__.py
  2. Commit and push to main
  3. Create a GitHub Release — CI will build and publish to PyPI automatically

Development

git clone https://github.com/yourname/migration-tools
cd migration-tools
pip install -e ".[dev]"
pytest tests/ -v --cov=migration_tools

License

MIT

Metadata

Release files for Autom8s 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Autom8s 0.1.3
File Size Uploaded Provenance
autom8s-0.1.3.tar.gz 14.3 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for Autom8s 0.1.3
File Interpreter ABI Platform
autom8s-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 29.6 kB

Release files / autom8s-0.1.3.tar.gz

Download URL autom8s-0.1.3.tar.gz
Size 14.3 kB
Tags Source
SHA-256 checksum
How to use checksums
6c234e39bcc1d7dc68e7e4c6ca2c20f351bdbc9edd9a24422a27e863092aa3e9
BLAKE2b-256 checksum
How to use checksums
eb704ab26fdb84ba6c6c713fb2115cf853dd7d6a2d10019a5aec3d1a2424a719
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 10, 2026.

Transparency log

Release files / autom8s-0.1.3-py3-none-any.whl

Download URL autom8s-0.1.3-py3-none-any.whl
Size 15.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
61256baba4a9f5ba854466142204f1a2d9656d2e105518cab422317385ec2ad2
BLAKE2b-256 checksum
How to use checksums
810513fdbf5b5aaafa3d098e6b3417caff1c8def228f2c4e389fdfe76fb2785a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 10, 2026.

Transparency log

Security for Autom8s 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for autom8s-0.1.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 10, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page