cli[minor]: Add ipynb support, add text_splitters (#20963)

This commit is contained in:
Eugene Yurtsev
2024-04-29 10:11:21 -04:00
committed by GitHub
parent 5e0b6b3e75
commit d781560722
13 changed files with 2632 additions and 6525 deletions

View File

@@ -32,10 +32,15 @@ def cli():
default=None,
help="Output file for the migration script.",
)
def generic(pkg1: str, pkg2: str, output: str) -> None:
@click.option(
"--filter-by-all/--no-filter-by-all",
default=True,
help="Output file for the migration script.",
)
def generic(pkg1: str, pkg2: str, output: str, filter_by_all: bool) -> None:
"""Generate a migration script."""
click.echo("Migration script generated.")
migrations = generate_simplified_migrations(pkg1, pkg2)
migrations = generate_simplified_migrations(pkg1, pkg2, filter_by_all=filter_by_all)
if output is None:
output = f"{pkg1}_to_{pkg2}.json"