Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions conftest.py
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
"""pytest configuration — add project src to Python path and skip rate limits."""

import os
import sys
from pathlib import Path
Expand Down
2 changes: 1 addition & 1 deletion references/ops-heartbeat-observations.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,7 +11,7 @@
- Notes: 130 passed in 2.94s

## 2026-06-10 workspace state
- Repo root discovered: C:\Users\jomie\Documents\Github\datamorph
- Repo root discovered: C:\Users\home\Documents\Github\datamorph
- Project type: Python
- Test runner: pytest
- No backend/service dependency present in project
Expand Down
24 changes: 6 additions & 18 deletions src/datamorph/cli.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -100,9 +100,7 @@ def convert_cmd(
@click.option("--from", "-f", "from_format", required=True, help="Source format")
@click.option("--to", "-t", "to_format", required=True, help="Target format")
@click.option("--pattern", default="*", help="File glob pattern (default: all files)")
@click.option(
"--recursive", "-r", is_flag=True, help="Search subdirectories recursively"
)
@click.option("--recursive", "-r", is_flag=True, help="Search subdirectories recursively")
@click.option("--csv-delimiter", default=",", help="CSV delimiter")
def batch_cmd(
input_dir: str,
Expand DownExpand Up@@ -151,9 +149,7 @@ def batch_cmd(

@cli.command()
@click.argument("file", type=click.Path(exists=True))
@click.option(
"--format", "-f", "fmt", default=None, help="File format (auto-detected if omitted)"
)
@click.option("--format", "-f", "fmt", default=None, help="File format (auto-detected if omitted)")
@click.option("--json-output", "-j", is_flag=True, help="Output schema as JSON")
@click.option(
"--sample",
Expand DownExpand Up@@ -224,9 +220,7 @@ def formats_cmd() -> None:

@cli.command()
@click.argument("file", type=click.Path(exists=True))
@click.option(
"--format", "-f", "fmt", default=None, help="File format (auto-detected if omitted)"
)
@click.option("--format", "-f", "fmt", default=None, help="File format (auto-detected if omitted)")
@click.option(
"--schema",
"-s",
Expand All@@ -240,12 +234,8 @@ def formats_cmd() -> None:
is_flag=True,
help="Strict mode: fail on type mismatches and missing fields",
)
@click.option(
"--max-rows", default=0, type=int, help="Maximum rows to validate (0 = all)"
)
@click.option(
"--json-output", "-j", is_flag=True, help="Output validation result as JSON"
)
@click.option("--max-rows", default=0, type=int, help="Maximum rows to validate (0 = all)")
@click.option("--json-output", "-j", is_flag=True, help="Output validation result as JSON")
def validate_cmd(
file: str,
fmt: str | None,
Expand DownExpand Up@@ -286,9 +276,7 @@ def validate_cmd(
console.print(json.dumps(output, indent=2))
else:
if result.valid:
console.print(
f"[green]✓ VALID[/green] — {result.rows_checked} rows checked"
)
console.print(f"[green]✓ VALID[/green] — {result.rows_checked} rows checked")
else:
console.print(f"[red]✗ INVALID[/red] — {result.rows_checked} rows checked")

Expand Down
Loading