NOAA-ORR-ERD / PyGnome

The General NOAA Operational Modeling Environment
https://gnome.orr.noaa.gov/doc/pygnome/index.html
Other
58 stars 44 forks source link

Failed tests with PyGnome #89

Open GeoTuxMan opened 3 years ago

GeoTuxMan commented 3 years ago

Hello !

I just installed PyGnome (from develop branch), on Ubuntu 20.04.2, with Python 3.8.5. When I run : py.test --runslow tests/unit_tests/

I got 6 failed tests:

FAILED tests/unit_tests/test_save_load.py::test_serial_deserial[obj0] - colan... FAILED tests/unit_tests/test_save_load.py::test_save_load_fun[obj0] - colande... FAILED tests/unit_tests/test_cy/test_cy_grid_map.py::TestGridMap::test_grid_map_curv FAILED tests/unit_tests/test_cy/test_cy_grid_map.py::TestGridMap::test_grid_map_tri FAILED tests/unit_tests/test_cy/test_cy_gridcurrent_mover.py::TestGridCurrentMover::test_move_curv_series FAILED tests/unit_tests/test_spill/test_spatial_release.py::test_load_shapefile = 6 failed, 1243 passed, 48 skipped, 29 xfailed, 2 xpassed, 6741 warnings

I attach a file which contains the output from test command.

I look forward to receive some tips.

Error_test_pygnome.txt

jay-hennen commented 3 years ago

It looks like the issue is related to your version of cftime and how it digests dates from netCDF files. What version of cftime are you using?

ChrisBarker-NOAA commented 3 years ago

Note that it works with:

cftime                    1.4.1
and 
netcdf4                   1.5.6

Also -- there are two errors currently with the --runslow flag, you can ignore them.

And I just pushed some updates, to pull and try again.

Final idea: Make sure to use the conda_requirements file that's in the develop branch.

GeoTuxMan commented 3 years ago

Hello !

Thank you for your reply.

My version of cftime:

@.VirtualBox:~/PyGnome/py_gnome$ pip3 show cftime Name: cftime Version: 1.4.1 Summary: Time-handling functionality from netcdf4-python Home-page: UNKNOWN Author: Jeff Whitaker Author-email: @. License: License :: OSI Approved :: MIT License Location: /usr/local/lib/python3.8/dist-packages Requires: numpy Required-by: netCDF4

george@george-VirtualBox:~/PyGnome/py_gnome$ pip3 show netcdf4 Name: netCDF4 Version: 1.5.6 Summary: Provides an object-oriented python interface to the netCDF version 4 library. Home-page: http://github.com/Unidata/netcdf4-python Author: Jeff Whitaker Author-email: jeffrey.s.whitaker@noaa.gov License: License :: OSI Approved :: MIT License Location: /usr/local/lib/python3.8/dist-packages Requires: numpy, cftime Required-by:

Cheers ! George

On Tue, 13 Apr 2021 at 20:30, jay-hennen @.***> wrote:

It looks like the issue is related to your version of cftime and how it digests dates from netCDF files. What version of cftime are you using?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/NOAA-ORR-ERD/PyGnome/issues/89#issuecomment-818914915, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD3YY27CEXWRMXXLLRZ62XLTIR5S3ANCNFSM423BW24Q .

ChrisBarker-NOAA commented 3 years ago

Hmm -- so this IS confusing!

I'm using those exact two same versions (on OS-X, but I think our CI is using them on Linux, too)

So that's not the issue.

Next steps:

You should get:

== 1202 passed, 96 skipped, 27 xfailed, 4 xpassed, 4363 warnings in 110.03s (0:01:50) ===

i.e. no failures.

You should get:

================================ short test summary info ================================
FAILED test_cy/test_cy_grid_map.py::TestGridMap::test_grid_map_curv - TypeError: expec...
FAILED test_cy/test_cy_grid_map.py::TestGridMap::test_grid_map_tri - TypeError: expect...
= 2 failed, 1245 passed, 51 skipped, 27 xfailed, 4 xpassed, 4817 warnings in 210.14s (0:03:30) =

