gafusion / omas

Ordered Multidimensional Array Structure
http://gafusion.github.io/omas
MIT License
32 stars 15 forks source link

Running omas make tests on iris #108

Closed TimSlendebroek closed 3 years ago

TimSlendebroek commented 4 years ago

I am trying to test a small regression test in omas_plot that I added but have some issues with running the test suite on IRIS. It doesn't seem to get further than the init method of make tests.

From the omas folder I am running (I cloned the omas repo a couple of months ago and was never able to omas testing and always used a PR to do this):

>>>> module load omfit/unstable
>>>> make tests

Which gives the following error:

Makefile:42: warning: overriding commands for target `tests_examples'
Makefile:36: warning: ignoring old commands for target `tests_examples'
python3 -m unittest discover --pattern="*.py" -s omas/tests -v -f
/fusion/projects/codes/atom/omfit_py3/atom_SATURN_GCC/miniconda3_20200421/lib/python3.7/site-packages/xarray/core/merge.py:16: FutureWarning: The Panel class is removed from pandas. Accessing it from the top-level namespace will also be removed in the next version
Setting up OMAS warnings for user slendebroekt
OMAS warnings set to hard mode
Setting up OMAS warnings for user slendebroekt
OMAS warnings set to hard mode
__init__ (unittest.loader._FailedTest) ... ERROR

======================================================================
ERROR: __init__ (unittest.loader._FailedTest)
----------------------------------------------------------------------
TypeError: __init__() missing 2 required positional arguments: 'method_name' and 'exception'

----------------------------------------------------------------------
Ran 1 test in 0.001s

FAILED (errors=1)
make: *** [tests] Error 1

I was wondering if you have seen this before @eldond and/or if you know what I can try.

Thanks!

eldond commented 4 years ago

I never tried using make on python code before. I just run the OMAS tests like this: python3 omas/tests/test_omas_plot.py.

orso82 commented 4 years ago

@eldond this is what the make tests does. https://github.com/gafusion/omas/blob/master/Makefile#L20-L42

TimSlendebroek commented 4 years ago

I never tried using make on python code before. I just run the OMAS tests like this: python3 omas/tests/test_omas_plot.py.

I see that would skip the make, sadly this fails for me too which probably indicates that my omas instalation is not installed properly.

/fusion/projects/codes/atom/omfit_py3/atom_SATURN_GCC/miniconda3_20200421/lib/python3.7/site-packages/xarray/core/merge.py:16: FutureWarning: The Panel class is removed from pandas. Accessing it from the top-level namespace will also be removed in the next version
Setting up OMAS warnings for user slendebroekt
OMAS warnings set to hard mode
Traceback (most recent call last):
  File "/home/slendebroekt/GIT_projects/omas/omas/tests/failed_imports.py", line 38, in <module>
    from pymongo import MongoClient
ModuleNotFoundError: No module named 'pymongo'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "omas/tests/test_omas_physics.py", line 26, in <module>
    from omas.tests import warning_setup
  File "/home/slendebroekt/GIT_projects/omas/omas/tests/__init__.py", line 2, in <module>
    from failed_imports import *
  File "/home/slendebroekt/GIT_projects/omas/omas/tests/failed_imports.py", line 46, in <module>
    except (ImportError, ServerSelectionTimeoutError) as _excp:
NameError: name 'ServerSelectionTimeoutError' is not defined

Pushing to the pull-req seems easier than fixing this haha

github-actions[bot] commented 3 years ago

Stale issue message