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 685 group pytests #1692

Merged
merged 36 commits into from
Jul 14, 2022
Merged

Feature 685 group pytests #1692

merged 36 commits into from
Jul 14, 2022

Conversation

georgemccabe
Copy link
Collaborator

@georgemccabe georgemccabe commented Jul 7, 2022

Change Summary:

  • Created markers to group pytests
  • Enhanced unit test logic to run each group of pytests instead of all at once (see notes in Internal: Improve use case testing #685)
  • Marked all unit tests with a custom marker to group tests
  • Cleaned up test logic including removing unused imports and removing unnecessary parenthesis in assert statements

Note some changes to the GHA logic are not necessary for the final solution that was implemented, but I left those changes in place because they don't hurt and are necessary if we ever decide to split the pytest job into multiple jobs in the future.

Pull Request Testing

  • Describe testing already performed for these changes:

Ensured all tests pass and time to run the pytest job was greatly reduced (from ~30m to ~10m)

  • Recommend testing for the reviewer(s) to perform, including the location of input datasets, and any additional instructions:
  • Review changes to automation logic in case in case similar logic could benefit other METplus components
  • Ensure all automated test checks pass
  • Do these changes include sufficient documentation updates, ensuring that no errors or warnings exist in the build of the documentation? [Yes]

Added info to Contributor's Guide about new functionality

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

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

    The test suite should take less time to run, but everything should still pass as usual.

  • Please complete this pull request review by 7/13/2022.

Pull Request Checklist

See the METplus Workflow for details.

  • Add any new Python packages to the METplus Components Python Requirements table.
  • 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 Linked issues 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.

…oups of tests in automation to speed things up. removed unused imports from tests and removed parenthesis from assert statements when they are not needed
…est' to does not start with 'pytest' to allow groups of pytests
… tests involve plotting but the other StatAnalysis tests produce output that are used in the plotting tests
@georgemccabe georgemccabe added this to the METplus-5.0.0 milestone Jul 7, 2022
@georgemccabe georgemccabe linked an issue Jul 7, 2022 that may be closed by this pull request
21 tasks
Copy link
Contributor

@hankenstein2 hankenstein2 left a comment

Choose a reason for hiding this comment

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

Everything ran well on seneca. I think this will be useful for METplotpy and METcalcpy but might take us a bit to incorporate.

@georgemccabe georgemccabe merged commit c7e275b into develop Jul 14, 2022
@georgemccabe georgemccabe deleted the feature_685_group_pytests branch July 14, 2022 21:21
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.

Internal: Improve use case testing
2 participants