In this PR I update otoole to fix failing tests on Windows.
Specifically this includes:
Explicitly setting all int as int64 data types when the config file is first read in. Im not sure why, but on Windows pandas seems to set int as int32, while on Linux it will set it as int64 (or is just not concerned about int32 vs. int64). Anyways, int64 is explicitly set now
Explicitly setting int64 for int datatypes in the results package (note, the config file dtypes are not accessible here)
Explicitly setting int64 for read_strategies of solvers
Specify the lineterminator argument as \n when writing to csv or datafiles, as Windows will default to \r\n. More information here
Fix NamedTemporaryFile calls in the tests on Windows. As this Stack Overflow comment and this Python docs states, to open a NamedTemporaryFile on Windows, you must set delete=False and then explicitly close and delete the file. Therefore, I have wrapped all NamedTemporaryFile calls in tests in tryfinally blocks, where the finally code closes and deletes the temporary file.
Description
In this PR I update
otoole
to fix failing tests on Windows.Specifically this includes:
int
asint64
data types when the config file is first read in. Im not sure why, but on Windows pandas seems to setint
asint32
, while on Linux it will set it asint64
(or is just not concerned aboutint32
vs.int64)
. Anyways,int64
is explicitly set nowint64
forint
datatypes in the results package (note, the config file dtypes are not accessible here)int64
forread_strategies
of solverslineterminator
argument as\n
when writing to csv or datafiles, as Windows will default to\r\n
. More information hereNamedTemporaryFile
calls in the tests on Windows. As this Stack Overflow comment and this Python docs states, to open aNamedTemporaryFile
on Windows, you must setdelete=False
and then explicitly close and delete the file. Therefore, I have wrapped allNamedTemporaryFile
calls in tests intry
finally
blocks, where thefinally
code closes and deletes the temporary file.Issue Ticket Number
Closes #202
Documentation
na