Skip to content

Windows support#276

Open
jeromekelleher wants to merge 11 commits intosgkit-dev:mainfrom
jeromekelleher:windows-support
Open

Windows support#276
jeromekelleher wants to merge 11 commits intosgkit-dev:mainfrom
jeromekelleher:windows-support

Conversation

@jeromekelleher
Copy link
Copy Markdown
Member

Stacked on #273

- Add windows-latest to python_test matrix (Python 3.11)
- Add platform marker to exclude cyvcf2 on Windows
- Add pytestmark skip-on-Windows to test files needing cyvcf2/bcftools
- Make cyvcf2 import lazy in tests/utils.py so non-cyvcf2 tests work
- Skip Miniconda/bcftools/plink setup on Windows
- Add Windows classifier
Add pytestmark skip-on-Windows to all test modules that reference the
VCF data cache or other dependencies not available on Windows.

Tests still running on Windows: test_calculate, test_cpython_interface,
test_plink, test_regions, test_samples, test_utils.
@jeromekelleher
Copy link
Copy Markdown
Member Author

I think this is worth doing - we're not getting an awful lot of test coverage on windows at the moment, but I think that's OK. Going forward we can think of better ways to test things, hopefully, which won't required conversion of VCFs in CI.

On Windows, _dup() shares the underlying OS handle rather than
creating an independent copy. When fclose() closes the dup'd FILE*,
it invalidates the original handle, causing an access violation when
Python later closes its file object. Since print_state is only a
debugging tool, exclude it on Windows via #ifndef _WIN32.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant