care icon indicating copy to clipboard operation
care copied to clipboard

Add boundary based validation

Open JahnabDutta opened this issue 1 year ago • 1 comments

Proposed Changes

  • Change request body to /opearate_asset api to contain id of boundary-AssetBed realated to the given AssetBed and current CameraState.
  • Added validate_action in OnvifAsset to validate and kind of relativeMove, if the movement is within the range.
  • Changed handle_action in OnvifAsset to ensure additional parameters in the request body do not affect the handle_action function.
  • Created dummy validate_action in other asset integration modules for future use

Associated Issue

Merge Checklist

  • [x] Tests added/fixed
  • [ ] Update docs in /docs
  • [x] Linting Complete
  • [ ] Any other necessary step

Only PR's with test cases included and passing lint and test pipelines will be reviewed

@coronasafe/care-backend-maintainers @coronasafe/care-backend-admins

JahnabDutta avatar Jul 14 '23 06:07 JahnabDutta

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (7273298) 60.43% compared to head (91e53d0) 60.75%.

Files Patch % Lines
care/utils/assetintegration/onvif.py 76.47% 2 Missing and 2 partials :warning:
care/utils/assetintegration/base.py 50.00% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1453      +/-   ##
==========================================
+ Coverage   60.43%   60.75%   +0.32%     
==========================================
  Files         210      210              
  Lines       11473    11493      +20     
  Branches     1630     1634       +4     
==========================================
+ Hits         6934     6983      +49     
+ Misses       4307     4268      -39     
- Partials      232      242      +10     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Nov 15 '23 03:11 codecov[bot]