Skip to content

Latest commit

 

History

History
160 lines (111 loc) · 3.13 KB

File metadata and controls

160 lines (111 loc) · 3.13 KB

Tablassert YAML Migration Tool

Migrate Tablassert configuration YAML files from v4.4.0 schema to TC3 schema.

Quick Start

# Clone repository
git clone https://github.com/SkyeAv/Migratassert.git
cd Migratassert

# Enter development shell
nix develop -L .

# Run CLI
migratassert-cli --help

Usage (With Nix)

Method 1: Development Shell (Recommended)

Best for exploring Migratassert or active development.

# Clone and enter development shell
git clone https://github.com/SkyeAv/Migratassert.git
cd Migratassert
nix develop -L .

# CLI is now available
migratassert-cli -i ./v440_configs/ -o ./tc3_configs/

Method 2: Direct Run from Flake

Run without cloning or installing.

nix run github:SkyeAv/Migratassert#default -- -i ./v440_configs/ -o ./tc3_configs/

Method 3: User Profile Installation

Install persistently to your user environment.

# Install
nix profile install github:SkyeAv/Migratassert#default

# Use anywhere
migratassert-cli -i ./v440_configs/ -o ./tc3_configs/

Method 4: Use as Overlay

Integrate into your own Nix flake or NixOS configuration.

{
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
    migratassert.url = "github:SkyeAv/Migratassert";
  };

  outputs = { self, nixpkgs, migratassert }: {
    # Add overlay to nixpkgs
    pkgs = import nixpkgs {
      system = "x86_64-linux";
      overlays = [ migratassert.overlays.default ];
    };

    # Migratassert available as pkgs.python313Packages.migratassert
    devShells.default = pkgs.mkShell {
      packages = [ pkgs.python313Packages.migratassert ];
    };
  };
}

CLI Usage

Basic Migration

migratassert-cli -i ./v440_configs/ -o ./tc3_configs/

Dry Run (Preview)

migratassert-cli -i ./v440_configs/ -o ./tc3_configs/ --dry-run

Verbose Output

migratassert-cli -i ./v440_configs/ -o ./tc3_configs/ --verbose

Output Format

  • 2-space indentation (matching Tablassert conventions)
  • Clean YAML without flow style

Schema Changes

Block Renames

v4.4.0 TC3
location source
triple statement
attributes annotations
reindexing source.reindex

Field Renames

v4.4.0 TC3
encoding_method method
value_for_encoding encoding
in_this_organism taxon (integer)
classes_to_prioritize prioritize
classes_to_avoid avoid
substrings_to_remove remove
regular_expressions regex
explode_by_delimiter explode_by
value_for_comparison comparator
how_to_fill_column fill

New Fields

  • syntax: TC3 added at template root

Dropped Fields

  • when (reindexing) - no TC3 equivalent

Development

Run tests:

pytest tests/ -v

Run with coverage:

pytest tests/ --cov=migratassert --cov-report=term-missing

Contributors

Skye Lane Goetz - Institute for Systems Biology, CalPoly SLO

Gwênlyn Glusman - Institute for Systems Biology

Jared C. Roach - Institute for Systems Biology