Closed ra-tolson closed 4 years ago
I'm embarrassed to say I just started doing this separately, realized I had told you that I already did it, which is not true, and then realized that you did it yourself and that this PR was sitting here.
The other thing I noticed is my test didn't pass because I was missing test_1.json
so I was going to ask about that. Now I'll look at this whole thing and try it out.
Okay, happy to help if you want to post questions etc. Any feedback would be welcome too.
I regret to say I didn't save my test invocation line but it was probably just $ pytest -s -vv
from inside a built container; you shouldn't need any ancillary json files I don't think.
Looks like there's possibly a version incompatibility, I'm getting
rob@MBP-18-111:~/repo/multitemporal$ docker run -it --rm multitemporal pytest
=========================================================================================== test session starts ============================================================================================
platform linux -- Python 3.6.7, pytest-5.2.2, py-1.8.0, pluggy-0.13.0
rootdir: /usr/local
plugins: cov-2.8.1
collected 402 items / 3 errors / 399 selected
================================================================================================== ERRORS ==================================================================================================
_______________________________________________________ ERROR collecting lib/python3.6/dist-packages/Cython/Debugger/Tests/test_libcython_in_gdb.py ________________________________________________________
ImportError while importing test module '/usr/local/lib/python3.6/dist-packages/Cython/Debugger/Tests/test_libcython_in_gdb.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
lib/python3.6/dist-packages/Cython/Debugger/Tests/test_libcython_in_gdb.py:24: in <module>
import gdb
E ModuleNotFoundError: No module named 'gdb'
_______________________________________________________ ERROR collecting lib/python3.6/dist-packages/Cython/Debugger/Tests/test_libpython_in_gdb.py ________________________________________________________
ImportError while importing test module '/usr/local/lib/python3.6/dist-packages/Cython/Debugger/Tests/test_libpython_in_gdb.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
lib/python3.6/dist-packages/Cython/Debugger/Tests/test_libpython_in_gdb.py:12: in <module>
import gdb
E ModuleNotFoundError: No module named 'gdb'
____________________________________________________________ ERROR collecting lib/python3.6/dist-packages/importlib_metadata/tests/test_zip.py _____________________________________________________________
ImportError while importing test module '/usr/local/lib/python3.6/dist-packages/importlib_metadata/tests/test_zip.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
lib/python3.6/dist-packages/importlib_metadata/tests/test_zip.py:7: in <module>
from importlib.resources import path
E ModuleNotFoundError: No module named 'importlib.resources'
During handling of the above exception, another exception occurred:
lib/python3.6/dist-packages/importlib_metadata/tests/test_zip.py:9: in <module>
from importlib_resources import path
E ModuleNotFoundError: No module named 'importlib_resources'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 3 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
============================================================================================= 3 error in 1.14s =============================================================================================
Sorry. I did a fresh checkout and it worked. This is fantastic, thanks.
great, so glad it's working for you!
So unless I'm missing something, pip install -e will create the importable .so files in the source tree which is overwritten if you mount the /multitemporal to the container, and unless the compiled code is already there for some reason, mt won't be able to find the modules. I think this is why the directions at the bottom of the readme don't work for me (unless I drop the -v [stuff]). This raises the question of how do I operate the container when I'm developing. Maybe. Am I just doing it wrong?
@bhbraswell I think you discovered that I forgot a step. I altered the readme; if you want you can try it again.
But by all means develop in whatever way is most comfortable to you; I'm sure the mount isn't required if you're installing an editor in your container.
OK, now I see what you're saying. And I think the line added to the readme by Tom's last commit helps with this. If you're going to develop on a mounted (-v /path/to/my/mt/dir:/multitemporal
) repo, you do need to build the modules. Does that make sense @bhbraswell? We can meet for a couple minutes to clear this up if it doesn't. I def could be misunderstanding something here.
Sorry, it seems obvious in retrospect, yeah. Thanks. This is looking good, I'm using it now.
I'm just a data scientist, but I approve this message.
Fixes #43. I tried to keep the refactoring to a minimum, but I did find it easier to understand the source after I'd renamed a few variables. Also:
geographica/gdal2
(we should probably vet that image if we're going to keep using it for stuff)example.py
nortestsharedmem.py
since they don't look like critical code paths.bin/screen.py
seemed like it was an accidental copy ofscreen.pyx
so I deleted it.Regarding the test suite:
mt.py
etc, but the cython code didn't change at all except to make the tests run so there's no attempt to cover cython modules.mt.py
.