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

Bugfix #2755 header counter main_v11.1 #2773

Merged

Conversation

hsoh-u
Copy link
Collaborator

@hsoh-u hsoh-u commented Dec 20, 2023

Support single point data

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:

/d1/personal/hsoh/git/pull_request/MET_bugfix_2755_python_emb_for_single_point_obs_main_v11.1/bin/plot_point_obs 'PYTHON_NUMPY=/d1/personal/hsoh/git/pull_request/MET_bugfix_2755_python_emb_for_single_point_obs_main_v11.1/share/met/python/examples/read_ascii_point.py /d1/personal/hsoh/data/MET-2755/test_11_column_input.1row' pointdata_numpy_python_single.ps -dotsize 2.0 -v 4

DEBUG 3: Running MET compile time python instance (/nrit/ral/met-python3/bin/python3.10) to run user's python script (/d1/personal/hsoh/git/pull_request/MET_bugfix_2755_python_emb_for_single_point_obs_main_v11.1/share/met/python/examples/read_ascii_point).
Python Script:  '/d1/personal/hsoh/git/pull_request/MET_bugfix_2755_python_emb_for_single_point_obs_main_v11.1/share/met/python/examples/read_ascii_point.py'
Input File:     '/d1/personal/hsoh/data/MET-2755/test_11_column_input.1row'
     point_data: Data Length:   1
     point_data: Data Type:     <class 'list'>
DEBUG 2: Processing 1 observations at 1 locations.
  • Recommend testing for the reviewer(s) to perform, including the location of input datasets, and any additional instructions:

    test with other data

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

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

  • 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 [Fill in date].

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) and Development issue
    Select: Milestone as the version that will include these changes
    Select: Coordinated METplus-X.Y Support project for bugfix releases or MET-X.Y.Z Development project for official releases
  • After submitting the PR, select the ⚙️ icon in the Development section of the right hand sidebar. Search for the issue that this PR will close and select it, if it is not already selected.
  • 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.

@hsoh-u hsoh-u added this to the MET 11.1.1 (bugfix) milestone Dec 20, 2023
@hsoh-u hsoh-u linked an issue Dec 20, 2023 that may be closed by this pull request
23 tasks
@hsoh-u hsoh-u changed the title Bugfix #2755 header counter mainv_11.1 Bugfix #2755 header counter main_v11.1 Dec 20, 2023
@JohnHalleyGotway JohnHalleyGotway self-requested a review January 22, 2024 18:21
Copy link
Collaborator

@JohnHalleyGotway JohnHalleyGotway left a comment

Choose a reason for hiding this comment

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

I approve of these changes.

I tested this on seneca using the following commands:

cd /d1/personal/johnhg/MET/MET_development/MET-main_v11.1
export PYTHONPATH=/d1/personal/johnhg/MET/MET_development/MET-main_v11.1/share/met/python

# Pick off a single input observation line
head -1 data/sample_obs/ascii/sample_ascii_obs.txt > one_line.txt

# Test stand-alone python script... it works
/nrit/ral/met-python3/bin/python3 scripts/python/examples/read_ascii_point.py one_line.txt

# Test main_v11.1 version of plot_point_obs... it errors out
bin/plot_point_obs 'PYTHON_NUMPY=scripts/python/examples/read_ascii_point.py one_line.txt' plot.ps
# ERROR  : process_point_data_list -> The header is empty. Please check the python script and input

# Checkout the bugfix branch and install
git checkout bugfix_2755_python_emb_for_single_point_obs_main_v11.1
rm src/tools/other/plot_point_obs/plot_point_obs
make install

# Re-test using bugfix version of plot_point_obs... it works!
bin/plot_point_obs 'PYTHON_NUMPY=scripts/python/examples/read_ascii_point.py one_line.txt' plot.ps

# DEBUG 2: Finished plotting 1 locations for plot.ps.

I inspected the small set of code changes and they look fine to me.

@JohnHalleyGotway JohnHalleyGotway removed the request for review from DanielAdriaansen January 22, 2024 18:38
@hsoh-u hsoh-u merged commit aab399e into main_v11.1 Jan 22, 2024
34 checks passed
@hsoh-u hsoh-u deleted the bugfix_2755_python_emb_for_single_point_obs_main_v11.1 branch February 20, 2024 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

Bugfix: Fix Python embedding failure when providing a single point observation
2 participants