Those two failures are one of the reasons this is still the develop branch :-)

But unless you are using some of the "old style" movers, they shouldn't be a problem.

GeoTuxMan commented 3 years ago

Hello Chris ,

After I reinstall the latest version from develop branch, and I run py.test tests/unit_tests/ : =========================== short test summary info

FAILED tests/unit_tests/test_save_load.py::test_serial_deserial[obj0] - colan... FAILED tests/unit_tests/test_save_load.py::test_save_load_fun[obj0] - colande... = 2 failed, 1202 passed, 93 skipped, 29 xfailed, 2 xpassed, 4354 warnings in 576.43s (

And after I run py.test --runslow tests/unit_tests/ : FAILED tests/unit_tests/test_save_load.py::test_serial_deserial[obj0] - colan... FAILED tests/unit_tests/test_save_load.py::test_save_load_fun[obj0] - colande... FAILED tests/unit_tests/test_cy/test_cy_grid_map.py::TestGridMap::test_grid_map_curv FAILED tests/unit_tests/test_cy/test_cy_grid_map.py::TestGridMap::test_grid_map_tri

Cheers ! George

On Fri, 16 Apr 2021 at 20:37, Chris Barker @.***> wrote:

Hmm -- so this IS confusing!

I'm using those exact two same versions (on OS-X, but I think our CI is using them on Linux, too)

So that's not the issue.

Next steps:

-

Do a git pull (or re-clone) to get the latest version of the develop branch.

run pytest without the --runslow flag

You should get:

== 1202 passed, 96 skipped, 27 xfailed, 4 xpassed, 4363 warnings in 110.03s (0:01:50) ===

i.e. no failures.

  • then try the '--runslow` flag

You should get:

================================ short test summary info ================================ FAILED test_cy/test_cy_grid_map.py::TestGridMap::test_grid_map_curv - TypeError: expec... FAILED test_cy/test_cy_grid_map.py::TestGridMap::test_grid_map_tri - TypeError: expect... = 2 failed, 1245 passed, 51 skipped, 27 xfailed, 4 xpassed, 4817 warnings in 210.14s (0:03:30) =

Those two failures are one of the reasons this is still the develop branch :-)

But unless you are using some of the "old style" movers, they shouldn't be a problem.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/NOAA-ORR-ERD/PyGnome/issues/89#issuecomment-821331485, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD3YY2YTJFQYJ2R2MEIXPWLTJBYW7ANCNFSM423BW24Q .

ChrisBarker-NOAA commented 3 years ago

Thanks -- still confused. we're not getting those two failures on our systems :-(

1) depending on how you are using PyGNOME, you may be able to ignore them. That issue should not affect running py_gnome scripts. It may affect working with the WebGNOME and/or saving and loading save files.

2) The two additional failures with --runslow are expected, and only effect a little used feature. And hopefully we'll fix that soon anyway.

To try to debug the mysterious tests:

Could you dump your conda setup and attach it here:

conda list > conda_list.txt

and you can run just those tests, and provide the full output:

cd tests/unit_tests/
pytest test_save_load.py
GeoTuxMan commented 3 years ago

Hi !

Well, I don't use conda.

The output from pytest: @.***VirtualBox:~/PyGnome/py_gnome/tests/unit_tests$ pytest test_save_load.py ============================= test session starts

platform linux -- Python 3.8.5, pytest-6.2.3, py-1.10.0, pluggy-0.13.1 rootdir: /home/george/PyGnome/py_gnome plugins: timeout-1.4.2 collected 71 items

test_save_load.py .....F........................F....................... [ 76%] ................. [100%]

=================================== FAILURES

__ test_serial_deserial[obj0]


subnode = <colander.SequenceSchema object at 140020040299232 (named data)> subappstruct = masked_array(data=[cftime.DatetimeGregorian(2004, 12, 31, 12, 59, 59, 121094), cftime.DatetimeGrego...meGregorian(2005, 1, 1, 12, 59, 59, 121094)], mask=False, fill_value='?', dtype=object)

