Skip to content

Commit 94bcd20

Browse files
committedMar 16, 2023
build!: Update planetarium dependency to v0.2.0
This is a breaking change, because planetarium v0.2 output images are calculated with higher precision and are therefore different from equivalent planetarium v0.1 outputs. The public package API is still the same as in versions 0.1.x. Update failing integration tests. Bump the package version to 0.2.0.
1 parent fd0854d commit 94bcd20

File tree

3 files changed

+29
-29
lines changed

3 files changed

+29
-29
lines changed
 

‎Cargo.lock

+21-21
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "pyplanetarium"
3-
version = "0.1.6"
3+
version = "0.2.0"
44
description = "Python bindings for Rust Planetarium rendering library"
55
repository = "https://github.com/ravenexp/pyplanetarium"
66
authors = ["Sergey Kvachonok <ravenexp@gmail.com>"]
@@ -15,7 +15,7 @@ crate-type = ["cdylib"]
1515

1616
[dependencies]
1717
pyo3 = { version = "0.18", features = ["extension-module", "abi3-py37", "generate-import-lib"] }
18-
planetarium = "0.1.6"
18+
planetarium = "0.2"
1919

2020
[profile.release]
2121
lto = true

‎tests/test_canvas.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -265,11 +265,11 @@ def test_export_images(self) -> None:
265265

266266
png8_bytes = canvas.export_image(ImageFormat.PngGamma8Bpp)
267267
self.assertIsInstance(png8_bytes, bytes)
268-
self.assertEqual(len(png8_bytes), 1283)
268+
self.assertEqual(len(png8_bytes), 1301)
269269

270270
png16_bytes = canvas.export_image(ImageFormat.PngLinear16Bpp)
271271
self.assertIsInstance(png16_bytes, bytes)
272-
self.assertEqual(len(png16_bytes), 2737)
272+
self.assertEqual(len(png16_bytes), 2743)
273273

274274
# with open("image8.raw", "wb") as f:
275275
# f.write(raw8_bytes)
@@ -325,11 +325,11 @@ def test_export_window_images(self) -> None:
325325

326326
png8_bytes = canvas.export_window_image(wnd1, ImageFormat.PngGamma8Bpp)
327327
self.assertIsInstance(png8_bytes, bytes)
328-
self.assertEqual(len(png8_bytes), 254)
328+
self.assertEqual(len(png8_bytes), 256)
329329

330330
png16_bytes = canvas.export_window_image(wnd2, ImageFormat.PngLinear16Bpp)
331331
self.assertIsInstance(png16_bytes, bytes)
332-
self.assertEqual(len(png16_bytes), 667)
332+
self.assertEqual(len(png16_bytes), 670)
333333

334334
def test_export_subsampled_images(self) -> None:
335335
"""
@@ -371,11 +371,11 @@ def test_export_subsampled_images(self) -> None:
371371

372372
png8_bytes = canvas.export_subsampled_image((2, 2), ImageFormat.PngGamma8Bpp)
373373
self.assertIsInstance(png8_bytes, bytes)
374-
self.assertEqual(len(png8_bytes), 425)
374+
self.assertEqual(len(png8_bytes), 430)
375375

376376
png16_bytes = canvas.export_subsampled_image((4, 4), ImageFormat.PngLinear16Bpp)
377377
self.assertIsInstance(png16_bytes, bytes)
378-
self.assertEqual(len(png16_bytes), 311)
378+
self.assertEqual(len(png16_bytes), 309)
379379

380380
def test_export_window_error(self) -> None:
381381
"""

0 commit comments

Comments
 (0)