grid: empty values in solid.txt file on Windows OS
pbrotoisworo opened this issue · comments
When running test_SET_grid.py
the test fails after running the solid_grid
function because the output solid.txt
file contains empty values (#12).
Sample of file with empty values:
# program solid -- UTC version -- 2018jun01
# year, month, day = 2020 12 25
# hour, minute, second = 14 7 44
# S, N, W, E = 33.479166795 33.800000000 -118.200000000 -117.796666828
# step_lat, num_lat = -0.009166663 35
# step_lon, num_lon = 0.009166663 44
, , , ,
, , , ,
, , , ,
, , , ,
etc...
@pbrotoisworo I just merged conda-forge/pysolid-feedstock#3 which will provide Windows builds of PySolid (should be able to install it in ~2 hours once their cloudfront cached updates) -- I suspect this issue has not been resolved (focused more on getting the build pipeline working). I'll check later (next week at the earliest), but if you want to test as well, that'd be great.
Likely the best solution for this would be to do #2 so I might poke at it at some point.
Sure. I can try running the tests this weekend and I'll share the results here.
Hello @jhkennedy and @yunjunz . The new update does not raise the error anymore due to empty solid.txt file.
I was able to try it on my personal device which is running Windows 10. I created a Python 3.8 environment and installed PySolid using conda install -c conda-forge pysolid
.
However I do get 'PySolid' is not recognized as an internal or external command, operable program or batch file.
after running the script. After poking around, I realized that Windows needs the absolute path of the image to open the file. I think relative paths don't work. So my suggestion is to also revise the code in both tests where it will open the figure. The revised code worked on my Windows machine and was able to open the figure automatically after the test:
PySolid/tests/test_SET_point.py
Line 42 in e9bad8e
To this:
os.system(os.path.abspath(out_fig))
Output:
This's great news. It confirms #19 from @jhkennedy does work on Windows, as noted in the conda-forge testing!
For the test script, I would suggest using the absolute path while defining out_fig
. @pbrotoisworo could you issue an PR for the two scripts?
PySolid/tests/test_SET_grid.py
Line 37 in e9bad8e
Close the issue as it's resolved.
Thank you @jhkennedy and @pbrotoisworo for the fixing and testing!