-
Notifications
You must be signed in to change notification settings - Fork 262
MRG: Prepare for pydicom 1.0 #379
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
Conversation
@ignatenkobrain Do you want to try this branch out? |
This looks ok to me. My concern is: how are we going to test the two codepaths? |
Until pydicom 1.0 is actually released, I'm not sure. I don't know if we can set up a Travis test to use a commit off Github. But there is a Travis test using the latest pydicom release, so we'll at least make sure we're not breaking anybody who's not bleeding edge. I'm also okay with waiting to merge this until the 1.0 release of pydicom, in which case @ignatenkobrain can test this patch (which gives us some assurance that it's correct) and include it in his package. That way the patch is at least the one we expect to go in, so he's not stuck with an orphaned patch. |
Would pip installing from github work for this? http://stackoverflow.com/questions/13685920/install-specific-git-commit-with-pip On Fri, Nov 6, 2015 at 7:49 AM, Chris Markiewicz [email protected]
|
b4f9c54
to
8efb21e
Compare
Some test failures... |
Thanks. Scanning today, so intermittent ability to check. |
except ImportError: | ||
have_dicom = False | ||
else: | ||
from pydicom.dicomio import read_file |
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.
This is a little ugly, reflecting the need to discover two different pydicom versions. The try/except/else allows us to detect a failure to import pydicom
separately from a failure to find pydicom.dicomio.read_file
.
Tests passing. Code review appreciated. |
try: | ||
import dicom as pydicom | ||
except ImportError: | ||
import pydicom |
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.
Is it worth importing InvalidDicomError
here, like you did with read_file
? I know there's no change in the package path, but would be more consistent with the others (including Dataset
)
LGTM. Essentially all of the All that to, again, say: LGTM |
Hi folks, I want. I will test it during weekend. |
I have checked this with PR for 2.0.2. Fixes my issue and works perfectly! Would be great if this also will be part of 2.0.2 (but not required, I will backport this patch myself) |
TST: Use consistent import style in tests
I'd like to put this into 2.0.2. Squashed down to two commits. Ready to merge? @matthew-brett @bcipolli |
👍 Took a final look, happy from my side |
Thanks for this - in it goes. |
MRG: Prepare for pydicom 1.0 pydicom 1.0 will change the import name from dicom to pydicom, and move dicom.read_file to pydicom.dicomio.read_file. Adjust imports accordingly, and rename dicom to pydicom, when imported directly. Closes #351
MRG: Prepare for pydicom 1.0 pydicom 1.0 will change the import name from dicom to pydicom, and move dicom.read_file to pydicom.dicomio.read_file. Adjust imports accordingly, and rename dicom to pydicom, when imported directly. Closes nipy#351
pydicom 1.0 will change the import name from
dicom
topydicom
, and movedicom.read_file
topydicom.dicomio.read_file
. Adjust imports accordingly, and renamedicom
topydicom
, when imported directly.Closes #351