4 ms·
Author here: I created Bowler as a "hackamonth" project when I joined Facebook's internal Python Foundation team. We've already used it for a bunch of random c
by nuclear_eclipse 8y ago
Author here: I created Bowler as a "hackamonth" project when I joined Facebook's internal Python Foundation team. We've already used it for a bunch of random codemods that touch a large number of source files throughout our codebase.
Happy to answer any questions you might have!
- loeg 8y agohttps://pybowler.io/docs/basics-setup https://pybowler.io/docs/basics-setup mentions a facebook/bowler github repository, but no such repository exists (or it is private). Where does the source code live? Edit: Found it — it's currently at https://github.com/facebookincubator/bowler https://github.com/facebookincubator/bowler instead.
- nuclear_eclipse 8y agoGood catch, I'll get that fixed! [edit: fixed now!]
- loeg 8y agoExcellent! Thanks for the quick fix.
- Cynddl 8y agoHow does it compare to redbaron? [1] > RedBaron is a python library and tool powerful enough to be used into IPython solely that intent to make the process of writing code that modify source code as easy and as simple as possible. That include writing custom refactoring, generic refactoring, tools, IDE or directly modifying you source code into IPython with a higher and more powerful abstraction than the advanced texts modification tools that you find in advanced text editors and IDE. [1] https://github.com/PyCQA/redbaron https://github.com/PyCQA/redbaron
- nuclear_eclipse 8y agoI haven't actually used RedBaron, but from glancing at the docs, it would look like there are two primary differences: 1) RedBaron uses a procedural API that modifies state continuously as you call methods on the class, whereas Bowler allows you expressive a series of queries/transforms up front, and then execute those all at once on your entire codebase. This also allows Bowler to provide a fluent API, so that you can chain all method calls from each other. 2) RedBaron uses a custom AST implementation, which still lists "Python 3.7 support" on its roadmap. Building on "fissix" (a backport of lib2to3) means that Bowler had day one support for Python 3.7 syntax, and already supports the provisional Python 3.8 syntax. This means your refactoring tools will never prevent you from adopting new versions of Python as soon as they are released.