Coverage for src/crump/cli.py: 100%

1"""Command-line interface for crump."""

2

3 import click

4

5 from crump import __version__

6 from crump.cli_extract import extract

7 from crump.cli_inspect import inspect

8 from crump.cli_prepare import prepare

9 from crump.cli_sync import sync

10

11

12@click.group()

13@click.version_option(version=__version__)

14@click.pass_context

15 def main(ctx: click.Context) -> None:

16 """Sync CSV and CDF science files into database.

17

18 This application provides tools for syncing scientific data files

19 into a database (PostgreSQL or SQLite) for analysis and storage.

20 """

21 ctx.ensure_object(dict)

22

23

24# Register commands

25 main.add_command(sync)

26 main.add_command(prepare)

27 main.add_command(inspect)

28 main.add_command(extract)