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

Update testing matrix, start using image comparison #40

Merged
merged 7 commits into from
Feb 14, 2024
Merged

Conversation

A-CGray
Copy link
Member

@A-CGray A-CGray commented Feb 14, 2024

Purpose

Update the versions of python, numpy and matplotlib we test against, now using python 3.9/10/11. For numpy and matplotlib I'm using both the latest release and the oldest supported release as listed here. This reduces the total number of CI jobs as we used to test against 3 versions of numpy.

Secondly, I was finally able to implement some parsing so that the image comparison checks I added in #30 only fail if the number of pixels that differ between images is > 0.05%, this should mean the test will only fail when there are actual meaningful differences between the images.

Expected time until merged

Type of change

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (non-backwards-compatible fix or feature)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Documentation update
  • Maintenance update
  • Other (please describe)

Testing

Checklist

  • I have run flake8 and black to make sure the Python code adheres to PEP-8 and is consistently formatted
  • I have formatted the Fortran code with fprettify or C/C++ code with clang-format as applicable
  • I have run unit and regression tests which pass locally with my changes
  • I have added new tests that prove my fix is effective or that my feature works
  • I have added necessary documentation

@A-CGray A-CGray requested a review from a team as a code owner February 14, 2024 14:44
@A-CGray A-CGray requested a review from eytanadler February 14, 2024 14:44
@eytanadler
Copy link
Collaborator

Is there any world in which the reference images could be generated slightly differently on different operating systems or Python environment setups and cause these tests to fail? If I remember correctly, there have been cases when I've used matplotlib and gotten different results on different computers.

@A-CGray
Copy link
Member Author

A-CGray commented Feb 14, 2024

Is there any world in which the reference images could be generated slightly differently on different operating systems or Python environment setups and cause these tests to fail? If I remember correctly, there have been cases when I've used matplotlib and gotten different results on different computers.

Yeah, that's what the tolerance on the allowable fraction of different pixels is meant to handle.

Copy link
Collaborator

@eytanadler eytanadler left a comment

Choose a reason for hiding this comment

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

Ok, looks good to me then! My only request is to undo bumping the patch, because no lines in the source code have actually changed (the PyPI code will be identical).

@A-CGray
Copy link
Member Author

A-CGray commented Feb 14, 2024

Ok, looks good to me then! My only request is to undo bumping the patch, because no lines in the source code have actually changed (the PyPI code will be identical).

I was bumping the version due to the changes in #39 , but I can put that in a separate PR if you want

@eytanadler eytanadler self-requested a review February 14, 2024 17:15
Copy link
Collaborator

@eytanadler eytanadler left a comment

Choose a reason for hiding this comment

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

Oh ok, I didn't realize

@eytanadler eytanadler merged commit b23b4d8 into main Feb 14, 2024
17 checks passed
@eytanadler eytanadler deleted the CI-update branch February 14, 2024 17:16
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.

2 participants