def callback(subnode, subappstruct):
    if (isinstance(subnode.typ, (Sequence, OrderedCollectionType)) and
            isinstance(subnode.children[0], ObjTypeSchema)):
        scalar = (hasattr(subnode.typ, 'accept_scalar') and
                  subnode.typ.accept_scalar)

        return subnode.typ._impl(subnode, subappstruct, callback,
                                 scalar)
    else:
        try:
          return subnode.serialize(subappstruct, options=options)

E TypeError: serialize() got an unexpected keyword argument 'options'

/usr/local/lib/python3.8/dist-packages/pyGnome-0.7.0-py3.8-linux-x86_64.egg/gnome/persist/base_schema.py:162: TypeError

During handling of the above exception, another exception occurred:

saveloc_ = '/tmp/pytest-of-george/pytest-0/test_serial_deserial_obj0_0/save_test_serial_deserial' obj = gnome.environment.environment_objects.GridCurrent(name="GridCurrent0", time="<gnome.environment.gridded_objects_base.T...e = (25, 11, 9700) filling on", )]", grid="<gnome.environment.gridded_objects_base.Grid_U object at 0x7f58ecebb5e0>", )

@pytest.mark.parametrize("obj", g_objects)
def test_serial_deserial(saveloc_, obj):
    'test save/load functionality'
    print("********")
    print("Checking:", type(obj))
    print("********")
  json_ = obj.serialize()

test_save_load.py:195:


/usr/local/lib/python3.8/dist-packages/pyGnome-0.7.0-py3.8-linux-x86_64.egg/gnome/gnomeobject.py:613: in serialize serial = schema.serialize(self, options=options) /usr/local/lib/python3.8/dist-packages/pyGnome-0.7.0-py3.8-linux-x86_64.egg/gnome/persist/base_schema.py:657: in serialize return self.typ.serialize(self, appstruct, options=options) /usr/local/lib/python3.8/dist-packages/pyGnome-0.7.0-py3.8-linux-x86_64.egg/gnome/persist/base_schema.py:171: in serialize return self._impl(node, value, callback) /usr/local/lib/python3.8/dist-packages/pyGnome-0.7.0-py3.8-linux-x86_64.egg/gnome/persist/base_schema.py:96: in _impl sub_result = callback(subnode,subval) /usr/local/lib/python3.8/dist-packages/pyGnome-0.7.0-py3.8-linux-x86_64.egg/gnome/persist/base_schema.py:162: in callback return subnode.serialize(subappstruct, options=options) /usr/local/lib/python3.8/dist-packages/pyGnome-0.7.0-py3.8-linux-x86_64.egg/gnome/persist/base_schema.py:657: in serialize return self.typ.serialize(self, appstruct, options=options) /usr/local/lib/python3.8/dist-packages/pyGnome-0.7.0-py3.8-linux-x86_64.egg/gnome/persist/base_schema.py:171: in serialize return self._impl(node, value, callback) /usr/local/lib/python3.8/dist-packages/pyGnome-0.7.0-py3.8-linux-x86_64.egg/gnome/persist/base_schema.py:96: in _impl sub_result = callback(subnode,subval) /usr/local/lib/python3.8/dist-packages/pyGnome-0.7.0-py3.8-linux-x86_64.egg/gnome/persist/base_schema.py:165: in callback return subnode.serialize(subappstruct) /usr/local/lib/python3.8/dist-packages/colander/init.py:2296: in serialize cstruct = self.typ.serialize(self, appstruct) /usr/local/lib/python3.8/dist-packages/colander/init.py:1201: in serialize return self._impl(node, appstruct, callback, accept_scalar)


self = <colander.Sequence object at 0x7f58f4c37340> node = <colander.SequenceSchema object at 140020040299232 (named data)> value = [cftime.DatetimeGregorian(2004, 12, 31, 12, 59, 59, 121094), cftime.DatetimeGregorian(2004, 12, 31, 14, 0, 0, 878906),...4), cftime.DatetimeGregorian(2004, 12, 31, 17, 0, 0, 878906), cftime.DatetimeGregorian(2004, 12, 31, 18, 0, 0, 0), ...] callback = <function Sequence.serialize..callback at 0x7f58ecd84670> accept_scalar = False

