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

Test reorganization and some additional checks for integrity of created MinariStorage instances #75

Merged
merged 7 commits into from
May 28, 2023

Conversation

balisujohn
Copy link
Collaborator

@balisujohn balisujohn commented May 23, 2023

Description

  • Reorganizes the tests to reflect the directory structure of the module like in Gymnasium. *
  • Adds the helper function _check_data_integrity() to test_dataset_creation.py which makes sure a MinariStorage has actions consistent with its action space and observation consistent with its observation space, and makes sure there are the right number of episodes and they are the right length. _check_data_integrity() is added to the tests test_generate_dataset_with_external_buffer and test_generate_dataset_with_collector_env along with a few consistency checks on the MinariDatasetclass generated in each test.

Checklist:

  • I have run the pre-commit checks with pre-commit run --all-files (see CONTRIBUTING.md instructions to set it up)
  • I have run pytest -v and no errors are present.
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I solved any possible warnings that pytest -v has generated that are related to my code to the best of my knowledge.
  • 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

@balisujohn balisujohn changed the title Dev tests Test reorganization and some additional tests for integrity of created MinariStorage instances May 23, 2023
@balisujohn balisujohn changed the title Test reorganization and some additional tests for integrity of created MinariStorage instances Test reorganization and some additional checks for integrity of created MinariStorage instances May 23, 2023
@elliottower
Copy link
Contributor

To fix the pre-commit issues, try setting pyright hard coded to this version: [email protected]
(full file example:
https://github.com/elliottower/Shimmy/blob/37b1d4c81632e941a1f485d2421ccf7845b55211/.pre-commit-config.yaml)

@balisujohn balisujohn requested a review from younik May 26, 2023 19:01
Copy link
Member

@younik younik left a comment

Choose a reason for hiding this comment

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

LGTM

@younik younik merged commit eecde6c into Farama-Foundation:main May 28, 2023
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.

3 participants