-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
handle mismatch between brain and metacurriculum #3034
Conversation
@@ -32,9 +32,9 @@ def __init__(self, curriculum_folder: str): | |||
try: | |||
for curriculum_filename in os.listdir(curriculum_folder): | |||
# This process requires JSON files | |||
if not curriculum_filename.lower().endswith(".json"): | |||
brain_name, extension = os.path.splitext(curriculum_filename) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So far I don't think this has tripped anybody up. But the old behavior would mean that a brain with a .
in the name wouldn't be able to match up with the metacurriculum, because curriculum_filename.split(".")[0]
would take the only the filename up to the first .
instead of the last one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Oh wait, except for the failing tests.
Tested manually by renaming a WallJump curriculum file, also added unit tests.