The _tests/envs/test_read_holmgardgym.py test fails on linux based filesystems. This is because linux based filesystems are "file-name case-sensitive".
Most Unix-style operating systems are case sensitive, meaning that a file called File1.txt is entirely distinct from one called file1.txt, and both can happily exist in the same folder (see source).
Mac OS X, like the classic Mac OS before it, is not case sensitive; it doesn't care whether you said File1.txt or file1.txt. (see source).
Windows file system treats file and directory names as case-insensitive. FOO.txt and foo.txt will be treated as equivalent files.
Linux file system treats file and directory names as case-sensitive. FOO.txt and foo.txt will be treated as distinct files (see source).
The failing test error: FileNotFoundError: [Errno 2] No such file or directory: '/home/***/***/gym-md/gym_md/envs/props/holmgard_0.json' is expected since the file name holmgard_0.json is not the same as the actual file name Holmgard_0.json.
Currently when the Setting(stage_name) object is created it takes in the _stagename which is used to load the respective .json props file. Thus if the _stagename is lowercase it will result in the lower-cased holmgard_0.json which results in the below error.
Modify the def read_settings(stage_name: str) -> PropsConfig static method within the gym_md/envs/setting.py file to cater for the case-sensitive file names. I will be opening a pull request (PR) shortly, with a potential fix.
Since Windows and Mac based operating systems are not case-sensitive we can make all the .json files within the props directory lower-cased. In other words, rename Holmgard_0.json to holmgard_0.json.
Overview
The _tests/envs/test_read_holmgardgym.py test fails on linux based filesystems. This is because linux based filesystems are "file-name case-sensitive".
The failing test error:
FileNotFoundError: [Errno 2] No such file or directory: '/home/***/***/gym-md/gym_md/envs/props/holmgard_0.json'
is expected since the file nameholmgard_0.json
is not the same as the actual file nameHolmgard_0.json
. Currently when theSetting(stage_name)
object is created it takes in the _stagename which is used to load the respective .json props file. Thus if the _stagename is lowercase it will result in the lower-casedholmgard_0.json
which results in the below error.Failing test output
Possible solutions
def read_settings(stage_name: str) -> PropsConfig
static method within thegym_md/envs/setting.py
file to cater for the case-sensitive file names. I will be opening a pull request (PR) shortly, with a potential fix.Holmgard_0.json
toholmgard_0.json
.