Skip to main content

Reusable profiler and importer chassis for tabular migrations

Project description

migration_workbench

Reusable profiler and importer chassis for tabular workbook-to-app migrations.

PyPI: migration-workbenchpip install migration-workbench (import package migration_workbench uses underscores).

Using this project

As a library (recommended for product repos)
Add the Django apps you need to INSTALLED_APPS and wire URLs/commands in your Django project. Set DJANGO_SETTINGS_MODULE to your project’s settings module (not migration_workbench.settings) in production. Host apps typically depend on a released version, for example migration-workbench>=0.1.0,<1.

New product repository (scaffold)
From a sibling checkout of this repo:

make new-product PRODUCT=my-product   # writes ../my-product

Then cd ../my-product && make install && make migrate && make check. The scaffold includes backend/, Makefile, Dockerfile (installs migration-workbench from PyPI), scripts/entrypoint_product.sh, and SQLite/Fly-aligned settings (SQLITE_PATH, /healthz, WAL pragmas). Use --output-dir / --force on scripts/new_product.py for non-default paths.

Developing this repository (full chassis checkout)
Clone the repo and use an editable install so manage.py, docs examples, and make chassis-gate match upstream:

  1. python3 -m venv .venv
  2. .venv/bin/pip install -e ".[dev]" (build / twine are included for local wheels and manual PyPI uploads)
  3. . ./.env.example (or create .env)
  4. .venv/bin/python manage.py migrate
  5. make chassis-gate

Quickstart (install from PyPI)

For tooling and Django apps without cloning:

  1. python3 -m venv .venv
  2. .venv/bin/pip install "migration-workbench[dev]" (omit [dev] if you do not need pytest/black)
  3. Use wb on your PATH, or import apps (connectors, profiler, importer, workbook, deployment, …) from your own Django project.

If your index does not have a release yet, install from a local checkout instead: .venv/bin/pip install -e /path/to/migration-workbench.

Note: The bundled migration_workbench.settings resolves paths relative to the installed package; for deployments use your own settings module and database configuration.

Releases

Versions follow semantic versioning; 0.x may include breaking changes.

To publish a release:

  1. Bump version in pyproject.toml.
  2. Commit and push tag v + version (e.g. v0.1.0 must match version = "0.1.0").
  3. Configure Trusted Publishing on PyPI for this GitHub repository (see .github/workflows/publish-pypi.yml).
  4. The Publish package workflow uploads the sdist and wheel to PyPI.

Dry-run uploads can be done manually with twine upload --repository testpypi dist/* after python -m build, or make publish from a maintainer environment with credentials configured.

The [release] optional dependency remains available for minimal install surfaces that only need build / twine.

Core Commands

  • python manage.py pull_bundle --config docs/examples/live-config.example.json --output-dir /tmp/bundle
  • python manage.py snapshot_bundle --config docs/examples/offline-config.example.json --output-dir /tmp/bundle
  • python manage.py import_reference_example example_data --validate-only
  • python manage.py import_reference_example example_data

Profiling (Google Sheets, Drive, Coda) lives under manage.py; see docs/quickstart.md and docs/coda-runbook.md. Makefile targets profile-coda-preflight and profile-coda-corpus wrap the Coda smoke flows (CODA_CORPUS_CONFIG / CODA_CORPUS_OUT_DIR for the latter).

Schema scaffolding (workbook app): python manage.py scaffold_workbook_schema --bundle-config example_data/scaffold_workbook_bundle.example.json --table-profile example_data/scaffold_workbook_table_profile.example.json --out /tmp/schema-contract.yaml (writes YAML for product repos to refine into Django models; see docs/architecture.md).

Deployment control plane:

  • wb manifest lint --manifest deploy/spaces.yml
  • wb deploy <space> --env <preview|production> --dry-run

Deployment

  • Spec: docs/deployment-spec-v0.2.md
  • Acceptance criteria: docs/deployment-acceptance-criteria.md
  • Space manifest baseline: deploy/spaces.yml
  • Pipeline narrative: docs/pipeline.md

Database Modes

  • DB_ENGINE=sqlite (default)
  • DB_ENGINE=postgres with DB_NAME, DB_USER, DB_PASSWORD, DB_HOST, DB_PORT

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

migration_workbench-0.1.1.tar.gz (77.2 kB view details)

Uploaded Source

Built Distribution

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

migration_workbench-0.1.1-py3-none-any.whl (107.2 kB view details)

Uploaded Python 3

File details

Details for the file migration_workbench-0.1.1.tar.gz.

File metadata

  • Download URL: migration_workbench-0.1.1.tar.gz
  • Upload date:
  • Size: 77.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for migration_workbench-0.1.1.tar.gz
Algorithm Hash digest
SHA256 33af7a3d5c0fb65d6e72cf034588d32fd36138e1724337d4e3fcca8ddfbd9978
MD5 5d8e85589aa91a0387a93c6bdbddaae0
BLAKE2b-256 ed2e87e7bc9099ace39ee112e74caa14f3464900e839820596264b0236083649

See more details on using hashes here.

Provenance

The following attestation bundles were made for migration_workbench-0.1.1.tar.gz:

Publisher: publish-pypi.yml on MrAllatta/migration-workbench

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file migration_workbench-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for migration_workbench-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 32a3e9da90064131b4df682ff829f9255f0443f4f76ce2613a2593d32cd04a06
MD5 de6e09808b7df2d4e1d21fe8721984ad
BLAKE2b-256 73a7f6f7a3d5747f5e6d2396c6e76343c6d9679618420b6e9b14c53b35f41ddd

See more details on using hashes here.

Provenance

The following attestation bundles were made for migration_workbench-0.1.1-py3-none-any.whl:

Publisher: publish-pypi.yml on MrAllatta/migration-workbench

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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