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

Merge develop (added tests) to main_v3.0 #416

Open
wants to merge 10 commits into
base: main_v3.0
Choose a base branch
from
Open

Merge develop (added tests) to main_v3.0 #416

wants to merge 10 commits into from

Conversation

bikegeek
Copy link
Collaborator

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:

  • Do these changes introduce new SonarQube findings? [Yes or No]

    If yes, please describe:

  • Please complete this pull request review by [Fill in date].

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) and Development issue
    Select: Milestone as the version that will include these changes
    Select: Coordinated METplus-X.Y Support project for bugfix releases or METcalcpy-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.

jprestop and others added 6 commits November 13, 2024 13:09
…e tests when changes are pushed to main_vX.Y and develop branches
* 401: Add basic tests for untested modules

* 401: fix sonarQube issue

* 401: more sonarqube fixes
* 401: Migrate install to pyproject.toml

* remove modification to __init__.py

* Remove setup.py references from docs
@bikegeek bikegeek changed the title Develop Merge develop (added tests) to main_v3.0 Nov 20, 2024
bikegeek and others added 3 commits November 20, 2024 10:18
* 401: initial commit

* 401: improve 3d volrat test
@bikegeek
Copy link
Collaborator Author

bikegeek commented Dec 9, 2024

Merging tests for volrat created by John Sharples (originally into develop branch) into the main_v3.0

@jprestop
Copy link
Collaborator

jprestop commented Dec 9, 2024

Merging tests for volrat created by John Sharples (originally into develop branch) into the main_v3.0

I checked out the main_v3.0 branch from METcalcpy and METplotpy and ran the tests to ensure all of the tests still pass. Thankfully, they do. But only with the addition of the command "cp test/conftest.py test/hovmoeller/". @bikegeek Have you been able to look into why this is happening? Do you anticipate we will need to run this command in the official release instructions for WCOSS2?

@bikegeek
Copy link
Collaborator Author

bikegeek commented Dec 9, 2024 via email

@bikegeek
Copy link
Collaborator Author

bikegeek commented Dec 9, 2024

@jprestop, I'm not sure. Strangely, I can run the pytest command from the METplotpy/test directory, and the hovmoeller plot passes. I cannot reproduce what is observed on WCOSS2. Perhaps it would be best to provide that copy command for installation on WCOSS2. The tests also pass within a Github action, which indicates that there is something different with the WCOSS2 environment?

@jprestop
Copy link
Collaborator

@bikegeek Based on this message, I thought that you were able to reproduce the error on WCOSS, just not through GHA:

it looks like pytest isn't picking up on the fixtures in the METplotpy/test/conftest.py file. John Sharples is creating the netcdf input test file "on the fly" via a fixture (code is in conftest.py ). What's puzzling is that the other tests that use fixtures in conftest.py work OK. The error message you see corresponds to the inability to find the fixtures used in hovmoeller. When I copy the conftest.py file into the hovmoeller directory, everything works.
When I query what fixtures are in a particular test path (i.e. bar), it lists the fixtures in the conftest.py. However, when changing the test path to hovmoeller, only the built-in fixtures are found (which is what we see in the error message). I don't understand why these tests run without error inside GHA.
For now, can you verify that by copying the conftest.py from METplotpy/test to METplotpy/test/hovmoeller and re-run to verify that the tests run without error.

In either case, we can include the copy command in the instructions, but it seems like there should be a better longer term solution as a fix or we should put a permanent copy of conftest.py in the METplotpy/test/hovmoeller in the repository. Thoughts?

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

Successfully merging this pull request may close these issues.

4 participants