PEP8Speaks - Now helping 5,000 open source projects write neat and clean Python

A blog post to celebrate this milestone! 💖

What is this project? 🐍

PEP8Speaks = PEP 8 + Speaks

GitHub: https://github.com/OrkoHunter/pep8speaks

PEP 8 is Python’s recommended coding style convention, popular across software written in Python language.

PEP8Speaks is a GitHub app which reviews the Python code style in Pull Requests.

How did it start? 📜

My primary motivation to create this project was to reduce the workload of code maintainers and reviewers in Open Source. They spend a valuable amount of time doing code reviews. Checking and fixing code style is something that can be automated. Hence, it must be!

I made the first commit in December 2016. I was in my third year of college. In my first two summer breaks, I had been contributing to Open Source projects in Python, mainly because of the Google Summer of Code program. And in a few months, I was about to be a GSoC mentor, which meant doing code reviews. PEP8Speaks came alive out of my personal need.

Users and adoption 📈

Creating and maintaining the project was not the hardest part. After the initial few months, I rant out of all my ideas. So, the development slowed down. Hence I wanted other projects to start using it.

More users meant a lot of things. I got to work on new features, optimizations, security, etc. Being very young in my career, meant this was a wonderful way to do Software development.

PEP8Speaks is useful for an open source project which has many contributors i.e. organizations. It is not very helpful if you are the only one working on your project. Hence most of the time, if someone finds it useful, they have to convince all the maintainers in their organization to start using it.

Larger orgs are more hesitant in adding new things as a requirement or dependency because they are worried that it would not work properly. Hence, I needed to build trust in the project.

Growth efforts

In short, organic growth requires me to do the following -

  1. Being open for feature requests.

    Many cool features in PEP8Speaks are not my original ideas, but recommendations from the community.

    Developers rarely want to change the way they work. Instead, they love bending (customizing) the tools they use.

    If only PEP8Speaks were to support this new feature A,
    if only PEP8Speaks supported this feature B, …we would love to adopt it!

  2. Implementing feature requests.

    One way of gaining trust in the community is to listen to the issues and incoming Pull Requests. These users helped a lot in spreading the word.

    And so, I need to address all the feature requests. But it is also limited by the time I have. So, I need to pick among those requests.

  3. Having a helpful README

    Every knowledge required to install and customize PEP8Speaks has to be on the README. And also, in a visually discoverable way. Having a kickass README is a must.

  4. Spreading the word at the right places

    I was a speaker at the SciPy 2017 conference in Austin. In the lightning talks session, I talked about PEP8Speaks. The ballroom had close to a thousand Python developers. (SciPy conference is a yearly “pilgrimage” in the Scientific Python world.)

    And this is the reason, a lot of PEP8Speaks users include scientific Python projects.

PEP8Speaks bot has commented on around 17,000 pull requests.

Logo Organization Description
Pandas Powerful data manipulation tools for Python
Adobe Open source from Adobe
openSUSE Linux distribution
PyTorch Lightning The lightweight PyTorch wrapper for ML researchers.
xarray (PyData) N-D labeled arrays and datasets in Python (Python for Data)
SunPy Python for Solar Physics
Astropy Astronomy in Python
Scikit Learn Contrib scikit-learn compatible projects
Scikit Image Image processing in Python
Spyder IDE The Scientific Python Development Environment
NetworkX Python library for graph theory and complex networks
Statsmodels Statistical modeling and econometrics in Python

GitHub API allows me to find out all the users of the project. I keep the list of all organizations and users on the public wiki.

Sponsorship 💳

Even though the project is a free and open source software, it needs to be hosted on a server to work. The server receives around 3,000 API requests per minute. I deployed it on Heroku because it was free of cost. Heroku gave a limited number of hours per month for the servers to run. Within 1 year, the app started exhausting all the hours very quickly. And then I had to pay for the server costs.

In March 2019, I wrote a case to receive funding for the project. https://github.com/OrkoHunter/pep8speaks/wiki/Funding

I wrote to the PSF for the Python Software Foundation grant. They agreed to cover one year of server costs. 🎉

The project also received funding from Weblate and CCExtractor, which is amazing!

Future of the project ⏳

The project does not have many bugs, but I do receive one or two issues in the repository per month. I have a local setup with few Jupyter Notebooks where I do the debugging and I fix the problem for them. My main concern is that debugging PEP8Speaks is not straightforward. I want to make the development process smooth. This means the project can be maintained by more people, not one person.

PEP8Speaks can be installed on public repositories with a few clicks, but running on private repositories is not trivial. I have written the instructions to do it. There are currently 9 private forks of PEP8Speaks, that I know of. But, I want to make it easier for private repositories to start using it. Just like running CircleCI or Codecov on private repos.

The last most important thing in my mind is to improve the infrastructure. Write more developer-focused documentation, technical spec of the project and support new contributions.

Cheers!

comments powered by Disqus