Skip to content

Commit

Permalink
Remove unnecessary utils (#22)
Browse files Browse the repository at this point in the history
* remove unnecessary utils

* remove ignores

* remove files

* revert

* add objectypefilter test

* update test

* update test

* fix test

* fix test

* add test
  • Loading branch information
chanwutk authored Sep 10, 2023
1 parent dbdfc3a commit 523056a
Show file tree
Hide file tree
Showing 17 changed files with 166 additions and 683 deletions.
4 changes: 0 additions & 4 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
ignore:
- "spatialyze/legacy"
- "spatialyze/video_processor/modules"
- "spatialyze/video_processor/stages/detection_estimation/*"
- "spatialyze/video_processor/stages/segment_trajectory/*"
- "spatialyze/video_processor/stages/strongsort_with_skip.py"
- "spatialyze/video_processor/utils/preprocess.py"
- "spatialyze/video_processor/utils/process_pipeline.py"
- "spatialyze/video_processor/utils/query_analyzer.py"
- "**/__init__.py"
4 changes: 0 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,4 @@ ignore = [
'spatialyze/video_processor/modules',
'spatialyze/video_processor/stages/detection_2d/ground_truth.py',
'spatialyze/video_processor/stages/detection_estimation',
'spatialyze/video_processor/stages/segment_trajectory/construct_segment_trajectory.py',
'spatialyze/video_processor/utils/process_pipeline.py',
'spatialyze/video_processor/utils/query_analyzer.py',
'spatialyze/video_processor/utils/preprocess.py',
]
4 changes: 3 additions & 1 deletion spatialyze/predicate.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,9 @@ class CastNode(PredicateNode):
expr: "PredicateNode"


def cast(expr: "PredicateNode", to: str) -> "CastNode":
def cast(expr: "Any", to: str) -> "CastNode":
if not isinstance(expr, PredicateNode):
expr = LiteralNode(expr, True)
return CastNode(to, expr)


Expand Down
39 changes: 0 additions & 39 deletions spatialyze/video_processor/actions/bbox2d_overlay.py

This file was deleted.

92 changes: 0 additions & 92 deletions spatialyze/video_processor/actions/save_video.py

This file was deleted.

64 changes: 0 additions & 64 deletions spatialyze/video_processor/actions/tracking2d_overlay.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,7 @@ def __init__(self, types: "list[str] | None" = None, predicate: "PredicateNode |
self.types = types

def __repr__(self) -> str:
return f"ObjectTypeFilter(types={self.types})"

def add_type(self, type: "str"):
self.types.append(type)
return f"ObjectTypeFilter(types={sorted(self.types)})"

def _run(self, payload: "Payload"):
detection_2d = Detection2D.get(payload)
Expand Down
Loading

0 comments on commit 523056a

Please sign in to comment.