-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows Compatibility #1296
Comments
shanaxel42
changed the title
Starfish supports Windows, Linux, and OSX, and can be installed through pip or conda
Windows Compatibility
May 7, 2019
If we decide to support Windows, need to...
|
ttung
pushed a commit
that referenced
this issue
Aug 26, 2019
ttung
pushed a commit
to spacetx/slicedimage
that referenced
this issue
Aug 27, 2019
Windows does not like binding to 0.0.0.0 (all interfaces on POSIX systems). Bind to 127.0.0.1, which works. Test plan: pass on Windows. Part of spacetx/starfish#1296
This was referenced Aug 27, 2019
ttung
pushed a commit
to spacetx/slicedimage
that referenced
this issue
Aug 27, 2019
We have a mechanism for tracking multiple context managers for unit test setup and teardown. For unwinding them context managers, we should unwind them in the reverse order they are created. On POSIX systems, this does not matter, as we can hold file handles to files that are deleted. However, on Windows, the ordering is critical as one cannot delete files that are still held open. In the case where we create a temporary directory, and then spin up a http server to listen to requests at that directory, we need to kill the process _before_ we clean up the temporary directory. Test plan: works on windows Part of spacetx/starfish#1296
ttung
pushed a commit
to spacetx/slicedimage
that referenced
this issue
Aug 27, 2019
It's not possible on Windows, with standard filesystem calls, to open the same file twice. Reentrant tests on the disk backend requires that behavior, so this disables the test on Windows. Test plan: Windows! Part of spacetx/starfish#1296
ttung
pushed a commit
to spacetx/slicedimage
that referenced
this issue
Aug 27, 2019
It's not possible on Windows, with standard filesystem calls, to open the same file twice. Reentrant tests on the disk backend requires that behavior, so this disables the test on Windows. Test plan: Windows! Part of spacetx/starfish#1296
This was referenced Aug 27, 2019
ttung
pushed a commit
to spacetx/slicedimage
that referenced
this issue
Aug 29, 2019
We have a mechanism for tracking multiple context managers for unit test setup and teardown. For unwinding them context managers, we should unwind them in the reverse order they are created. On POSIX systems, this does not matter, as we can hold file handles to files that are deleted. However, on Windows, the ordering is critical as one cannot delete files that are still held open. In the case where we create a temporary directory, and then spin up a http server to listen to requests at that directory, we need to kill the process _before_ we clean up the temporary directory. Test plan: works on windows Part of spacetx/starfish#1296
ttung
pushed a commit
to spacetx/slicedimage
that referenced
this issue
Aug 29, 2019
It's not possible on Windows, with standard filesystem calls, to open the same file twice. Reentrant tests on the disk backend requires that behavior, so this disables the test on Windows. Test plan: Windows! Part of spacetx/starfish#1296
ttung
pushed a commit
to spacetx/slicedimage
that referenced
this issue
Aug 29, 2019
Windows does not like binding to 0.0.0.0 (all interfaces on POSIX systems). Bind to 127.0.0.1, which works. Test plan: pass on Windows. Part of spacetx/starfish#1296
ttung
pushed a commit
to spacetx/slicedimage
that referenced
this issue
Aug 29, 2019
In our caching tests, we create a temporary directory, and then initialize a cache in that temporary directory. The issue is that the cache handle holds an open file handle, and on Windows, the cleanup of the temporary directory fails if the cache handle still exists. The fix is to add a context manager to remove the cache handle. Test plan: works on windows Part of spacetx/starfish#1296
ttung
pushed a commit
to spacetx/slicedimage
that referenced
this issue
Aug 30, 2019
Use Pathlib's `as_uri()` method, which is cross-platform. Test plan: `make test` Part of spacetx/starfish#1296
ttung
pushed a commit
to spacetx/slicedimage
that referenced
this issue
Aug 30, 2019
It's not possible, using python stdlib, to open a file in Windows for write and read simultaneously. A common idiom in the test code is to set up a temporary file using `with tempfile.NamedTemporaryFile()`, write some content to it, and then switch to the test code, and then cleaning up the temp file when the `with` statement goes out of scope. This is incompatible with Windows, so we instead just create the temporary file, write out the necessary contents, and then close it (and not delete it). We rely on the temporary directory cleanup to ensure that the files eventually get cleaned up. On the */test_disk_backend.py, we were not using a temporary directory, so we add that. Test plan: works on windows Part of spacetx/starfish#1296
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Objective:
I can't be a user of starfish unless it supports my operating system
ACs:
Validation
Notes
The text was updated successfully, but these errors were encountered: