Skip to main content

It's data based!

Project description

Limber Timber

It's data based!


status PyPI version Python Tests Last Commit License

pip install limber-timber

Overview

I am writing the migration system I always wanted but does not exist (yet).

Docs

https://Wopple.github.io/limber-timber

Roadmap

These are listed in rough priority order.

  • ✅ CLI
  • ✅ Publish to PyPI
  • ✅ Templating
  • ➡️ Documentation
  • ➡️ Unit Tests
    • ➡️ Templating
  • ➡️ JSON Schema
    • To validate and auto complete migration files in IDEs
  • ✅ In-memory Database
  • ✅ In-memory Metadata
  • ➡️ Big Query Database
    • ➡️ Create Snapshot Table
    • ➡️ Create Table Clone
  • ✅ Big Query Metadata
  • ✅ Database Adoption
  • ✅ Raise Unsupported Operations
  • ✅ Scan Topologically with Foreign Keys
  • ✅ Database Specific Validation
  • ➡️ Github Actions
    • ➡️ Release
  • ➡️ Grouped Operation Application
    • To reduce round trips with the backend and reduce migration time
  • ➡️ Expand Grouped Operations
    • To handle complex operations that do not have atomic support in the backend
  • ✅ Minimize Scan Output
  • ✅ Arbitrary DML SQL Migrations
  • ➡️ File System Metadata
  • ➡️ SQLite Database
  • ➡️ SQLite Metadata
  • ➡️ Postgres Database
  • ➡️ Postgres Metadata
  • ➡️ MySQL Database
  • ➡️ MySQL Metadata
  • ➡️ Optional Backend Installation
    • To minimize dependency bloat

Contribution

If you want to contribute, the roadmap is a good place to start. I will only accept contributions if:

  1. I agree with the design decisions
  2. The code style matches the existing code

It is highly recommended but not necessary to:

  1. Include unit tests

If you have any questions, you can reach out to me on discord.

Design Principles

  • The default behavior is safe and automated
  • The behavior can be configured to be fast and efficient
  • High flexibility to support future and unknown use-cases
  • Prefer supporting narrow use cases well rather than broad use cases poorly
  • Apply heavy importance to the Single Responsibility Principle
  • Put complex logic in easily tested functions

Code Style

  • 4-space indentation
  • Prefer single quotes
    • exceptions
      • pyproject.toml
      • docstrings
      • nested f-strings
  • Use newlines to visually separate blocks and conceptual groups of code
  • Include explicit else blocks
    • exceptions
      • assertive if-statements
  • Naming
    • balance brevity and clarity: say exactly what is needed
    • do not restate what is already clear from the context
  • Comments
    • dos
      • clarify confusing code
      • explain the 'why'
      • first try to explain with the code instead of a comment
    • do nots
      • make assumptions about the reader
      • state that which is explained by the nearby code
      • cover up for poor code
      • just because
  • Multiline strings use concatenated single line strings
    • exceptions
      • docstrings
  • No from my.module import *
    • instead: from my import module as md

Python Modules

liti.core.model

This module stores all the data models. The models are versioned, though currently there is only the one version. The hierarchy is roughly:

operation.ops > operation.data > schema > datatype

liti.core.model.v1.operation.data

These are the pure data operations. They are (de)serialized between the operation files and metadata.

liti.core.model.v1.operation.ops

These are the wrappers that enhance operations with behavior. There is a 1:1 relationship.

liti.core.model.v1.datatype

These are descriptions of column types.

liti.core.model.v1.schema

These are descriptions of tables and related constructs.

liti.core.backend

Both the database and the metadata can support different backends. You can even use different backends together. The backends deal in both the liti model and backend specific types adapting between the two.

liti.core.client

These are clients used by the backends. They solely deal in backend specific types with no dependencies on the liti model.

liti.core.base

This module has base classes for applying default values and validating the data. They are implemented using the Observer / Observable pattern so different backends can define their own behavior. Also implements the templating engine.

liti.core.runner

This module is for the runners associated with the various ways liti can be run. Main code will instantiate a runner and run it.

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

limber_timber-0.2.2.tar.gz (41.3 kB view details)

Uploaded Source

Built Distribution

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

limber_timber-0.2.2-py3-none-any.whl (52.9 kB view details)

Uploaded Python 3

File details

Details for the file limber_timber-0.2.2.tar.gz.

File metadata

  • Download URL: limber_timber-0.2.2.tar.gz
  • Upload date:
  • Size: 41.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.12.2 Darwin/24.6.0

File hashes

Hashes for limber_timber-0.2.2.tar.gz
Algorithm Hash digest
SHA256 bd92bb7d27f69e6e206f945884a39e832053928876718d10e04ca0e36c9fa03a
MD5 447ec8befaec817160286ed0967de96a
BLAKE2b-256 a3e52f532f849c5cf3457a32afa8f93c7d46821613b294dd82ea87f262d97a31

See more details on using hashes here.

File details

Details for the file limber_timber-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: limber_timber-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 52.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.12.2 Darwin/24.6.0

File hashes

Hashes for limber_timber-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8f74726cf606211fe44576557f83b8c767e4c9cf18c394417eb7f5e31b50b5b6
MD5 e4933bed91cad7a3ba818b18d01d81be
BLAKE2b-256 cf8d3f9777b8f15127bb47ece6ce069cf73d10cc053c9d862778075dae0bea00

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