GSoC 2019: p5py ideas and improvements

Hello everyone!
My name is Lev, and I love Processing! I have been working with it for almost 3 years, but I never got a chance to contribute to this project, and I am very interested in doing so. In particular, I was looking into its native Python port - p5py. Although Processing.py provides great API too, it has some limitations, which I hope we can overcome with p5py. Some things I think I can solve are:

  • Implementing some missing functionality regarding fonts, images, and shapes (as well as fixing some bugs)
  • Improving documentation, wiki, creating a guide for contributors as well as adding more examples
  • doing any necessary refactoring and optimization

I also have an idea of a tool for converting between Processing.py sketches and p5py sketches (since they are not compatible), which I think would be useful for those who often create Processing sketches on Python. It can either be a standalone tool are a compatibility mode of some kind.

I have a strong knowledge of both Processing framework and Python language, so I hope my skills will be useful. Please, let me know what you think! Any suggestions are welcome!

1 Like

Implementing some missing functionality regarding fonts, images, and
shapes (as well as fixing some bugs)

Some of this was added during last year’s GSOC already (see release
notes: https://p5.readthedocs.io/en/latest/releasenotes/0.5.0.html).
The issues we’d like to prioritize for this year’s GSOC have been
listed here:
https://github.com/processing/processing/wiki/Project-List#-native-python-and-processing-priority

I also have an idea of a tool for converting between Processing.py
sketches and p5py sketches (since they are not compatible), which I
think would be useful for those who often create Processing sketches
on Python. It can either be a standalone tool are a compatibility
mode of some kind.

That’s a very good idea! A tool like that would be very interesting to
have. However, I think this should be done as a part of a larger GSOC
project.

Let me know if you have more questions!

Hello @abhikpal and thank you for your reply!
I am glad you like my idea and I agree that this should be a part of a larger project, focused on improving p5py’s functionality.
I checked the prioritized issues and I am very interested in implementing the solutions. I have to admit, I don’t have a lot of experience with OpenGL, but I am a fast learner and I am looking into it right now (please, let me know if this is a problem). Also, I am getting familiar with p5py’s codebase and making a concrete list of missing features among those listed in the post.
Finally, I am exploring options for an existing crossplatform module for handling sound in python, which can serve as a basement for a wrapper module that would provide familiar Processing API. Currently, pymedia seems to be the best fit for this purpose (pymedia.org).

This sounds like a lot, but I hope this can be done within the scope of GSoC. Please, let me know what you think! Also, if you have any suggestions about forming the proposal (what to prioritize and/or what to exclude), I would love to hear from you! Thank you.

@abhikpal, one thing I notice is not mentioned in the p5py priorities list is mode integration.

Is making p5py a PDE mode on the roadmap, or should it be? Not being a mode is a pretty big barrier to distribution / ease of use in the classroom / casual users.

@abhikpal, one thing I notice is not mentioned in the p5py
priorities list is mode integration.

Is making p5py a PDE mode on the roadmap, or should it be? Not being
a mode is a pretty big barrier to distribution / ease of use in the
classroom / casual users

It never occurred to me! It does sound like a brilliant idea, though.
Personally, I haven’t worked with the PDE code at all to know what a
native Python mode will entail.

@Manindra, any thoughts on this? Do we consider adding this as a
possible project?

1 Like

I checked the prioritized issues and I am very interested in
implementing the solutions. I have to admit, I don’t have a lot of
experience with OpenGL, but I am a fast learner and I am looking
into it right now (please, let me know if this is a problem). Also,
I am getting familiar with p5py’s codebase and making a concrete
list of missing features among those listed in the post.

The required OpenGL knowledge depends on the exact feature you want to
focus on.

Finally, I am exploring options for an existing crossplatform module
for handling sound in python, which can serve as a basement for a
wrapper module that would provide familiar Processing API.
Currently, pymedia seems to be the best fit for this purpose
(pymedia.org).

I didn’t know of this. Just from a cursory glance at the webpage it
seems that the last release was in 2006. If we’re adding something as
a dependency, it might make sense to use a library that is actively
being developed. Moreover, does this support Python 3?

Is making p5py a PDE mode on the roadmap, or should it be? Not being
a mode is a pretty big barrier to distribution / ease of use in the
classroom / casual users

While there are good benefits from building a mode for p5py, I don’t think it’s necessarily the direction we want to take with p5py at the moment. Our current priorities are around making it feature complete with Processing Java, and making it as performant as possible. Also, there’s already a processing mode for python that’s jython based. So mode support is something we can revisit in the future.

1 Like

Hello Everyone I am Shiwank, a B.Tech CSE 3rd Year student from Sanskriti University. I am interested in improving p5py project.For past few days I am looking over the source code and also trying to solve this issue

Arc does not render correctly with transparency #91.

It has something to do with _tessellate function.
While looking for solution I have also discovered another issues with arc function.
@abhikpal Sir plz let me know how PShape class works here as it is responsible for further rendering of shapes and filling color inside using renderer.py

What exactly are you confused about regarding the role of PShape here. Also, if this is a question about the actual code, please bring it up in the main repository (as a comment on the issue you’re working on, for instance).

It was about Arc class(inheriting PShape class).I ll comment the line in repository where I need your help.

@abhikpal Hello Sir I want to ask you that I have written code for not implemented blending filters in Image.py file ,I was wishing your look over it.I was in a mood to make a pull request but the contribution guidelines says that this project is not looking for code contributions right now…what should I do?
It would be helpful if I come to know whether the code is fine as per your perspective.

1 Like

That paragraph was a bit outdated. I have removed it now and you can make a pull request with your changes!

2 Likes

Yeah…Thanks Sir I am very enthusiastic to make contribution in our project.Please have a look over that.:smiley: