Skip to content

[#289] Fix initial data bug#290

Merged
Mark2000 merged 1 commit into
developfrom
bugfix/rewarder-initial-data
Jul 1, 2025
Merged

[#289] Fix initial data bug#290
Mark2000 merged 1 commit into
developfrom
bugfix/rewarder-initial-data

Conversation

@Mark2000

@Mark2000 Mark2000 commented Jul 1, 2025

Copy link
Copy Markdown
Contributor

Description

Closes #289

Fixes #289.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How should this pull request be reviewed?

  • By commit
  • All changes at once

How Has This Been Tested?

Added test.

Future Work

None.

Checklist

  • I have performed a self-review of my code
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation and release notes
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

Copilot AI review requested due to automatic review settings July 1, 2025 16:34

Copilot AI left a comment

Copy link
Copy Markdown

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 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.satellites has more than one satellite.
        assert mock_rewarder.data == 100

Comment thread src/bsk_rl/gym.py
Comment thread src/bsk_rl/gym.py

@LorenzzoQM LorenzzoQM 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.

Looks good!

@Mark2000
Mark2000 merged commit 92ed906 into develop Jul 1, 2025
5 checks passed
@Mark2000
Mark2000 deleted the bugfix/rewarder-initial-data branch July 1, 2025 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Initial data is not shared to the rewarder

3 participants