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

Bugfix/18 fix retasking format #92

Merged
merged 2 commits into from
Dec 5, 2023
Merged

Conversation

Mark2000
Copy link
Contributor

@Mark2000 Mark2000 commented Dec 5, 2023

Description

Closes #18

Refactors #90 to use a member variable to record if retaking is required, as opposed to an info flag that messes up the format of the info dictionary. Instead, the list of satellites needing retaking is returned as a new list in the info dictionary.

Example usage:

            actions = [
                policy.act(obs) if sat.id in info["requires_retasking"] else None
                for sat, obs in zip(satellites, observation)
            ]

To preserve git history, a revert commit for the previous implantation is included, and a new commit with the new method is added.

How should this pull request be reviewed?

  • By commit
  • All changes at once

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 Has This Been Tested?

Please describe the tests that you ran to verify your changes.

  • Unit tests (General Environment only) pytest --cov bsk_rl/envs/general_satellite_tasking --cov-report term-missing tests/unittest
  • Integrated tests (General Environment only) pytest --cov bsk_rl/envs/general_satellite_tasking --cov-report term-missing tests/integration

Test Configuration

  • Python: 3.10.11
  • Basilisk: 2.2.1b
  • Platform: MacOS 13.3

Checklist:

  • My code follows the style guidelines of this project (passes Black, ruff, and isort)
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • Commit messages are atomic, are in the form Issue #XXX: Message and have a useful message
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Copy link
Contributor

@LorenzzoQM LorenzzoQM left a comment

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 5615268 into develop Dec 5, 2023
8 checks passed
@Mark2000 Mark2000 deleted the bugfix/18-fix-retasking-format branch December 5, 2023 17:29
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.

Retasking setting for general environment
2 participants