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

clean up warnings in python build step #200

Open
jbathegit opened this issue Apr 4, 2022 · 4 comments
Open

clean up warnings in python build step #200

jbathegit opened this issue Apr 4, 2022 · 4 comments
Assignees

Comments

@jbathegit
Copy link
Collaborator

I found 80+ hits when searching for "warning" in the build step for ubuntu-20.0.4, gcc-10, gfortran-10, and all of them are related to the python builds.

These should definitely be looked at and cleaned up at some point, because one of the general rules that was agreed for our NCEPLIBS packages was that everything should compile without any warnings.

@edwardhartnett
Copy link
Contributor

Who contributed the python code? They need to immediately clear these warnings.

The EMC requirements for operational software include that all software must build without warning. This is a very reasonable rule.

We need to add a CI test which fails is any warnings are present, and then bring the code up to that standard. That way, future contributions of code will fail CI if they add warnings.

@jbathegit
Copy link
Collaborator Author

AFAIK, the python code was contributed by Jeff Whitaker working with Rahul.

@edwardhartnett
Copy link
Contributor

@jswhit and @aerorahul can you guys clear up the warnings in your python code?

@aerorahul
Copy link
Contributor

On my macOS with GCC10, I performed a

python setup.py install |& tee out
grep -i warn out

and this was the result:

/usr/local/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
/usr/local/lib/python3.9/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
/usr/local/lib/python3.9/site-packages/setuptools/command/egg_info.py:623: SetuptoolsDeprecationWarning: Custom 'build_py' does not implement 'get_data_files_without_manifest'.
  warnings.warn(
gfortran: warning: could not understand version 12
gfortran: warning: could not understand version 12
gfortran: warning: could not understand version 12
gfortran: warning: could not understand version 12
gfortran: warning: could not understand version 12
gfortran: warning: could not understand version 12
gfortran: warning: could not understand version 12
gfortran: warning: could not understand version 12
gcc-10: warning: could not understand version 12
gcc-10: warning: could not understand version 12
/usr/local/lib/python3.9/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
   17 | #warning "Using deprecated NumPy API, disable it with " \
/usr/local/lib/python3.9/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
   17 | #warning "Using deprecated NumPy API, disable it with " \
build/src.macosx-12-x86_64-3.9/python/_bufrlibmodule.c:177:12: warning: 'f2py_size' defined but not used [-Wunused-function]
gfortran: warning: could not understand version 12
f951: Warning: Nonexistent include directory '/Users/rmahajan/scratch/nceplibs-bufr/build/src/include_4' [-Wmissing-include-dirs]
gfortran: warning: could not understand version 12

There are warnings, I agree.

Some of these warnings are benign and not really worth digging.
Some of the warnings are something neither @jswhit nor @aerorahul would be able to resolve without an overwhelming amount of time and effort. They are a result of the use of f2py, and personally, I have no idea how to decipher and debug those. I doubt one can actually resolve every single warning.
I will let @jswhit assess differently, if he disagrees.

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

4 participants