-
Notifications
You must be signed in to change notification settings - Fork 205
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
MRCZ io_plugin #1716
MRCZ io_plugin #1716
Conversation
That's strange that TravisCI can't find |
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.
Just a few comments to get the tests working. I can come back to the rest later.
.travis.yml
Outdated
@@ -33,7 +33,7 @@ before_install: | |||
install: | |||
|
|||
- if [[ $MINIMAL_ENV == 'False' ]] ; then | |||
DEPS="pip numpy scipy matplotlib>=2.0.2 ipython h5py sympy scikit-learn dill natsort setuptools scikit-image cython lxml ipyparallel dask traits traitsui"; | |||
DEPS="pip numpy scipy matplotlib>=2.0.2 ipython h5py sympy scikit-learn dill natsort setuptools scikit-image cython lxml ipyparallel dask traits traitsui blosc mrcz"; |
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.
These are the dependencies installed from the conda-forge channel. I cann't find any repo for the mrcz, so I guess it would be better to remove mrcz from here and leave pip install it automatically from pypi when hyperspy is installed.
appveyor.yml
Outdated
@@ -139,7 +139,7 @@ before_deploy: | |||
- "ECHO %SCIKIT_IMAGE%" | |||
# - "%CMD_IN_ENV% wget http://www.lfd.uci.edu/~gohlke/pythonlibs/tuoh5y4k/%SCIKIT_IMAGE% --header User-Agent:Chrome/23.0.1271.97" | |||
- "%CMD_IN_ENV% pip install %SCIKIT_IMAGE%" | |||
- "%CMD_IN_ENV% pip install --upgrade tqdm notebook cython ipython configobj start_jupyter_cm ipywidgets ipyparallel sympy pytest" | |||
- "%CMD_IN_ENV% pip install --upgrade tqdm notebook cython ipython configobj start_jupyter_cm ipywidgets ipyparallel sympy pytest blosc mrcz" |
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.
Same as for .travis.yml, install blosc from the conda-forge channel with conda and install mrcz with pip from pypi.
hyperspy/tests/io/test_mrcz.py
Outdated
mrcName = os.path.join( tmpDir, "testMage.mrcz" ) | ||
MAX_ASYNC_TIME = 2.0 | ||
|
||
class PythonMrczTests: |
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 test class is not discovered by pytest, the name needs to start with "Test".
Ok, getting closer, JSON version problem now. |
Looks good to me. |
Indeed, it is working fine!
I have tested the Gohlke's blosc binary in the Winpython HyperSpy bundle and it works. |
I'll look into writing from a For |
Also, quick point: MRCZ doesn't list blosc as a requirement because the import is inside a |
Ok great, then we will able to merge this PR even if the blosc wheels/binaries are not ready yet. |
I added support for saving from
I'm not sure it's a good idea to use |
This is great, thanks @robbmcleod for this nice contribution! I just added the tests for the lazy case and move blosc to |
Looking at this travis log, |
Quick status update: we're in the process of getting |
@robbmcleod, since the master branch of mrcz now raises an |
The master branch of I just tested it with a fresh conda install, and then installed |
I am talking about this version, which raises an |
Oh, right, I forgot about that. Let me clean up the docstrings so they meet NumPy standards and I'll release 0.3.5. |
Eric, The 0.3.5 release is live now: |
I see you had a random test failure on the asynchronous tests. You might want to consider re-triggering those builds. I haven't had trouble with them, but weird things can happen between when Python thinks the file write is finished, and when the OS thinks the file write is finished. If you encounter this problem more than once, the only fix I could propose would be a small sleep in-between getting the result from the Future and reading. That or disabling that test. |
Yes, it did happen a few times, so I added (#1852) a sleep, as you recommended and so far it seems to do the job. |
Couple points to look at:
extension somewhere?
__getitem__
and__setitem__
methods for the metadata attribute?