def _impl(self, node, value, callback, accept_scalar):
    if accept_scalar is None:
        accept_scalar = self.accept_scalar

    value = self._validate(node, value, accept_scalar)

    error = None
    result = []

    subnode = node.children[0]
    for num, subval in enumerate(value):
        if subval is drop or (subval is null and subnode.default is

drop): continue try: sub_result = callback(subnode, subval) except Invalid as e: if error is None: error = Invalid(node) error.add(e, num) else: if sub_result is drop: continue result.append(sub_result)

    if error is not None:
      raise error

E colander.Invalid: {'data.0': '"2004-12-31 12:59:59.121094" is not a datetime object', E 'data.1': '"2004-12-31 14:00:00.878906" is not a datetime object', E 'data.10': '"2004-12-31 23:00:00.878906" is not a datetime object', E 'data.11': '"2005-01-01 00:00:00" is not a datetime object', E 'data.12': '"2005-01-01 00:59:59.121094" is not a datetime object', E 'data.13': '"2005-01-01 02:00:00.878906" is not a datetime object', E 'data.14': '"2005-01-01 03:00:00" is not a datetime object', E 'data.15': '"2005-01-01 03:59:59.121094" is not a datetime object', E 'data.16': '"2005-01-01 05:00:00.878906" is not a datetime object', E 'data.17': '"2005-01-01 06:00:00" is not a datetime object', E 'data.18': '"2005-01-01 06:59:59.121094" is not a datetime object', E 'data.19': '"2005-01-01 08:00:00.878906" is not a datetime object', E 'data.2': '"2004-12-31 15:00:00" is not a datetime object', E 'data.20': '"2005-01-01 09:00:00" is not a datetime object', E 'data.21': '"2005-01-01 09:59:59.121094" is not a datetime object', E 'data.22': '"2005-01-01 11:00:00.878906" is not a datetime object', E 'data.23': '"2005-01-01 12:00:00" is not a datetime object', E 'data.24': '"2005-01-01 12:59:59.121094" is not a datetime object', E 'data.3': '"2004-12-31 15:59:59.121094" is not a datetime object', E 'data.4': '"2004-12-31 17:00:00.878906" is not a datetime object', E 'data.5': '"2004-12-31 18:00:00" is not a datetime object', E 'data.6': '"2004-12-31 18:59:59.121094" is not a datetime object', E 'data.7': '"2004-12-31 20:00:00.878906" is not a datetime object', E 'data.8': '"2004-12-31 21:00:00" is not a datetime object', E 'data.9': '"2004-12-31 21:59:59.121094" is not a datetime object'}

/usr/local/lib/python3.8/dist-packages/colander/init.py:1171: Invalid ----------------------------- Captured stdout call


Checking: <class 'gnome.environment.environment_objects.GridCurrent'>


___ test_save_load_fun[obj0]


saveloc_ = '/tmp/pytest-of-george/pytest-0/test_save_load_fun_obj0_0/save_test_save_load_fun' obj = gnome.environment.environment_objects.GridCurrent(name="GridCurrent0", time="<gnome.environment.gridded_objects_base.T...e = (25, 11, 9700) filling on", )]", grid="<gnome.environment.gridded_objects_base.Grid_U object at 0x7f58ecebb5e0>", )

@pytest.mark.parametrize("obj", g_objects)
def test_save_load_fun(saveloc_, obj):
    'test save/load functionality'
    print("********")
    print("Checking:", type(obj))
    print("********")
  _json_, zipfile_, _refs = obj.save(saveloc_)

test_save_load.py:208:


