Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RSDK-9458] Remove 'Stream' from Camera interface I - cosmetic + test changes #4710

Merged
merged 3 commits into from
Jan 16, 2025

Conversation

randhid
Copy link
Member

@randhid randhid commented Jan 14, 2025

Making https://github.com/viamrobotics/rdk/pull/4691/files smaller so we can focus on actual changes.

@randhid randhid requested a review from seanavery January 14, 2025 13:56
@viambot viambot added the safe to test This pull request is marked safe to test from a trusted zone label Jan 14, 2025
@randhid randhid changed the title [RSDK-9458] Remove 'Stream' from Camera interface - cosmetic + test changes [RSDK-9458] Remove 'Stream' from Camera interface I - cosmetic + test changes Jan 14, 2025
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Jan 14, 2025
@randhid randhid requested a review from nicksanford January 14, 2025 15:12
@@ -95,6 +97,7 @@ func NewPinholeModelWithBrownConradyDistortion(pinholeCameraIntrinsics *transfor
return cameraModel
}

// NewVideoSourceFromReader is DEPRECATED!!! Please implement cameras according to the camera.Camera interface.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do the DEPRECATED comments work with staticcheck/linter in the RDK. Will linter fail or warn if code is added that uses the deprecated function?

Copy link
Member Author

@randhid randhid Jan 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the RPC or part of the RPC is deprecated in API - the linter will break, for this Deprecation string - I did not need to add "nolints" to the FFmpeg or webcam drivers to get the linter to pass, but that is based on rdk's tooling for its own linter. If a module has a more stringent linter that also checks the docstrings of the exported function somehow - I'd imagine that to break that go module's linter. I do not know if one such module exists.

@randhid randhid requested a review from seanavery January 16, 2025 00:35
@@ -22,7 +22,7 @@ import (
"go.viam.com/rdk/logging"
"go.viam.com/rdk/resource"
"go.viam.com/rdk/robot"
streamCamera "go.viam.com/rdk/robot/web/stream/camera"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alias name change here makes sense to me.

@@ -52,20 +47,6 @@ func (c *Camera) NextPointCloud(ctx context.Context) (pointcloud.PointCloud, err
return nil, errors.New("NextPointCloud unimplemented")
}

// Stream calls the injected Stream or the real version.
func (c *Camera) Stream(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Were none of our tests using injected camera Stream?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they were removed in a previous pr

@randhid randhid merged commit b6b0a96 into viamrobotics:main Jan 16, 2025
16 checks passed
@randhid randhid deleted the sean-pr-smaller branch January 16, 2025 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
safe to test This pull request is marked safe to test from a trusted zone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants