gafusion / omas

Ordered Multidimensional Array Structure
http://gafusion.github.io/omas
MIT License
30 stars 14 forks source link

Fix env var usage #281

Closed kripnerl closed 8 months ago

kripnerl commented 8 months ago

Changes:

Note:

Nevertheless, Windows compatibility was not tested since I do not have access to Windows at the moment.

orso82 commented 8 months ago

Regressions test fail. Sorry, I have never used pathlib and did not realize it does not behave like a standard string :/

ImportError: Failed to import test module: failed_imports
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/unittest/loader.py", line 428, in _find_test_path
    module = self._get_module_from_name(name)
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/unittest/loader.py", line 369, in _get_module_from_name
    __import__(name)
  File "/home/runner/work/omas/omas/omas/tests/failed_imports.py", line 45, in <module>
    if not os.path.exists(os.environ.get('AWS_CONFIG_FILE', pathlib.Path.home() + '/.aws/config')):
TypeError: unsupported operand type(s) for +: 'PosixPath' and 'str'
kripnerl commented 8 months ago

Regressions test fail. Sorry, I have never used pathlib and did not realize it does not behave like a standard string :/

ImportError: Failed to import test module: failed_imports
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/unittest/loader.py", line 428, in _find_test_path
    module = self._get_module_from_name(name)
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/unittest/loader.py", line 369, in _get_module_from_name
    __import__(name)
  File "/home/runner/work/omas/omas/omas/tests/failed_imports.py", line 45, in <module>
    if not os.path.exists(os.environ.get('AWS_CONFIG_FILE', pathlib.Path.home() + '/.aws/config')):
TypeError: unsupported operand type(s) for +: 'PosixPath' and 'str'

My bad - I was a bit confused by the suggestion :-). Hopefully, it's fixed now.

kripnerl commented 8 months ago

Btw pathlib is a very handy library - makes life much simpler!