feat: Set up comprehensive Python testing infrastructure with Poetry #193
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Set Up Python Testing Infrastructure
Summary
This PR establishes a comprehensive testing infrastructure for the Velodyne TD3 reinforcement learning project. It introduces Poetry as the package manager and configures pytest with coverage reporting, making it easy for developers to write and run tests immediately.
Changes Made
Package Management
pyproject.tomlwith Poetry as the package managerTesting Configuration
pyproject.tomlwith:Directory Structure
Pytest Fixtures (in conftest.py)
temp_dir: Temporary directory for test filesmock_config: Mock configuration dictionarysample_state,sample_action,sample_batch: Test data fixturesmock_ros_node,mock_gazebo_services,mock_publishers,mock_subscribers: ROS-specific mocksdevice: PyTorch device fixturereset_random_seeds: Automatic seed reset for reproducibilityOther Improvements
.gitignore: Comprehensive exclusions for Python, testing, ROS, and PyTorch artifactsHow to Use
Install Dependencies
Run Tests
Writing Tests
tests/unit/ortests/integration/conftest.py@pytest.mark.unit,@pytest.mark.integration, etc.)Example Test
Notes
--cov-fail-under=80back to pytest optionsNext Steps
Developers can now immediately start writing tests for the existing codebase. The infrastructure is fully configured and ready to use.