Hi @momipsl, I was going through the Notebook in the notebooks dir towards getting a better understanding of pyessv. Although it mostly ran fine there were some lines that did not do as expected/described. I did some investigation to work through those so might as well put in a PR to update it for the latest version (0.8.3.0 I see from PyPI) as the Notebook was last updated ~2 years ago:
but judging from the codebase wcrp = pyessv.WCRP instead would work, & indeed allows the cell to return cleanly, so I guess there was an API change since that broke this?
None of the properties are returning a UUID as expected for the .uid attribute, instead producing None or for noaa_gfdl.uid throwing AttributeError: uid unknown attribute. I've suggested to remove corresponding lines since it seems the attribute is no longer valid.
Executable cell 12 is checking whether objects are of type basestring which errored because I'm using Python 3 & it's for 2 only, though I saw that the utils.compat module has logic to adapt so that pyessv can run in 2 or 3, so instead of converting to a comparison to str I guess it is best to compare with compat.basestring, as suggested here?
This PR has minimal changes to get the Notebook to run as expected, including execution output differences (most of the line additions are ~10,000 from the iterative print over the node types, so it seems the vocabulary has expanded greatly in the past few years?). I'm happy to tweak it as you wish. Thanks.
Hi @momipsl, I was going through the Notebook in the
notebooks
dir towards getting a better understanding ofpyessv
. Although it mostly ran fine there were some lines that did not do as expected/described. I did some investigation to work through those so might as well put in a PR to update it for the latest version (0.8.3.0
I see from PyPI) as the Notebook was last updated ~2 years ago:The second executable cell hit the following:
but judging from the codebase
wcrp = pyessv.WCRP
instead would work, & indeed allows the cell to return cleanly, so I guess there was an API change since that broke this?None of the properties are returning a UUID as expected for the
.uid
attribute, instead producingNone
or fornoaa_gfdl.uid
throwingAttributeError: uid unknown attribute
. I've suggested to remove corresponding lines since it seems the attribute is no longer valid.Executable cell 12 is checking whether objects are of type
basestring
which errored because I'm using Python 3 & it's for 2 only, though I saw that theutils.compat
module has logic to adapt so thatpyessv
can run in 2 or 3, so instead of converting to a comparison tostr
I guess it is best to compare withcompat.basestring
, as suggested here?This PR has minimal changes to get the Notebook to run as expected, including execution output differences (most of the line additions are ~10,000 from the iterative print over the node types, so it seems the vocabulary has expanded greatly in the past few years?). I'm happy to tweak it as you wish. Thanks.