Skip to content

py5's Python Ecosystem Integration

Pre-release
Pre-release
Compare
Choose a tag to compare
@hx2A hx2A released this 30 Dec 22:31
· 6 commits to main since this release
7176872

This is a major release with many new features.

New Features

The major theme of this release is expanding and improving py5's Python ecosystem integrations. This release includes new features for working with matplotlib, Shapely, and Trimesh through the new convert_shape() method and the upgraded convert_image() method. It also includes a new color mode called CMAP that is built around matplotlib colormaps.

The documentation for these new features is extensive. There is now a new section in the documentation called Python Ecosystem Integrations that explains how py5 integrates with other Python libraries. This covers the new features in this release as well as existing features that perhaps some people didn't know about.

Removed Features

Unfortunately, the py5_tools.sketch_portal() function has been removed from py5. The functionality was broken because of recent upgrades in Jupyter. I tried to fix it but couldn't figure out how to make it work again. I know it has something to do with changes to Jupyter and Jupyter Widgets. Programming Jupyter Widgets is very difficult and involves a lot of confusing Python and TypeScript code.

The SketchPortal feature wasn't that great of a tool to begin with and it doesn't seem that very many people were using it anyway.

My plan for the future is to re-implement this feature using the Python library anywidget. This seems to be a much more robust and reliable approach that will cause less headaches for me.

Other Changes

Closed Issues

There are many more bugs fixes in this release than the ones listed here. When I find small bugs with easy solutions I often fix them right away without opening an issue recording it.

Processing Code Changes

In addition to the above, this release includes a few Processing code bug fixes.

The new convert_shape() method needed a fix for issue #643 so I found a fix for it. It took two PRs because my first PR wasn't quite right.

The second issue, #781, was discovered while reviewing py5's example code. It was an easy fix.

None of these code changes have been part of a Processing release yet and one of the PRs still hasn't been merged into the main branch. I can't wait for that to happen so this py5 release is using the fix791 branch of my fork of the Processing repo. Once the last PR is merged and the code is released, py5 will go back to using the latest Processing core jars.