File size: 1,593 Bytes
13fe504
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
"""Typer application entrypoint for DataForge.



Each CLI subcommand is defined in its own module under ``dataforge.cli.*``

and registered here. The ``app`` object is the entry point referenced by

``[project.scripts]`` in ``pyproject.toml``.

"""

import typer

from dataforge.cli.audit import audit
from dataforge.cli.bench import bench
from dataforge.cli.constraints import constraints_app
from dataforge.cli.profile import profile
from dataforge.cli.quickstart import quickstart
from dataforge.cli.release import release_app
from dataforge.cli.repair import repair
from dataforge.cli.revert import revert
from dataforge.cli.watch import watch

app: typer.Typer = typer.Typer(
    help="DataForge - AI-powered data-quality detection and repair.",
    no_args_is_help=True,
)


@app.callback(invoke_without_command=True)
def _main(

    version: bool = typer.Option(

        False,

        "--version",

        "-V",

        help="Show version and exit.",

        is_eager=True,

    ),

) -> None:
    """DataForge - AI-powered data-quality detection and repair."""
    if version:
        from dataforge import __version__

        typer.echo(f"dataforge {__version__}")
        raise typer.Exit()


app.command(name="profile")(profile)
app.command(name="quickstart")(quickstart)
app.command(name="repair")(repair)
app.command(name="revert")(revert)
app.command(name="audit")(audit)
app.command(name="bench")(bench)
app.command(name="watch")(watch)
app.add_typer(constraints_app, name="constraints")
app.add_typer(release_app, name="release")