Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help wanted - sign up here! #94

Open
Technologicat opened this issue Nov 24, 2023 · 5 comments
Open

Help wanted - sign up here! #94

Technologicat opened this issue Nov 24, 2023 · 5 comments

Comments

@Technologicat
Copy link
Owner

For several years now, I have no longer had the resources to actively contribute to the codebase of pyan, as I have not needed the tool myself.

Since there is a continuing community interest in pyan, I would like to hand over development to the community. Therefore, as posted in README.md as of November 2023, the pyan project is looking for volunteer contributors.

While I have no time to work on the codebase, I will remain available to discuss the design and issues, review PRs, and possibly provide help with Python metaprogramming, provided that my free time allows (which is not 100% guaranteed).

If you are interested in helping, post a comment here, and we'll work out the details. See also #52 (general discussion of the future of pyan) and #63 (setting up PyPI write access).

What you will need to be prepared for:

  • Sudden breaking changes to Python's AST whenever a new minor release (3.x) comes out.
    • Python tends to change some details of its AST representation in almost every minor release, which often breaks metaprogramming projects.
    • Python 3.8 added the := walrus operator. pyan's analyzer does not know about it, thus missing some assignments. Adding that would be a good place to start.
  • Scope analysis headaches.
  • Keeping the codebase as clean, simple, and free of hacks as reasonably possible. (Removing existing hacks is encouraged.) Let's build quality software.

Examples of things that need doing:

  • Support for anything added after Python 3.6. I can help with digging up the information.
  • Packaging! The PyPI package should be kept up to date.
  • Tests. There are basically no automated tests at the moment, which makes it difficult to catch regressions. Adding some minimal example codes and automatically checking the produced graphs (in GraphViz's text format) would help.
  • Ideally, some cleanup/refactoring/redesign.
    • Tuple assignments are not analyzed correctly, but rely on a brittle hack to obtain 80% correct behavior.
    • The last seen value mechanism is a Hail Mary that goes against the very philosophy of Python (refuse the temptation to guess).
    • For a tool that calls itself a static analyzer, pyan is trying too hard to be a dynamic analyzer (simple is better than complex). Briefly put, it shouldn't even attempt anything that, if done manually, would require running code in your head. Looking at definitions, and at their placement in the source code, and drawing conclusions from that information, is all that a static analyzer should do.
  • Developing some contributor guidelines could also be useful.
@mschleu
Copy link

mschleu commented Dec 10, 2023

Hello, I am a frequent user of this tool and would really love to help out. I can start with investigating what support is needed for anything after Python 3.6 as well as adding automated tests.

@Technologicat
Copy link
Owner Author

@mschleu Hi! Thanks for the interest!

Automated tests would be much appreciated!

If I recall, Python 3.7 didn't change the AST, but 3.8 did.

To help get started on support for 3.8+, see my notes in #51, in Technologicat/unpythonic#1 (comment), and optionally also the source code of mcpyrate.unparser.

@mschleu
Copy link

mschleu commented Dec 11, 2023

@Technologicat Great, thank you for the material. I will get started on it this week.

@Technologicat
Copy link
Owner Author

@mschleu Ok. Let me know if you have any questions. I've done a fair bit of work with the AST (up to Python 3.10) in unpythonic and in mcpyrate, so I may be able to answer questions if needed.

@amenrio
Copy link

amenrio commented Dec 22, 2023

Hello! Thank you for your hard work!
I'm a Junior Pipeline and Tools Developer in a small animation studio based in Spain. I stumbled across pyan looking for something exactly like this, something that could extend documentation for our projects and future personal side-projects.
I wanted to help you, albeit my experience is reduced, by any means that I can, maybe small contributions or just being here from time to time.
I'll surf the issues from time to time and if i'm able to contribute, I'll gladly help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants