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

Fix the dpi related cron job failures #875

Merged
merged 2 commits into from Jul 20, 2021
Merged

Conversation

aaronayres35
Copy link
Contributor

@aaronayres35 aaronayres35 commented Jul 19, 2021

There was a recent pillow release which included this change: python-pillow/Pillow#5476
That was causing the cron job to fail with:

======================================================================
FAIL: test_save_dpi (kiva.tests.test_agg_drawing.TestAggDrawing)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.8.11/x64/lib/python3.8/site-packages/kiva/tests/test_agg_drawing.py", line 24, in test_save_dpi
    self.assertEqual(self.save_and_return_dpi(), 144)
AssertionError: 143.99259999999998 != 144

======================================================================
FAIL: test_save_dpi (kiva.tests.test_celiagg_drawing.TestCeliaggDrawing)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.8.11/x64/lib/python3.8/site-packages/kiva/tests/test_celiagg_drawing.py", line 22, in test_save_dpi
    self.assertEqual(self.save_and_return_dpi(), 144)
AssertionError: 143.99259999999998 != 144

----------------------------------------------------------------------

This PR simply adjusts for this by adding an int() call when we get the dpi. Note the above pillow PR explains why this started occurring.

fixes #866

@aaronayres35
Copy link
Contributor Author

aaronayres35 commented Jul 19, 2021

I've manually triggered the cron job on this branch to verify this fix: https://github.com/enthought/enable/actions/runs/1045927150

EDIT: ah and it doesn't fix it! int(143.99259999999998) is 143. using round does what we expect.
new run with round: https://github.com/enthought/enable/actions/runs/1046114933

@rahulporuri rahulporuri added this to To be considered in Enthought OSS Q3 2021 via automation Jul 20, 2021
@rahulporuri rahulporuri moved this from To be considered to In progress in Enthought OSS Q3 2021 Jul 20, 2021
Copy link
Contributor

@rahulporuri rahulporuri left a comment

Choose a reason for hiding this comment

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

LGTM

@rahulporuri rahulporuri removed this from In progress in Enthought OSS Q3 2021 Jul 20, 2021
@aaronayres35 aaronayres35 merged commit 3d469b4 into master Jul 20, 2021
@aaronayres35 aaronayres35 deleted the fix-cron-dpi-failures branch July 20, 2021 12:26
aaronayres35 added a commit that referenced this pull request Jul 20, 2021
* add an int() call to fix test suite failures

* use round not int
aaronayres35 added a commit that referenced this pull request Jul 20, 2021
* Fix the dpi related cron job failures (#875)

* add an int() call to fix test suite failures

* use round not int

* update changelog withh latest fix

* Update CHANGES.txt

Co-authored-by: Poruri Sai Rahul <rporuri@enthought.com>

Co-authored-by: Poruri Sai Rahul <rporuri@enthought.com>
aaronayres35 added a commit that referenced this pull request Jul 20, 2021
* Fix the dpi related cron job failures (#875)

* add an int() call to fix test suite failures

* use round not int

* update changelog withh latest fix

* Update CHANGES.txt

Co-authored-by: Poruri Sai Rahul <rporuri@enthought.com>

Co-authored-by: Poruri Sai Rahul <rporuri@enthought.com>
aaronayres35 added a commit that referenced this pull request Jul 20, 2021
* update changelog in advance of 5.2.1 (#874)

* update changelog in advance of 5.2.1

* Update CHANGES.txt

Co-authored-by: Poruri Sai Rahul <rporuri@enthought.com>

Co-authored-by: Poruri Sai Rahul <rporuri@enthought.com>

* Backport cron job fix (#876)

* Fix the dpi related cron job failures (#875)

* add an int() call to fix test suite failures

* use round not int

* update changelog withh latest fix

* Update CHANGES.txt

Co-authored-by: Poruri Sai Rahul <rporuri@enthought.com>

Co-authored-by: Poruri Sai Rahul <rporuri@enthought.com>

Co-authored-by: Poruri Sai Rahul <rporuri@enthought.com>
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.

Bleeding Edge Cron Job failure
2 participants