/usr/local/lib/python3.8/dist-packages/pyGnome-0.7.0-py3.8-linux-x86_64.egg/gnome/environment/gridded_objects_base.py:646: in save return GnomeId.save(self, saveloc=saveloc, refs=refs, overwrite=overwrite) /usr/local/lib/python3.8/dist-packages/pyGnome-0.7.0-py3.8-linux-x86_64.egg/gnome/gnomeobject.py:723: in save obj_json = self._schema().save(self, zipfile=zipfile_, refs=refs) /usr/local/lib/python3.8/dist-packages/pyGnome-0.7.0-py3.8-linux-x86_64.egg/gnome/persist/base_schema.py:690: in _save objjson = self.typ.save(self, obj, zipfile, refs) /usr/local/lib/python3.8/dist-packages/pyGnome-0.7.0-py3.8-linux-x86_64.egg/gnome/persist/base_schema.py:391: in save preprocessed_json = self.impl(node, dict, callback) /usr/local/lib/python3.8/dist-packages/pyGnome-0.7.0-py3.8-linux-x86_64.egg/gnome/persist/base_schema.py:96: in _impl sub_result = callback(subnode,subval) /usr/local/lib/python3.8/dist-packages/pyGnome-0.7.0-py3.8-linux-x86_64.egg/gnome/persist/base_schema.py:382: in callback return subnode._save(subappstruct, /usr/local/lib/python3.8/dist-packages/pyGnome-0.7.0-py3.8-linux-x86_64.egg/gnome/persist/base_schema.py:690: in _save objjson = self.typ.save(self, obj, zipfile, refs) /usr/local/lib/python3.8/dist-packages/pyGnome-0.7.0-py3.8-linux-x86_64.egg/gnome/persist/base_schema.py:391: in save preprocessed_json = self.impl(node, dict, callback) /usr/local/lib/python3.8/dist-packages/pyGnome-0.7.0-py3.8-linux-x86_64.egg/gnome/persist/base_schema.py:96: in _impl sub_result = callback(subnode,subval) /usr/local/lib/python3.8/dist-packages/pyGnome-0.7.0-py3.8-linux-x86_64.egg/gnome/persist/base_schema.py:378: in callback return subnode.serialize(subappstruct) /usr/local/lib/python3.8/dist-packages/colander/init.py:2296: in serialize cstruct = self.typ.serialize(self, appstruct) /usr/local/lib/python3.8/dist-packages/colander/init.py:1201: in serialize return self._impl(node, appstruct, callback, accept_scalar)


self = <colander.Sequence object at 0x7f58f4c37340> node = <colander.SequenceSchema object at 140020040299232 (named data)> value = [cftime.DatetimeGregorian(2004, 12, 31, 12, 59, 59, 121094), cftime.DatetimeGregorian(2004, 12, 31, 14, 0, 0, 878906),...4), cftime.DatetimeGregorian(2004, 12, 31, 17, 0, 0, 878906), cftime.DatetimeGregorian(2004, 12, 31, 18, 0, 0, 0), ...] callback = <function Sequence.serialize..callback at 0x7f58ecb58ee0> accept_scalar = False

def _impl(self, node, value, callback, accept_scalar):
    if accept_scalar is None:
        accept_scalar = self.accept_scalar

    value = self._validate(node, value, accept_scalar)

    error = None
    result = []

    subnode = node.children[0]
    for num, subval in enumerate(value):
        if subval is drop or (subval is null and subnode.default is

drop): continue try: sub_result = callback(subnode, subval) except Invalid as e: if error is None: error = Invalid(node) error.add(e, num) else: if sub_result is drop: continue result.append(sub_result)

    if error is not None:
      raise error

