NOAA-GFDL / xwmt

Python package for water mass transformation analysis that leverages xarray functionality
https://xwmt.readthedocs.io/
MIT License
7 stars 5 forks source link

Unable to access preprocessing module #5

Closed Taydra-Low closed 1 year ago

Taydra-Low commented 2 years ago

When I import xwmt I am unable to access the preprocessing module.

It shows that the preprocessing module is part of the package as shown below image

But when I try to look into the preprocessing module or use the module I get an error. image

However the swmt and compute modules work just fine. At the moment I have just done the preprocessing manually. image

Here are the software version I use: xarray version : 2022.3.0 dask version : 2022.05.0 numpy version : 1.21.6

jetesdal commented 2 years ago

Hi @Taydra-Low! Thanks for documenting this issue. I can reproduce your error; when running help(xwmt.preprocessing), I get the same response that "module 'xwmt' has no attribute 'preprocessing'".

I am not sure why the help() command can't be called on xwmt.preprocessing directly. Maybe it is because we use the name "preprocessing" for both the submodule and the function. However, you should be able to load and use the preprocessing function after loading it separately with from xwmt import preprocessing

And then you should be able to use help(preprocessing)

I created an example notebook that shows the usage of preprocessing(). You can view it here. If you want to run the notebook with the example data, you can download the data here

Let me know if importing the preprocessing function separately allows you to use it or if there are any other issues.

hdrake commented 1 year ago

This issue can be closed as the preprocessing module no longer exists.

jetesdal commented 1 year ago

Thanks @hdrake. Closing this issue.