Skip to content

Add warning for fslr32k histology data resolution mismatch#373

Merged
zihuaihuai merged 2 commits intomasterfrom
369-fix-histology-fslr32k-url
Nov 25, 2025
Merged

Add warning for fslr32k histology data resolution mismatch#373
zihuaihuai merged 2 commits intomasterfrom
369-fix-histology-fslr32k-url

Conversation

@zihuaihuai
Copy link
Collaborator

Known issue: The fslr32k histology profile data on the server contains fs_LR_64k resolution (64984 vertices) instead of fs_LR_32k (32492 vertices).

This is a server-side data hosting issue. The correct fix requires uploading the proper 32k resolution data file to the server.

Fixes #369

Known issue: The fslr32k histology profile data on the server contains
fs_LR_64k resolution (64984 vertices) instead of fs_LR_32k (32492 vertices).

- Add warning in read_histology_profile() when template is fslr32k
- Add warning in download_histology_profiles() when downloading fslr32k data
- Reference issue #369 in warnings for users to track the status
- Remove skip for fslr32k test in test_histology.py (netneurotools issue fixed)

This is a server-side data hosting issue. The correct fix requires uploading
the proper 32k resolution data file to the server.

Fixes #369
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses a known data resolution mismatch issue (#369) where the fslr32k histology profile data on the server contains fs_LR_64k resolution (64984 vertices) instead of the expected fs_LR_32k resolution (32492 vertices). The changes add user-facing warnings to inform users about this server-side data hosting issue.

  • Add warning messages in both read_histology_profile() and download_histology_profiles() when using fslr32k template
  • Remove pytest skip for fslr32k test that was related to a now-fixed netneurotools Unicode bug
  • Reference issue #369 in warnings to help users track the status of this known issue

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
brainstat/context/histology.py Adds warning messages (lines 160-168, 208-213) to alert users about the fslr32k data resolution mismatch when reading or downloading histology profiles
brainstat/tests/test_histology.py Removes the pytest skip for fslr32k template testing (lines 21-23 removed) now that the netneurotools Unicode bug has been fixed

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Add retry mechanism with 3 attempts and exponential backoff
- Handle RemoteDisconnected, URLError, and TimeoutError exceptions
- Add timeout=30 to urlopen to prevent hanging
- Improves CI test reliability when downloading from box.bic.mni.mcgill.ca

This fixes intermittent CI failures like:
'http.client.RemoteDisconnected: Remote end closed connection without response'
@zihuaihuai zihuaihuai force-pushed the 369-fix-histology-fslr32k-url branch from e8463cc to bd93ef1 Compare November 25, 2025 20:46
@zihuaihuai zihuaihuai merged commit ffd6889 into master Nov 25, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Python On the Python implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect Histology Profile Downloaded (fs_LR_64k instead of fs_LR_32k)

1 participant