E colander.Invalid: {'data.0': '"2004-12-31 12:59:59.121094" is not a datetime object', E 'data.1': '"2004-12-31 14:00:00.878906" is not a datetime object', E 'data.10': '"2004-12-31 23:00:00.878906" is not a datetime object', E 'data.11': '"2005-01-01 00:00:00" is not a datetime object', E 'data.12': '"2005-01-01 00:59:59.121094" is not a datetime object', E 'data.13': '"2005-01-01 02:00:00.878906" is not a datetime object', E 'data.14': '"2005-01-01 03:00:00" is not a datetime object', E 'data.15': '"2005-01-01 03:59:59.121094" is not a datetime object', E 'data.16': '"2005-01-01 05:00:00.878906" is not a datetime object', E 'data.17': '"2005-01-01 06:00:00" is not a datetime object', E 'data.18': '"2005-01-01 06:59:59.121094" is not a datetime object', E 'data.19': '"2005-01-01 08:00:00.878906" is not a datetime object', E 'data.2': '"2004-12-31 15:00:00" is not a datetime object', E 'data.20': '"2005-01-01 09:00:00" is not a datetime object', E 'data.21': '"2005-01-01 09:59:59.121094" is not a datetime object', E 'data.22': '"2005-01-01 11:00:00.878906" is not a datetime object', E 'data.23': '"2005-01-01 12:00:00" is not a datetime object', E 'data.24': '"2005-01-01 12:59:59.121094" is not a datetime object', E 'data.3': '"2004-12-31 15:59:59.121094" is not a datetime object', E 'data.4': '"2004-12-31 17:00:00.878906" is not a datetime object', E 'data.5': '"2004-12-31 18:00:00" is not a datetime object', E 'data.6': '"2004-12-31 18:59:59.121094" is not a datetime object', E 'data.7': '"2004-12-31 20:00:00.878906" is not a datetime object', E 'data.8': '"2004-12-31 21:00:00" is not a datetime object', E 'data.9': '"2004-12-31 21:59:59.121094" is not a datetime object'}

/usr/local/lib/python3.8/dist-packages/colander/init.py:1171: Invalid ----------------------------- Captured stdout call


Checking: <class 'gnome.environment.environment_objects.GridCurrent'>


=============================== warnings summary

../../../../../../usr/local/lib/python3.8/dist-packages/pyGnome-0.7.0-py3.8-linux-x86_64.egg/gnome/init.py:59

/usr/local/lib/python3.8/dist-packages/pyGnome-0.7.0-py3.8-linux-x86_64.egg/gnome/init.py:59: UserWarning: Version 0.3.0 of gridded package is required, but actual version in module is 0.2.2 warnings.warn(msg)

../../../../../../usr/lib/python3/dist-packages/future/standard_library/init.py:65 /usr/lib/python3/dist-packages/future/standard_library/init.py:65: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses import imp

../../../../../../usr/local/lib/python3.8/dist-packages/gridded/utilities.py:330 /usr/local/lib/python3.8/dist-packages/gridded/utilities.py:330: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.9 it will stop working elif isinstance(ncfile, collections.Iterable) and len(ncfile) == 1:

../../../../../../usr/local/lib/python3.8/dist-packages/pyGnome-0.7.0-py3.8-linux-x86_64.egg/gnome/environment/tide.py:161 ../../../../../../usr/local/lib/python3.8/dist-packages/pyGnome-0.7.0-py3.8-linux-x86_64.egg/gnome/environment/tide.py:161 ../../../../../../usr/local/lib/python3.8/dist-packages/pyGnome-0.7.0-py3.8-linux-x86_64.egg/gnome/environment/tide.py:161 tests/unit_tests/test_save_load.py::test_serial_deserial[obj1] tests/unit_tests/test_save_load.py::test_serial_deserial[obj7] tests/unit_tests/test_save_load.py::test_save_load_fun[obj1] tests/unit_tests/test_save_load.py::test_save_load_fun[obj7] tests/unit_tests/test_save_load.py::test_serialize_deserialize_grids[obj0] tests/unit_tests/test_save_load.py::test_save_load_grids[obj0]

/usr/local/lib/python3.8/dist-packages/pyGnome-0.7.0-py3.8-linux-x86_64.egg/gnome/environment/tide.py:161: DeprecationWarning: 'U' mode is deprecated fh = open(filename, 'rU')

