HeloiseS / hoki

Bridging the gap between observation and theory
https://heloises.github.io/hoki/intro.html
BSD 3-Clause "New" or "Revised" License
47 stars 8 forks source link

[BUG] Path values assume a UNIX system #84

Closed Krytic closed 1 year ago

Krytic commented 1 year ago

Describe the bug In, for example, hoki/constants.py, L159:

path_to_settings = data_path+'/settings.yaml'

On a Windows system, this will fail as the directory separator is \ in Windows environments.

This should be replaced with something like (from the standard library os):

path_to_settings = os.path.join(data_path, 'settings.yaml')

which will apply the right directory separator for the right OS.

To Reproduce n/a

Expected behavior n/a

Screenshots n/a

Desktop (please complete the following information): n/a

Additional context n/a

Krytic commented 1 year ago

Just to note, this issue isn't just limited to the constants module: it's everywhere Hoki needs to load files.