Skip to content

Commit

Permalink
Frame extraction entrypoint. And draft names for others.
Browse files Browse the repository at this point in the history
  • Loading branch information
samcunliffe committed Nov 16, 2023
1 parent 674fd48 commit 85386f5
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
6 changes: 5 additions & 1 deletion crabs/bboxes_labelling/extract_frames_to_label_w_sleap.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ def argument_parser():
return parser.parse_args()


if __name__ == "__main__":
def main():
# parse input arguments
args = argument_parser()
logging.info("---------------------------")
Expand All @@ -565,3 +565,7 @@ def argument_parser():

# run frame extraction
compute_and_extract_frames_to_label(args)


if __name__ == "__main__":
main()
9 changes: 8 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,14 @@ dev = [
"setuptools_scm",
]

# [project.scripts]
[project.scripts]
# reencode-videos = "crabs."
extract-frames = "crabs.bboxes_labelling.extract_frames_to_label_w_sleap:main"
# combine-and-format-annotations
# verify-videos-and-extract-samples
# train-models
# evaluate-models

# startwazp = "wazp.app:startwazp"

[build-system]
Expand Down
9 changes: 9 additions & 0 deletions tests/test_unit/test_cli.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import os

import pytest


@pytest.mark.parametrize("cli_tool_name", ["extract-frames"])
def test_cli_args(cli_tool_name: str) -> None:
status = os.system(f"{cli_tool_name} --help")
assert status == 0

0 comments on commit 85386f5

Please sign in to comment.