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 Python Embedding scripts #2264

Merged
merged 1 commit into from
Oct 18, 2022
Merged

Clean up Python Embedding scripts #2264

merged 1 commit into from
Oct 18, 2022

Conversation

georgemccabe
Copy link
Collaborator

Clean up example Python Embedding scripts so they are easier for users to copy and adapt to their data.

  • Removed future imports since they were used to transition from python 2 to 3
  • Rearranged logic to be more readable by checking error conditions and exiting if they are not met instead of putting all of the logic to run inside the if statement

Expected Differences

  • Do these changes introduce new tools, command line arguments, or configuration file options? [Yes or 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)? [Yes or No]

    If yes, please describe:

Pull Request Testing

  • Describe testing already performed for these changes:

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

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

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

  • Will this PR result in changes to the test suite? [Yes or 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)
    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.

… 2 to 3. Rearranged logic to be more readible by checking error conditions and exiting if they are not met instead of putting all of the logic to run inside the if statement
@georgemccabe georgemccabe added this to the MET 11.0.0 milestone Sep 19, 2022
@JohnHalleyGotway JohnHalleyGotway requested review from hsoh-u and removed request for JohnHalleyGotway October 13, 2022 20:14
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.

I tested missing argument cases. The modification is 1) switching if and else condition and moving code without modification and 2) removing unused import.

@hsoh-u hsoh-u merged commit 4cf28a3 into develop Oct 18, 2022
@JohnHalleyGotway JohnHalleyGotway deleted the feature_cleanup_py branch February 28, 2023 19:55
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.

2 participants