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 318 add db for testing #326

Merged

Conversation

John-Sharples
Copy link

In this PR

  • Adding mariaDB to the GitHub actions build for unit testing
  • Now running tests for METdbLoad in GitHub actions
  • Added several functions and fixtures to conftest to facilitate working with the database
  • Added an example test for met_db_load
  • Uses test data from METreformat
  • minor refactoring of met_db_load to separate argparse from main code
  • removed a bunch of relative imports

Still to do / decide:

  • Are we happy to use the test data from METrefactor?
  • Address TODO comments in review.
  • Update doco

Pull Request Testing

  • Describe testing already performed for these changes:

    Ran met_db_load on example dataset.

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

    NA

  • 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]
    Yes

  • 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:

    Yes as described above

  • 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 METdataio-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.

* Update conftest with fixtures to access and update
test database mv_test

* Add fixure to clean database (drop/recreate)

* Add fixture to access test data in METreformat

* Add example test of met_db_load.py
Copy link
Collaborator

@bikegeek bikegeek left a comment

Choose a reason for hiding this comment

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

GHA has issues with /usr/bin/git and the usual SonarQube quality gate issues.

@John-Sharples John-Sharples merged commit bb65007 into dtcenter:develop Sep 5, 2024
7 of 9 checks passed
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