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

Fixing Test Failures: Dependency Updates and Fixture Adjustments #67

Merged
merged 1 commit into from
Feb 28, 2025

Conversation

MAYANK12SHARMA
Copy link
Contributor

Pull Request

Description

This PR fixes failing test cases and ensures smooth execution of the test suite for the open-data-pvnet repository. The issues were primarily related to missing dependencies (tomli, pytest-mock) and incorrect fixture setups for tests involving mocker.

  • Changes tomli to latest dependency tomllib, which is compatible with Python 3.11
  • Adds pytest-mock to dev dependencies
  • Changes {dict(ds.dims)} to {dict(ds.sizes)} to ensure compatibility with the latest updates

Fixes: #64


How Has This Been Tested?

The changes were tested by running the full test suite locally and in the CI pipeline. After the fix, all tests passed successfully without any fixture 'mocker' not found errors.

  • Ran pytest locally with coverage
  • Checked CI logs to ensure test runs complete without fixture errors

Checklist:

  • My code follows OCF's coding style guidelines
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation (if needed)
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked my code and corrected any misspellings

@MAYANK12SHARMA
Copy link
Contributor Author

Hi @peterdudfield, As the main issue is of mocker. So I have added it into main dependencies rather than optional dependencies which result 1 successful check but other is failing. would you like to help me to correct another failing check?

I think there is some changes required in "openclimatefix/.github/.github/workflows/python-test.yml" file ?
What you think ?

@peterdudfield
Copy link
Contributor

It looks like the CI is working, im not sure why one fails, and one doesnt, but I think its good to merge. What do you think?

@MAYANK12SHARMA
Copy link
Contributor Author

Yes, please proceed with merge.

@peterdudfield peterdudfield merged commit 34cda2d into openclimatefix:main Feb 28, 2025
2 of 4 checks passed
@peterdudfield
Copy link
Contributor

@all-contributors please add @MAYANK12SHARMA for infra

Copy link
Contributor

@peterdudfield

I've put up a pull request to add @MAYANK12SHARMA! 🎉

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.

Fix tests
2 participants