neozhaoliang / pywonderland

A tour in the wonderland of math with python.
MIT License
4.18k stars 346 forks source link

Question about gifmaze module and pypi #17

Closed Lucas-C closed 5 years ago

Lucas-C commented 5 years ago

Hello.

I would lile to contribute to the gifmaze module, but I am a bit lost between the various versions of this code.

So :

Regards

neozhaoliang commented 5 years ago

Hi, you are right, the gifmaze project was originally named wilson and it was designed for making gif animations of Wilson's algorithm only. Later I added animations for other maze-generation and maze-solving algorithms so I renamed it to gifmaze.

The gifmaze module in pypi was published by me exactly after I accomplished most of the algorithms here, there was also a repo for this module, it got about 50 stars and a dozen forks, so a few people on github are also maintaining other versions of it. I deleted that repo later because I found it's not as a formal/serious module as I thought because I had to completely rewrite it before other people (without knowing gif89a spec) could use it. I'm not going to maintain/publish the pypi module any more. I have lots of plans to implement here in this repo.

And yes, pull requests are welcomed! It's sad that nobody has made pull requests that add new features/scripts to this repo since it's created, and as the repo gets larger and larger it becomes more difficult for myself only to improve it, so if you are planning any contributions that would be great!

Oh, if you want to contribute to the pypi module, I would like to transfer the ownership to you if it's required. but currently I have no idea how to transfer a deleted repo to others.

Lucas-C commented 5 years ago

Thanks for the fast and detailed answer !

I submitted a PR: https://github.com/neozhaoliang/pywonderland/pulls/1 The idea was to factor out a part of the Maze class because I wanted a simple GIF generator. Here is a dummy use case : https://github.com/Lucas-C/dotfiles_and_notes/blob/master/languages/python/favicon.py

I'm sad that gifmaze Pypi package is discontinued, because that mean I won't be able to reuse that PixelCanvas easily :P :) But I do not wish to become the maintainer of this package.

neozhaoliang commented 5 years ago

I have merged the PR, and it's reasonable that PixelCanvas should remove the restriction that width and height must both be odd integers. Maybe you could also add a docstring for the PixelCanvas class?

I found a bug in your PR and I think I have fixed it in a new commit. It should be get_pixel, not get_cell here, otherwise when rendering a PixelCanvas object it will report an error "has no attribute get_cell".

Lucas-C commented 5 years ago

You are right ! Sorry I missed that. I'm going to close this issue now, as you answered very thoroughly to my question :)