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

try to run tests locally (WIP) #6

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

nuest
Copy link

@nuest nuest commented Jan 25, 2021

No description provided.

@nuest
Copy link
Author

nuest commented Jan 25, 2021

I have an issue running the unit tests:

daniel@nuest ~/Documents/2020_Geosoftware-II/TestRepo [main]$ workon geosoft
(geosoft) daniel@nuest ~/Documents/2020_Geosoftware-II/TestRepo [main]$ pytest
================================================================================= test session starts =================================================================================
platform linux -- Python 3.8.5, pytest-5.4.3, py-1.9.0, pluggy-0.13.1
rootdir: /home/daniel/Documents/2020_Geosoftware-II/TestRepo
collected 0 items / 3 errors                                                                                                                                                          

======================================================================================= ERRORS ========================================================================================
_________________________________________________________ ERROR collecting GeoSoftII_DataServer/SST/test/test_datacube_sst.py _________________________________________________________
ImportError while importing test module '/home/daniel/Documents/2020_Geosoftware-II/TestRepo/GeoSoftII_DataServer/SST/test/test_datacube_sst.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
GeoSoftII_DataServer/SST/test/test_datacube_sst.py:8: in <module>
    import xarray  as xr
E   ModuleNotFoundError: No module named 'xarray'
______________________________________________________________ ERROR collecting GeoSoftII_NDVI_Process/test/test_ndvi.py ______________________________________________________________
ImportError while importing test module '/home/daniel/Documents/2020_Geosoftware-II/TestRepo/GeoSoftII_NDVI_Process/test/test_ndvi.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
GeoSoftII_NDVI_Process/test/test_ndvi.py:6: in <module>
    from ndvi import calculate, prepareData, calculate_with_dask
GeoSoftII_NDVI_Process/ndvi.py:6: in <module>
    import xarray as xr
E   ModuleNotFoundError: No module named 'xarray'
____________________________________________________________ ERROR collecting GeoSoftII_SST_Process/test/test_mean_sst.py _____________________________________________________________
ImportError while importing test module '/home/daniel/Documents/2020_Geosoftware-II/TestRepo/GeoSoftII_SST_Process/test/test_mean_sst.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
GeoSoftII_SST_Process/test/test_mean_sst.py:6: in <module>
    import xarray as xr
E   ModuleNotFoundError: No module named 'xarray'
=============================================================================== short test summary info ===============================================================================
ERROR GeoSoftII_DataServer/SST/test/test_datacube_sst.py
ERROR GeoSoftII_NDVI_Process/test/test_ndvi.py
ERROR GeoSoftII_SST_Process/test/test_mean_sst.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 3 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
================================================================================== 3 errors in 0.08s ==================================================================================

This is weird because xarray is installed in the environment:

(geosoft) daniel@nuest ~/Documents/2020_Geosoftware-II/TestRepo [main]$ python
Python 3.8.5 (default, Jul 28 2020, 12:59:40) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import xarray as xr
>>> xr.util.print_versions.netcdf_and_hdf5_versions()
[('libhdf5', None), ('libnetcdf', None)]
>>> 

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