[#289] Fix initial data bug#290
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR ensures that a satellite's pre-existing data_store data is correctly added to the rewarder during environment reset.
- Aggregates each satellite’s initial data into the rewarder in
reset() - Adds a unit test to verify initial data propagation
- Updates release notes to document the bug fix
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/unittest/test_gym_env.py | Initialize mock data and assert that rewarder.data is updated |
| src/bsk_rl/gym.py | Add self.rewarder.data += satellite.data_store.data in reset |
| docs/source/release_notes.rst | Note the fix for initial data now being added to rewarder |
Comments suppressed due to low confidence (1)
tests/unittest/test_gym_env.py:103
- [nitpick] Add a test case that verifies aggregation from multiple satellites to ensure the fix works when
env.satelliteshas more than one satellite.
assert mock_rewarder.data == 100
LorenzzoQM
reviewed
Jul 1, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Closes #289
Fixes #289.
Type of change
How should this pull request be reviewed?
How Has This Been Tested?
Added test.
Future Work
None.
Checklist