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

!Refactor PointCloud class for better handling of multi-count fields #15

Merged
merged 1 commit into from
May 15, 2024

Conversation

urasakikeisuke
Copy link
Collaborator

@urasakikeisuke urasakikeisuke commented May 15, 2024

This pull request refactors the PointCloud class to better support multi-count fields.

This PR has breaking changes

  • Renamed count parameter to counts in from_points() method.
  • Updated tests to reflect changes in PointCloud class.
  • Improved handling of multi-count fields in PointCloud class

- BREAKING CHANGE: Changed the way field names are generated when there is more than one count.
- BREAKING CHANGE: Renamed `count` property to `counts` and returns a tuple of counts for each field.
- BREAKING CHANGE: Modified the `fields` property to repeat fields if necessary based on the number of counts.
- BREAKING CHANGE: Modified the `types` property to repeat types if necessary based on the number of counts.
- Updated unit tests to include cases with multiple counts and ensured that the correct field names, types, and counts are returned.

Signed-off-by: urasakikeisuke <[email protected]>
@urasakikeisuke urasakikeisuke added the rd/fix Bug fix for the user, not a fix to a build script label May 15, 2024
@urasakikeisuke urasakikeisuke self-assigned this May 15, 2024
Copy link

github-actions bot commented May 15, 2024

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/pypcd4
   __init__.py20100% 
   _version.py11282%5–6
   pointcloud2.py591280%87–101
   pypcd4.py3893392%23–24, 107, 135, 188, 349–350, 572–594, 607–648, 658–659, 878, 898–899, 1022, 1025
TOTAL4614790% 

Tests Skipped Failures Errors Time
63 0 💤 0 ❌ 0 🔥 0.632s ⏱️

@urasakikeisuke urasakikeisuke merged commit 86ae71c into main May 15, 2024
10 checks passed
@urasakikeisuke urasakikeisuke deleted the refactor/multi-count-fields branch May 15, 2024 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rd/fix Bug fix for the user, not a fix to a build script rd/major
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant