Skip to content

test: update unit testrings for dataclass module#238

Merged
ktro2828 merged 1 commit into
mainfrom
test/dataclass
Dec 1, 2025
Merged

test: update unit testrings for dataclass module#238
ktro2828 merged 1 commit into
mainfrom
test/dataclass

Conversation

@ktro2828

@ktro2828 ktro2828 commented Dec 1, 2025

Copy link
Copy Markdown
Collaborator

What

This pull request introduces several improvements and fixes across the codebase, including a new test for the SemanticLabel class, type consistency updates, and minor code cleanups. The most important changes are summarized below:

Testing Enhancements:

  • Added a new test file test_label.py to verify the behavior and equality logic of the SemanticLabel class, including attribute checks and comparison operations.

Type Consistency and Imports:

  • Updated the import in test_trajectory.py to use the internal Quaternion type from t4_devkit.typing instead of the external pyquaternion library, improving consistency and reducing external dependencies.

Code Quality and Minor Fixes:

  • Moved the import of load_json in pointcloud.py to follow PEP8 import order, placing third-party and internal imports after standard library imports.
  • Changed the definition of the dynprop_states class variable in RadarPointCloud to explicitly convert the range to a list, ensuring consistent type usage.

Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
Copilot AI review requested due to automatic review settings December 1, 2025 14:04
@github-actions github-actions Bot added the ci Continuous Integration (CI) processes and testing label Dec 1, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR improves testing coverage and code quality across dataclass modules. The main focus is introducing a new test for the SemanticLabel class while also addressing type consistency and PEP8 compliance issues.

Key changes:

  • Added comprehensive unit tests for SemanticLabel class equality and comparison operations
  • Improved type consistency by switching from external pyquaternion.Quaternion to internal t4_devkit.typing.Quaternion
  • Fixed import ordering and type definition inconsistencies

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
tests/dataclass/test_label.py New test file verifying SemanticLabel initialization, properties, and equality comparisons
tests/dataclass/test_trajectory.py Updated import to use internal Quaternion type for consistency
t4_devkit/dataclass/pointcloud.py Fixed PEP8 import ordering and converted range to explicit list type

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/dataclass/test_label.py
Comment thread t4_devkit/dataclass/pointcloud.py
@github-actions

github-actions Bot commented Dec 1, 2025

Copy link
Copy Markdown
Contributor

☂️ Python Coverage

current status: ❌

Overall Coverage

Lines Covered Coverage Threshold Status
3971 3267 82% 50% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
t4_devkit/dataclass/pointcloud.py 40% 🔴
TOTAL 40% 🔴

updated for commit: 375afec by action🐍

1 similar comment
@github-actions

github-actions Bot commented Dec 1, 2025

Copy link
Copy Markdown
Contributor

☂️ Python Coverage

current status: ❌

Overall Coverage

Lines Covered Coverage Threshold Status
3971 3267 82% 50% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
t4_devkit/dataclass/pointcloud.py 40% 🔴
TOTAL 40% 🔴

updated for commit: 375afec by action🐍

@ktro2828 ktro2828 merged commit 2f7c80c into main Dec 1, 2025
4 of 5 checks passed
@ktro2828 ktro2828 deleted the test/dataclass branch December 1, 2025 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continuous Integration (CI) processes and testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants