-
Notifications
You must be signed in to change notification settings - Fork 261
MRG: rewrite gifti docstrings; refactor init #407
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
MRG: rewrite gifti docstrings; refactor init #407
Conversation
6095e62
to
4c1db3b
Compare
Responding to comments on Ben's previous PR nipy#403. Expand and fix docstrings and gifti attribute descriptions from gifti spec. Rewrite GiftiDataArray init to allow full initialization of object, that can be used from GiftiDataArray.from_array. The refactor of the init needs tests; I'll add these if y'all agree this init refactoring is the right thing to do.
Fix up a couple of duplicate test names. Remove test of setting string to DataArray - it's not allowed in the spec. Add tests for dataarray initialization.
Raise a specific error when parsing a gifti file that does not conform to the gifti spec.
fcdb5a8
to
7f965d7
Compare
""" | ||
|
||
def __init__(self, key=0, label='', red=None, green=None, blue=None, | ||
alpha=None): | ||
self.key = key | ||
self.label = label |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guessing you're removing this because GiftiLabel().label
isn't referenced anywhere? If so, should it still be in the parameter list?
Didn't get to the tests, but the docstrings look good. Does |
`label` doesn't appear in the spec, and our code doesn't use it either.
c1fe413
to
c2a8f52
Compare
Yes, I guess we could deprecate |
Deprecate GiftiDataArray.from_array in favor of GiftiDataArray constructor.
I read through the tests. Looks reasonable. I think this refactor of |
Ben - any comments here? |
OK - will merge this one tomorrow unless I hear otherwise. |
…cstrings MRG: rewrite gifti docstrings; refactor init Responding to comments on Ben's previous PR #403. Expand and fix docstrings and gifti attribute descriptions from gifti spec. Rewrite `GiftiDataArray` init to allow full initialization of object, that can be used from `GiftiDataArray.from_array`. Deprecate `GiftiDataArray.from_array` as redundant. Add tests. Fix up the tests - there were some duplicate test names so some tests were not being run. Remove unused `label` attribute of `GiftiLabel` object.
…d-docstrings MRG: rewrite gifti docstrings; refactor init Responding to comments on Ben's previous PR nipy#403. Expand and fix docstrings and gifti attribute descriptions from gifti spec. Rewrite `GiftiDataArray` init to allow full initialization of object, that can be used from `GiftiDataArray.from_array`. Deprecate `GiftiDataArray.from_array` as redundant. Add tests. Fix up the tests - there were some duplicate test names so some tests were not being run. Remove unused `label` attribute of `GiftiLabel` object.
Responding to comments on Ben's previous PR #403.
Expand and fix docstrings and gifti attribute descriptions from gifti
spec.
Rewrite GiftiDataArray init to allow full initialization of object, that
can be used from GiftiDataArray.from_array. Add tests.
Fix up the tests - there were some duplicate test names so some tests were not being run.
Remove unused
label
attribute ofGiftiLabel
object.