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

fix: OSX and Windows tests #1989

Merged
merged 6 commits into from
Jun 10, 2024
Merged

Conversation

effigies
Copy link
Collaborator

@effigies effigies commented Jun 8, 2024

Builds on #1988, which resolves OSX failures.

@effigies effigies marked this pull request as draft June 8, 2024 20:42
Copy link

codecov bot commented Jun 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.04%. Comparing base (162faeb) to head (e5c8def).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1989      +/-   ##
==========================================
+ Coverage   85.68%   87.04%   +1.36%     
==========================================
  Files          91      131      +40     
  Lines        3792     6306    +2514     
  Branches     1220     1520     +300     
==========================================
+ Hits         3249     5489    +2240     
- Misses        457      726     +269     
- Partials       86       91       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@effigies effigies marked this pull request as ready for review June 8, 2024 21:17
@effigies
Copy link
Collaborator Author

effigies commented Jun 8, 2024

This resolves the tests in the most straightforward way, but it's possible that instead of accommodating backslashes in more places, we want to more aggressively convert some components to always use forward slashes. Otherwise we may find ourselves with datasets that pass on Windows because selectors like path == '/dataset_description.json' fail and rules that should fail get skipped.

I switched to using POSIX joins to ensure that the internal representation of paths is POSIX. Added a test.

effigies added 6 commits June 9, 2024 21:50
OSX tests are failing because we assume temporary files exist in /tmp,
while OSX has different defaults. This creates a temporary file and
splits the returned path to ensure we can point to existing files.
Windows can handle both slashes and backslashes as directory separators,
and tests frequently use slashes to pass paths to the OS-aware parts of
the code. Using SEPARATOR_PATTERN allows us to accept either.
The internal representation of file trees uses relative paths. For
simplicity, we should ensure that these always use POSIX separators.
@effigies effigies changed the title fix: Windows tests fix: OSX and Windows tests Jun 10, 2024
@nellh nellh merged commit bd9ed5f into bids-standard:master Jun 10, 2024
33 checks passed
@effigies effigies deleted the fix/win-tests branch June 10, 2024 15:01
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.

2 participants