I'm very happy to announce the release of py5 0.10.0a0. It is a major release with many new features and bug fixes.
This release was an enormous amount of work. In particular, over the past two months I had been testing and fixing the new features and writing pages and pages of critical documentation to explain the ways py5 integrates with other Python libraries. On top of that, I had a trip to Miami, family health problems, and the holidays to deal with. Plus, I caught COVID a week ago (and am still testing positive.) It's been a difficult time.
Nevertheless, I am pleased to have this release available for you to start exploring. I'm very excited to see what people do with these 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.
There are too many new features for me to list all the details here. Instead, I'll leave this example image of something that is now possible with py5.
I'll encourage you to read the Python Ecosystem Integrations documentation to find out how to make this image yourself.
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.
If someone wants to help out with this, please let me know. I'd be happy to work with you on it.
gto access the primary Py5Graphics object is no longer supported. Users should use
get_np_pixels()methods added to Sketch, Py5Graphics, and Py5Image. Issue #329: feature idea: how about a get_np_pixels() method?
py5_tools.capture_frames()functions now have a
frame_numbersparameter. Issue #350: Enhancement: Add precise frame control to py5_tool.animated_gif()
Py5Shape objects now have
depthproperties. Issue #352: Could Py5Shape objects have a .width and a .height using @property?
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.
And finally, I want to emphasize that py5's use of a Processing fork has nothing to do with the events that took place last October. Although I am concerned about what is happening with the Processing Foundation and the Processing project, I have full confidence that the Processing community will continue to thrive and that the Processing project will continue to be a great tool for creative coding long into the future.
Sponsor Py5coding on GitHub
Like py5? Want to help support its development? Consider sponsoring py5 on GitHub.
I started working on py5 almost 4 years ago right when the pandemic lockdown started as a way to manage my anxiety about the situation. Since then, the library has grown into a full-featured tool for creative coding that is used all around the world. I'm grateful for the support of everyone I met along the way who has helped py5 grow into the capable library that it is today. I love working on this, but it does take a lot of time and is very much like a part time job for me.
I'm not going to pressure anyone into becoming a sponsor and I do ask that if you are struggling financially for any reason that you don't sponsor py5. But if you are in a position to sponsor py5, please consider doing so. Your sponsorship will help me continue to work on py5 and make it a better tool for everyone to use.
I have a gallery show coming up in April and I know I will be very busy preparing for that. Most likely the next py5 release will be in February or March and will be a maintenance release with bug fixes and minor improvements.
Looking farther down the road into 2024, I'd like to expand py5's integration with other Python libraries. In particular, I'd like to do more with matplotlib and other data visualization libraries.
You should know that Python 3.8's end-of-life is in October of 2024. py5 will drop support for 3.8 sometime over the summer. Also, JPype now supports Python 3.12, so py5 supports it as well.
And finally, and I know I keep saying this, but I need to setup unit tests and get GitHub actions working for the py5generator repository. As the py5 community grows I want to ensure that py5 is a reliable tool for everyone to use. Unit tests are an essential part of reliability.