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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ repos:
additional_dependencies: ["bandit[toml]"]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.10
rev: v0.16.5
hooks:
- id: ruff-format
- id: ruff
Expand Down
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,15 @@ The CLI is built on [typer](https://typer.tiangolo.com/). Each command group is

```python
"""My command description."""

from __future__ import annotations
from typing import Annotated, Optional
import typer
from roboflow.cli._compat import ctx_to_args

mycommand_app = typer.Typer(help="Do something", no_args_is_help=True)


@mycommand_app.command("list")
def list_things(
ctx: typer.Context,
Expand All @@ -100,6 +102,7 @@ def list_things(
args = ctx_to_args(ctx, project=project)
_list(args)


def _list(args) -> None:
from roboflow.cli._output import output, output_error, suppress_sdk_output

Expand All @@ -117,6 +120,7 @@ def _list(args) -> None:
2. Register in `roboflow/cli/__init__.py`:
```python
from roboflow.cli.handlers.mycommand import mycommand_app

app.add_typer(mycommand_app, name="mycommand")
```

Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ To use the Roboflow Python package, you first need to authenticate with your Rob

```python
import roboflow

roboflow.login()
```

Expand Down Expand Up @@ -164,10 +165,10 @@ workspace = rf.workspace()

# Export images matching a search query
workspace.search_export(
query="class:person", # search query (e.g. "tag:review", "class:dog", "*")
format="coco", # annotation format: coco, yolov8, yolov5, voc, etc.
dataset="my-project", # optional: limit to a specific project
location="./my-export", # optional: output directory
query="class:person", # search query (e.g. "tag:review", "class:dog", "*")
format="coco", # annotation format: coco, yolov8, yolov5, voc, etc.
dataset="my-project", # optional: limit to a specific project
location="./my-export", # optional: output directory
)
```

Expand Down
9 changes: 5 additions & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ To use the Roboflow Python package, you first need to authenticate with your Rob

```python
import roboflow

roboflow.login()
```

Expand Down Expand Up @@ -113,10 +114,10 @@ workspace = rf.workspace()

# Export images matching a search query
workspace.search_export(
query="class:person", # search query (e.g. "tag:review", "class:dog", "*")
format="coco", # annotation format: coco, yolov8, yolov5, voc, etc.
dataset="my-project", # optional: limit to a specific project
location="./my-export", # optional: output directory
query="class:person", # search query (e.g. "tag:review", "class:dog", "*")
format="coco", # annotation format: coco, yolov8, yolov5, voc, etc.
dataset="my-project", # optional: limit to a specific project
location="./my-export", # optional: output directory
)
```

Expand Down
Loading