Skip to content

Commit

Permalink
fixed bug
Browse files Browse the repository at this point in the history
  • Loading branch information
etai-shuchatowitz committed Nov 14, 2024
1 parent d237ca9 commit b500b71
Showing 1 changed file with 36 additions and 31 deletions.
67 changes: 36 additions & 31 deletions cli/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,42 @@ var app = &cli.App{
},
Action: DatasetDeleteAction,
},
{
Name: "export",
Usage: "download data from a dataset",
UsageText: createUsageText("dataset export",
[]string{dataFlagDestination, datasetFlagDatasetID}, true, datasetFlagIncludeJSONLines, dataFlagParallelDownloads),
Flags: []cli.Flag{
&cli.PathFlag{
Name: dataFlagDestination,
Required: true,
Usage: "output directory for downloaded data",
},
&cli.StringFlag{
Name: datasetFlagDatasetID,
Required: true,
Usage: "dataset ID of the dataset to be downloaded",
},
&cli.BoolFlag{
Name: datasetFlagIncludeJSONLines,
Required: false,
Usage: "option to include JSON Lines files for local testing",
Value: false,
},
&cli.UintFlag{
Name: dataFlagParallelDownloads,
Required: false,
Usage: "number of download requests to make in parallel",
Value: 100,
},
&cli.UintFlag{
Name: dataFlagTimeout,
Usage: "number of seconds to wait for large file downloads",
Value: 30,
},
},
Action: DatasetDownloadAction,
},
{
Name: "data",
Usage: "add or remove data from datasets",
Expand Down Expand Up @@ -850,37 +886,6 @@ var app = &cli.App{
},
},
},
{
Name: "download",
Usage: "download data from a dataset",
UsageText: createUsageText("dataset download",
[]string{datasetFlagDatasetID, datasetFlagName}, false),
Flags: []cli.Flag{
&cli.PathFlag{
Name: dataFlagDestination,
Required: true,
Usage: "output directory for downloaded data",
},
&cli.StringFlag{
Name: datasetFlagDatasetID,
Required: true,
Usage: "dataset ID of the dataset to be downloaded",
},
&cli.BoolFlag{
Name: datasetFlagIncludeJSONLines,
Required: false,
Usage: "option to include JSON Lines files for local testing",
Value: false,
},
&cli.UintFlag{
Name: dataFlagParallelDownloads,
Required: false,
Usage: "number of download requests to make in parallel",
Value: 100,
},
},
Action: DatasetDownloadAction,
},
},
},
{
Expand Down

0 comments on commit b500b71

Please sign in to comment.