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

Feature #2277 python_warning #2330

Merged
merged 4 commits into from
Nov 3, 2022
Merged

Conversation

JohnHalleyGotway
Copy link
Collaborator

@JohnHalleyGotway JohnHalleyGotway commented Nov 2, 2022

Wrote a utility function python_compile_error() to print a consistent error message about python support not being compiled. Updated code to call it from ensemble_stat, point_stat, point2grid, plot_point_obs, ascii2nc, and the vx_data2d_factory.

Note I also included some unrelated changes to the documentation for the CRPS_EMP_FAIR statistic that arose in another context.

Expected Differences

  • Do these changes introduce new tools, command line arguments, or configuration file options? [No]

    If yes, please describe:

  • Do these changes modify the structure of existing or add new output data types (e.g. statistic line types or NetCDF variables)? [No]

    If yes, please describe:

Pull Request Testing

  • Describe testing already performed for these changes:
    • Ran all unit tests through GHA and confirmed no diffs were flagged.
    • Compiled this feature branch locally WITHOUT python embedding support compiled and tested...
      ascii2nc
bin/ascii2nc -format python 'scripts/python/read_ascii_point.py data/sample_obs/ascii/sample_ascii_obs.txt' out.nc
ERROR  : 
ERROR  : set_format() -> Support for Python has not been compiled!
ERROR  : To run Python scripts, recompile with the --enable-python option.
ERROR  : 

plot_point_obs

bin/plot_point_obs 'PYTHON_NUMPY=scripts/python/read_ascii_point.py data/sample_obs/ascii/sample_ascii_obs.txt' out.ps
ERROR  : 
ERROR  : process_point_obs() -> Support for Python has not been compiled!
ERROR  : To run Python scripts, recompile with the --enable-python option.
ERROR  : 

point2grid

bin/point2grid 'PYTHON_NUMPY=scripts/python/read_ascii_point.py data/sample_obs/ascii/sample_ascii_obs.txt' G212 out.nc
ERROR  : 
ERROR  : process_command_line() -> Support for Python has not been compiled!
ERROR  : To run Python scripts, recompile with the --enable-python option.
ERROR  : 

And I stopped there.

  • Recommend testing for the reviewer(s) to perform, including the location of input datasets, and any additional instructions:

    Please review code changes and confirm that all unit tests run via GHA and produce no differences.

  • Do these changes include sufficient documentation updates, ensuring that no errors or warnings exist in the build of the documentation? [No]
    None needed.

  • Do these changes include sufficient testing updates? [No]
    None needed.

  • Will this PR result in changes to the test suite? [No]

    If yes, describe the new output and/or changes to the existing output:

  • Please complete this pull request review by [Mon 10/7/22].

Pull Request Checklist

See the METplus Workflow for details.

  • Review the source issue metadata (required labels, projects, and milestone).
  • Complete the PR definition above.
  • Ensure the PR title matches the feature or bugfix branch name.
  • Define the PR metadata, as permissions allow.
    Select: Reviewer(s)
    Select: Organization level software support Project or Repository level development cycle Project
    Select: Milestone as the version that will include these changes
  • After submitting the PR, select Development with the original issue number.
  • After the PR is approved, merge your changes. If permissions do not allow this, request that the reviewer do the merge.
  • Close the linked issue and delete your feature or bugfix branch from GitHub.

Copy link
Collaborator

@hsoh-u hsoh-u left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message was changed for ascii2nc

ERROR  : set_format() -> unsupported ASCII observation format "python".

to

ERROR  : set_format() -> Support for Python has not been compiled!
ERROR  : To run Python scripts, recompile with the --enable-python option.

@JohnHalleyGotway JohnHalleyGotway merged commit b010b37 into develop Nov 3, 2022
@JohnHalleyGotway JohnHalleyGotway deleted the feature_2277_python_warning branch November 3, 2022 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Print ASCII2NC warning message about python embedding support not being compiled
2 participants