Currently, when trying to run the GMT on Windows, we aren't able to call Docker since a shell script is being used to do this and Windows cannot run .sh files natively (typically, this is done with a batch script in Windows instead of shell). So, to get this to work on Windows we need a om_docker.bat version of this om_docker.sh.
Or it may be better practice to move some of the logic in that shell script to be run using Python in the GMT package and just use Python subprocess to call docker run, which seems to be the main part of the shell script that is calling docker:
So this either needs to change to call a batch file or another executable that will be recognizable on both operating systems (like docker run).
I'm happy to look into this and come up with something that will work on Windows.
@chriswmackey Yes, let's discuss. If we can do it all in Python and eliminate the shell script altogether I'd be delighted. The need for the shell script may have passed when we got pushed off JModelica.
Currently, when trying to run the GMT on Windows, we aren't able to call Docker since a shell script is being used to do this and Windows cannot run .sh files natively (typically, this is done with a batch script in Windows instead of shell). So, to get this to work on Windows we need a
om_docker.bat
version of this om_docker.sh.Or it may be better practice to move some of the logic in that shell script to be run using Python in the GMT package and just use Python
subprocess
to calldocker run
, which seems to be the main part of the shell script that is calling docker:https://github.com/urbanopt/geojson-modelica-translator/blob/develop/geojson_modelica_translator/modelica/lib/runner/om_docker.sh#L107
Whatever the case, calling a .sh file using Python
subprocess
as what happens on this line here will definitely fail in Windows: https://github.com/urbanopt/geojson-modelica-translator/blob/develop/geojson_modelica_translator/modelica/modelica_runner.py#L176So this either needs to change to call a batch file or another executable that will be recognizable on both operating systems (like
docker run
). I'm happy to look into this and come up with something that will work on Windows.