Skip to content
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

chore(ci): Add Windows test job #1113

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

effigies
Copy link
Collaborator

No idea how tied we are to posix. Probably pretty tightly, but there's no reason in principle it couldn't be undone.

xref #1111

@effigies
Copy link
Collaborator Author

Looks like actually a fairly manageable job. @kaare-mikkelsen, would you be interested in having a go at adding Windows support?

@kaare-mikkelsen
Copy link

Hi @effigies
Well, yes and no :) I would like it to happen, and am not averse to contributing to a good tool. But I would probably also have to learn a bit more about how to contribute to pybids, and would have to find the time. I doubt that I will have much opportunity until end of january (I'm heading into exams season, and am presently buried in reports that need grading).
It sounded like you already looked at what would likely need to be done. Can you add a few pointers here?

@Remi-Gau
Copy link
Contributor

@kaare-mikkelsen

My approach at this would be to first fix the failing tests from this run: https://github.com/bids-standard/pybids/actions/runs/12323508594/job/34399274262?pr=1113

I listed them below

  FAILED src/bids/layout/tests/test_layout.py::test_nested_include_exclude_with_regex - AssertionError: assert not <BIDSJSONFile filename='D:\a\pybids\pybids\tests...
  FAILED src/bids/layout/tests/test_layout.py::test_get_metadata_error - assert "Metadata term 'Missing' unavailable for file D:\\a\\pybids\\pybids\...
  FAILED src/bids/layout/tests/test_layout.py::test_ignore_files - AssertionError: assert 'D:\\a\\pybids\\pybids\\tests\\data\\ds005\\models\\...
  FAILED src/bids/layout/tests/test_layout.py::test_nested_include_exclude - re.error: bad escape \e at position 8
  FAILED src/bids/layout/tests/test_layout.py::test_indexed_file_associations - AssertionError: assert {'D:\\a\\pybi...hysio.tsv.gz'} == {'D:\\a\\pybi...hy...
  FAILED src/bids/layout/tests/test_layout.py::test_indexer_patterns[sub-01/anat/sub-01_T1w.nii.gz] - ValueError: 'D:\\home\\user\\.cache\\data\\sub-01\\anat\\sub-01_T1w.nii.gz'...
  FAILED src/bids/layout/tests/test_layout.py::test_indexer_patterns[.datalad] - ValueError: 'D:\\home\\user\\.cache\\data\\.datalad' is not in the subpath ...
  FAILED src/bids/layout/tests/test_layout.py::test_indexer_patterns[code] - ValueError: 'D:\\home\\user\\.cache\\data\\code' is not in the subpath of '...
  FAILED src/bids/layout/tests/test_layout.py::test_indexer_patterns[sub-01/.datalad] - ValueError: 'D:\\home\\user\\.cache\\data\\sub-01\\.datalad' is not in the ...
  FAILED src/bids/layout/tests/test_models.py::test_tag_init - assert (True and 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\pytest-of-r...
  FAILED src/bids/layout/tests/test_path_building.py::test_path_building_in_raw_scope[micr_SPIM] - AssertionError: assert 'D:/a/pybids/...-A_photo.json' == 'D:\\a\\pybid...-A...
  FAILED src/bids/layout/tests/test_path_building.py::test_path_building_in_raw_scope[asl001] - AssertionError: assert 'D:/a/pybids/...b103_T1w.json' == 'D:\\a\\pybid...b1...
  FAILED src/bids/layout/tests/test_path_building.py::test_path_building_in_raw_scope[asl002] - AssertionError: assert 'D:/a/pybids/...b103_T1w.json' == 'D:\\a\\pybid...b1...
  FAILED src/bids/layout/tests/test_path_building.py::test_path_building_in_raw_scope[asl003] - AssertionError: assert 'D:/a/pybids/...Sub1_T1w.json' == 'D:\\a\\pybid...Su...
  FAILED src/bids/layout/tests/test_path_building.py::test_path_building_in_raw_scope[asl004] - AssertionError: assert 'D:/a/pybids/...Sub1_T1w.json' == 'D:\\a\\pybid...Su...
  FAILED src/bids/layout/tests/test_path_building.py::test_path_building_in_raw_scope[asl005] - AssertionError: assert 'D:/a/pybids/...b103_T1w.json' == 'D:\\a\\pybid...b1...
  FAILED src/bids/layout/tests/test_path_building.py::test_path_building_in_raw_scope[pet001] - AssertionError: assert 'D:/a/pybids/...s-01_T1w.json' == 'D:\\a\\pybid...s-...
  FAILED src/bids/layout/tests/test_path_building.py::test_path_building_in_raw_scope[pet002] - AssertionError: assert 'D:/a/pybids/...line_T1w.json' == 'D:\\a\\pybid...li...
  FAILED src/bids/layout/tests/test_path_building.py::test_path_building_in_raw_scope[pet003] - AssertionError: assert 'D:/a/pybids/...es-01_T1w.nii' == 'D:\\a\\pybid...es...
  FAILED src/bids/layout/tests/test_path_building.py::test_path_building_in_raw_scope[pet004] - AssertionError: assert 'D:/a/pybids/...b-01_pet.json' == 'D:\\a\\pybid...b-...
  FAILED src/bids/layout/tests/test_path_building.py::test_path_building_in_raw_scope[pet005] - AssertionError: assert 'D:/a/pybids/...line_T1w.json' == 'D:\\a\\pybid...li...
  FAILED src/bids/layout/tests/test_path_building.py::test_path_building_in_raw_scope[qmri_megre] - AssertionError: assert 'D:/a/pybids/...01_MEGRE.json' == 'D:\\a\\pybid...01...
  FAILED src/bids/layout/tests/test_path_building.py::test_path_building_in_raw_scope[qmri_tb1tfl] - AssertionError: assert 'D:/a/pybids/...t_TB1TFL.json' == 'D:\\a\\pybid...t_...
  FAILED src/bids/layout/tests/test_path_building.py::test_path_building_in_raw_scope[eeg_cbm] - AssertionError: assert 'D:/a/pybids/..._channels.tsv' == 'D:\\a\\pybid..._c...
  FAILED src/bids/layout/tests/test_path_building.py::test_path_building_in_raw_scope[ieeg_filtered_speech] - AssertionError: assert 'D:/a/pybids/...rdsystem.json' == 'D:\\a\\pybid...rd...
  FAILED src/bids/layout/tests/test_path_building.py::test_path_building_in_raw_scope[ieeg_visual_multimodal] - AssertionError: assert 'D:/a/pybids/...3t01_T1w.json' == 'D:\\a\\pybid...3t...
  FAILED src/bids/layout/tests/test_path_building.py::test_bold_construction - AssertionError: assert 'sub-01/func/...1_bold.nii.gz' == 'sub-01\\func...1_...
  FAILED src/bids/layout/tests/test_path_building.py::test_path_building_in_raw_scope[ds000248] - AssertionError: assert 'D:/a/pybids/...01_FLASH.json' == 'D:\\a\\pybid...01...
  FAILED src/bids/layout/tests/test_path_building.py::test_path_building_on_derivative_examples[qmri_irt1] - AssertionError: assert 'D:/a/pybids/...01_M0map.json' == 'D:\\a\\pybid...01...
  FAILED src/bids/layout/tests/test_path_building.py::test_path_building_on_derivative_examples[qmri_mese] - AssertionError: assert 'D:/a/pybids/...01_M0map.json' == 'D:\\a\\pybid...01...
  FAILED src/bids/layout/tests/test_layout.py::test_get_file - AssertionError: assert None
  FAILED src/bids/layout/tests/test_path_building.py::test_path_building_on_derivative_examples[qmri_mp2rage] - AssertionError: assert 'D:/a/pybids/...-1_T1map.json' == 'D:\\a\\pybid...-1...
  FAILED src/bids/layout/tests/test_path_building.py::test_path_building_on_derivative_examples[qmri_mp2rageme] - AssertionError: assert 'D:/a/pybids/...2starmap.json' == 'D:\\a\\pybid...2s...
  FAILED src/bids/layout/tests/test_path_building.py::test_path_building_on_derivative_examples[qmri_mtsat] - AssertionError: assert 'D:/a/pybids/...01_M0map.json' == 'D:\\a\\pybid...01...
  FAILED src/bids/layout/tests/test_layout_on_examples.py::test_layout_on_examples_no_derivatives[ieeg_visual_multimodal-148] - AssertionError: assert 364 == 148
  FAILED src/bids/layout/tests/test_path_building.py::test_path_building_on_derivative_examples[qmri_sa2rage] - AssertionError: assert 'D:/a/pybids/...1_TB1map.json' == 'D:\\a\\pybid...1_...
  FAILED src/bids/layout/tests/test_path_building.py::test_path_building_in_raw_scope[ds001] - AssertionError: assert 'D:/a/pybids/...laneT2.nii.gz' == 'D:\\a\\pybid...la...
  FAILED src/bids/layout/tests/test_path_building.py::test_path_building_on_derivative_examples[qmri_vfa] - AssertionError: assert 'D:/a/pybids/...01_M0map.json' == 'D:\\a\\pybid...01...
  FAILED src/bids/layout/tests/test_path_building.py::test_path_building_in_raw_scope[ds114] - AssertionError: assert 'D:/a/pybids/...st_T1w.nii.gz' == 'D:\\a\\pybid...st...
  FAILED src/bids/layout/tests/test_path_building.py::test_path_building_in_raw_scope[qmri_irt1] - AssertionError: assert 'D:/a/pybids/...-01_IRT1.json' == 'D:\\a\\pybid...-0...
  FAILED src/bids/layout/tests/test_path_building.py::test_path_building_in_raw_scope[qmri_mese] - AssertionError: assert 'D:/a/pybids/...-01_MESE.json' == 'D:\\a\\pybid...-0...
  FAILED src/bids/layout/tests/test_path_building.py::test_path_building_in_raw_scope[qmri_mp2rage] - AssertionError: assert 'D:/a/pybids/..._MP2RAGE.json' == 'D:\\a\\pybid..._M...
  FAILED src/bids/layout/tests/test_path_building.py::test_path_building_in_raw_scope[qmri_mp2rageme] - AssertionError: assert 'D:/a/pybids/..._MP2RAGE.json' == 'D:\\a\\pybid..._M...
  FAILED src/bids/layout/tests/test_path_building.py::test_path_building_in_raw_scope[qmri_mtsat] - AssertionError: assert 'D:/a/pybids/...-off_MTS.json' == 'D:\\a\\pybid...-o...
  FAILED src/bids/layout/tests/test_path_building.py::test_path_building_in_raw_scope[qmri_sa2rage] - AssertionError: assert 'D:/a/pybids/..._TB1SRGE.json' == 'D:\\a\\pybid..._T...
  FAILED src/bids/layout/tests/test_path_building.py::test_path_building_on_derivative_examples[synthetic] - AssertionError: assert 'D:/a/pybids/...roc_bold.json' == 'D:\\a\\pybid...ro...
  FAILED src/bids/layout/tests/test_path_building.py::test_path_building_in_raw_scope[qmri_vfa] - AssertionError: assert 'D:/a/pybids/...ip-1_VFA.json' == 'D:\\a\\pybid...ip...
  FAILED src/bids/layout/tests/test_writing.py::TestWritableFile::test_build_file - AssertionError: assert 'A file at pa...writing file.' == 'A file at pa...wr...
  FAILED src/bids/layout/tests/test_path_building.py::test_path_building_in_raw_scope[micr_SEM] - AssertionError: assert 'D:/a/pybids/...e-A_photo.jpg' == 'D:\\a\\pybid...e-...
  FAILED src/bids/layout/tests/test_writing.py::TestWritableLayout::test_build_file_from_layout - AssertionError: assert 'C:/Users/run...01/r-1.nii.gz' == 'C:\\Users\\r...01...
  FAILED src/bids/layout/tests/test_path_building.py::test_path_building_in_raw_scope[ds000117] - AssertionError: assert 'D:/a/pybids/...on_events.tsv' == 'D:\\a\\pybid...on...
  FAILED src/bids/layout/tests/test_path_building.py::test_path_building_on_examples_with_derivatives_meg_ds_folder[ds000247-raw] - AssertionError: assert 'D:/a/pybids/...01_T1w.nii.gz' == 'D:\\a\\pybid...01...
  FAILED src/bids/layout/tests/test_path_building.py::test_path_building_on_examples_with_derivatives_meg_ds_folder[ds000246-raw] - AssertionError: assert 'D:/a/pybids/...01_T1w.nii.gz' == 'D:\\a\\pybid...01...
  FAILED src/bids/modeling/tests/test_transformations.py::test_orthogonalize_dense - ValueError: No variable named 'trial_type/parametric gain' found in this co...
  FAILED src/bids/reports/tests/test_parameters.py::test_describe_sequence[NONE-no sequence variant-SE_EP-spin echo and echo planar (SE/EP)] - AssertionError: assert 'spin echo an...anar (SE\\EP)' == 'spin echo an...la...
  FAILED src/bids/reports/tests/test_parameters.py::test_describe_sequence[SS-steady state-SE_EP-spin echo and echo planar (SE/EP)] - AssertionError: assert 'spin echo an...anar (SE\\EP)' == 'spin echo an...la...
  FAILED src/bids/reports/tests/test_parameters.py::test_describe_sequence[TRSS-time reversed steady state-SE_EP-spin echo and echo planar (SE/EP)] - AssertionError: assert 'spin echo an...anar (SE\\EP)' == 'spin echo an...la...
  FAILED src/bids/reports/tests/test_parameters.py::test_describe_sequence[MP_SS-MAG prepared and steady state-SE_EP-spin echo and echo planar (SE/EP)] - AssertionError: assert 'spin echo an...anar (SE\\EP)' == 'spin echo an...la...
  FAILED src/bids/reports/tests/test_parameters.py::test_describe_sequence[OSP-oversampling phase-SE_EP-spin echo and echo planar (SE/EP)] - AssertionError: assert 'spin echo an...anar (SE\\EP)' == 'spin echo an...la...
  FAILED src/bids/reports/tests/test_parameters.py::test_describe_sequence[SK-segmented k-space-SE_EP-spin echo and echo planar (SE/EP)] - AssertionError: assert 'spin echo an...anar (SE\\EP)' == 'spin echo an...la...
  FAILED src/bids/reports/tests/test_parameters.py::test_describe_sequence[MP-MAG prepared-SE_EP-spin echo and echo planar (SE/EP)] - AssertionError: assert 'spin echo an...anar (SE\\EP)' == 'spin echo an...la...
  FAILED src/bids/reports/tests/test_parameters.py::test_describe_sequence[MTC-magnetization transfer contrast-SE_EP-spin echo and echo planar (SE/EP)] - AssertionError: assert 'spin echo an...anar (SE\\EP)' == 'spin echo an...la...

I would :

  • fork the pybids repo
  • clone your fork
  • install tox (see the readme)
  • pick one test that fails in CI:
    • let's say src/bids/layout/tests/test_path_building.py::test_path_building_in_raw_scope
  • Make sure the test fails locally using :
    • tox run -e full -- src/bids/layout/tests/test_path_building.py::test_path_building_in_raw_scope
  • update the pybids code to make the test pass (the failing test should print the stack trace of the failure so it should leave a lot of breadcrumbs to find where to start looking at).

@kaare-mikkelsen
Copy link

@Remi-Gau that sounds pretty straight forward :) I will look into this when I get the time again, but also won't be in any way upset if someone solves it before then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants