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.
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, thepyanproject 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:
:=walrus operator.pyan's analyzer does not know about it, thus missing some assignments. Adding that would be a good place to start.symtableto not report the scopes for comprehensions (issue with list comprehension in python 3.12 #93).pyan.Examples of things that need doing:
pyanis 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.