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

ENH sort subject list and improve repr of transforms #530

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

mvdoc
Copy link
Contributor

@mvdoc mvdoc commented Apr 3, 2024

Maybe this problem was a problem only for me. But I always hated how the transforms were listed in the __repr__, as it wasn't really easy to understand what transforms were available for a subject.

Before the PR they would be listed as

>>> cortex.db.subjects["fsaverage"].transforms
Transforms: [atlas,atlas336,atlas_2mm,atlas_3mm]

which is fine for a few transforms, but it becomes quickly unreadable if one has many transforms.

After this PR they are listed as

>>> cortex.db.subjects["fsaverage"].transforms
Available transforms for fsaverage:
atlas
atlas336
atlas_2mm
atlas_3mm

This PR also sorts the subjects when running cortex.db and cortex.db.subjects. The unsorted subjects also bugged me in the past.

@mvdoc mvdoc merged commit 59a6f5b into gallantlab:main Apr 4, 2024
8 checks passed
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