../../../../../../usr/local/lib/python3.8/dist-packages/pyGnome-0.7.0-py3.8-linux-x86_64.egg/gnome/utilities/file_tools/haz_files.py:318 ../../../../../../usr/local/lib/python3.8/dist-packages/pyGnome-0.7.0-py3.8-linux-x86_64.egg/gnome/utilities/file_tools/haz_files.py:318 tests/unit_tests/test_save_load.py::test_serial_deserial[obj12] tests/unit_tests/test_save_load.py::test_serial_deserial[obj14] tests/unit_tests/test_save_load.py::test_save_load_fun[obj12] tests/unit_tests/test_save_load.py::test_save_load_fun[obj14]

/usr/local/lib/python3.8/dist-packages/pyGnome-0.7.0-py3.8-linux-x86_64.egg/gnome/utilities/file_tools/haz_files.py:318: DeprecationWarning: 'U' mode is deprecated fd = open(filename, 'rU')

-- Docs: https://docs.pytest.org/en/stable/warnings.html =========================== short test summary info

FAILED test_save_load.py::test_serial_deserial[obj0] - colander.Invalid: {'da... FAILED test_save_load.py::test_save_load_fun[obj0] - colander.Invalid: {'data... ================== 2 failed, 69 passed, 18 warnings in 5.83s

Thank you very much for your support !

Cheers ! George

On Mon, 19 Apr 2021 at 21:43, Chris Barker @.***> wrote:

Thanks -- still confused. we're not getting those two failures on our systems :-(

1.

depending on how you are using PyGNOME, you may be able to ignore them. That issue should not affect running py_gnome scripts. It may affect working with the WebGNOME and/or saving and loading save files. 2.

The two additional failures with --runslow are expected, and only effect a little used feature. And hopefully we'll fix that soon anyway.

To try to debug the mysterious tests:

Could you dump your conda setup and attach it here:

conda list > conda_list.txt

and you can run just those tests, and provide the full output:

cd tests/unit_tests/ pytest test_save_load.py

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/NOAA-ORR-ERD/PyGnome/issues/89#issuecomment-822691358, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD3YY25A6CVFVJKYPHBG2GTTJR2WLANCNFSM423BW24Q .

ChrisBarker-NOAA commented 3 years ago

Well, I don't use conda.

No need for conda, but you do need all the right versions, which gets tricky.

The issue is likely with the version of cftime, netcdf4, or colander. Here are the versions we are using:

I've attached the full list, in case it's something else.

cftime 1.4.1 py38ha1b04c9_0 conda-forge colander 1.7.0 py38hecd8cb5_0
netcdf4 1.5.6 nompi_py38h2c97785_101 conda-forge

-CHB

packages.txt

GeoTuxMan commented 3 years ago

Well, after I run the script script_windfile.py, I got a new folder 'Image", with many png files and one gif...so, I think I'm on the right way

Many, many thanks for your support 👍

On Tue, 20 Apr 2021 at 20:30, Chris Barker @.***> wrote:

Well, I don't use conda.

No need for conda, but you do need all the right versions, which gets tricky.

The issue is likely with the version of cftime, netcdf4, or colander. Here are the versions we are using:

I've attached the full list, in case it's something else.

cftime 1.4.1 py38ha1b04c9_0 conda-forge colander 1.7.0 py38hecd8cb5_0 netcdf4 1.5.6 nompi_py38h2c97785_101 conda-forge

-CHB

packages.txt https://github.com/NOAA-ORR-ERD/PyGnome/files/6346175/packages.txt

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/NOAA-ORR-ERD/PyGnome/issues/89#issuecomment-823544777, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD3YY2Y4BKNGUPVUMKCJ5RTTJXI63ANCNFSM423BW24Q .

ChrisBarker-NOAA commented 3 years ago

Looks good.

Sorry I didn't mention this sooner, but the test failures you were getting are related to the JSON serialization code, which you only need to work if you want to use your setup in WebGNOME, or save and restore "save files".

"ordinary" scripting should work fine.

PyGNOME is big system, hardly anyone is going to use all of it. So while we'd like all tests to pass, a given test failure may not be an issue for any given use case.

-CHB

ChrisBarker-NOAA commented 3 years ago

closing -- feel free to re-open of start a new issue if anything else comes up.