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

pytest fixes #86

Open
jcermauwedu opened this issue Apr 13, 2024 · 1 comment
Open

pytest fixes #86

jcermauwedu opened this issue Apr 13, 2024 · 1 comment

Comments

@jcermauwedu
Copy link
Contributor

jcermauwedu commented Apr 13, 2024

Working on cleaning up test suite. Example datasets need to be cleaned up a little bit.

The source seems to be mismatch of data types between the variable and the missing_value attribute. Doing some tracing finds:

pytest -Werror -vv --pdb

(Pdb) tvar[:]
*** UserWarning: WARNING: missing_value not used since it
cannot be safely cast to variable data type
(Pdb) p axv.t
<class 'netCDF4._netCDF4.Variable'>
int32 time(profile)
    long_name: Profile Time
    standard_name: time
    calendar: standard
    units: seconds since 1970-01-01T00:00:00Z
    axis: T
    ioos_category: Time
    time_origin: 01-JAN-1970 00:00:00
    _CoordinateAxisType: Time
    missing_value: -9999.9
unlimited dimensions: 
current shape = (35,)
filling on, default _FillValue of -2147483647 used

One of a few source files: src/pocean-core/pocean/tests/dsg/profile/resources/om-1dy11.nc

@ocefpaf Were the sample data file hand created or script generated?

Having the missing_value data type match the variable data type is a check performed by the IOOS Compliance Checker. We will consider looking into this package when reviewing examples for the IOOS Compliance Checker during the code sprint and maybe also look into CF and other issues as well. ioos/ioos-code-sprint#40

@jcermauwedu jcermauwedu mentioned this issue Apr 13, 2024
@ocefpaf
Copy link
Member

ocefpaf commented Apr 23, 2024

@ocefpaf Were the sample data file hand created or script generated?

Sorry but I have no idea. Those were added long before I got here 😬

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

No branches or pull requests

2 participants