Slide 1

Slide 1 text

The challenges of maintaining a popular open-source project EuroPython 2018 — July 27, 2018 Raphael Pierzina

Slide 2

Slide 2 text

Thanks to the organizers and volunteers for a great event! !

Slide 3

Slide 3 text

$ whoami

Slide 4

Slide 4 text

• Maintainer and core developer of pytest and Cookiecutter and related projects • I also write, speak, and tweet about these and other open source projects • I currently live in Berlin, Germany and work as a Senior Test Engineer for Firefox at Mozilla

Slide 5

Slide 5 text

https://raphael.codes/

Slide 6

Slide 6 text

@hackebrot

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

Agenda 1. Maintaining a popular open-source project 2. Challenges of a growing community 3. Frustrations for maintainers 4. Take-aways for maintainers @hackebrot

Slide 9

Slide 9 text

Maintaining a popular open-source project

Slide 10

Slide 10 text

@hackebrot

Slide 11

Slide 11 text

Cookiecutter • Command-line utility that creates projects from templates • Project templates can be in any programming language or markup format • Cross-platform: Windows, Mac, and Linux are officially supported • Works with CPython 2.7, 3.4, 3.5, 3.6 and PyPy @hackebrot

Slide 12

Slide 12 text

https://github.com/audreyr/ cookiecutter @hackebrot

Slide 13

Slide 13 text

Community • Free and open-source software: permissive BSD-3 license • 180 individual contributors from around the world • More than 1000 public templates on GitHub • Multiple talks at community conferences @hackebrot

Slide 14

Slide 14 text

Templates • https://github.com/audreyr/cookiecutter-pypackage • https://github.com/pydanny/cookiecutter-django • https://github.com/pytest-dev/cookiecutter-pytest-plugin • … @hackebrot

Slide 15

Slide 15 text

Contributing • Development of Cookiecutter is community-driven • Connect with other Cookiecutter contributors and users on Gitter • Everyone is invited to contribute! @hackebrot

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

My contributions • Created and published several Cookiecutter templates • Converted the test suite from unittest to pytest • Helped users with problems on the issue tracker and chat • Reviewed pull requests from other contributors @hackebrot

Slide 21

Slide 21 text

My contributions • Developed a number of features and bug fixes • Created poyo to overcome installation issues of YAML parsers • Created jinja2-time to make it easier to retrieve the current time • Created pytest-cookies to make testing templates easier @hackebrot

Slide 22

Slide 22 text

Cookiecutter @hackebrot

Slide 23

Slide 23 text

pytest-cookies @hackebrot

Slide 24

Slide 24 text

jinja2-time @hackebrot

Slide 25

Slide 25 text

poyo @hackebrot

Slide 26

Slide 26 text

Becoming a maintainer • Was granted the commit bit by the core team • Started managing releases on GitHub and pushing to PyPI • Continued to develop bug fixes and new features @hackebrot

Slide 27

Slide 27 text

Being a maintainer • Review pull requests and triage issues • Speak about Cookiecutter at EuroPython, PyData and local user groups • Explored various ways of getting funding for Cookiecutter • … @hackebrot

Slide 28

Slide 28 text

Emails

Slide 29

Slide 29 text

Challenges of a growing community

Slide 30

Slide 30 text

Community • Cookiecutter attracts users at a faster rate than contributors • Cookiecutter attracts contributors at a faster rate than people, who have the desire and time available to maintain the project • Thousands of users, hundreds of contributors, 5 maintainers @hackebrot

Slide 31

Slide 31 text

Learnings: Community • Make your project easier to contribute to • Adopt a Code of Conduct and enforce it • Have empathy towards others and yourself • Write good documentation • Lead by example @hackebrot

Slide 32

Slide 32 text

Project scope • People use your software in ways in which you might not have intended or anticipated, but they are still valid use cases • Newcomers encounter problems with Cookiecutter templates and create issues on the Cookiecutter issue tracker @hackebrot

Slide 33

Slide 33 text

Learnings: Project scope • Encourage building tools on top of your project • Ask contributors to develop automated tests and write documentation for new features in the same pull request • Write documentation describing the project and its scope @hackebrot

Slide 34

Slide 34 text

Breaking changes • Maintaining backwards compatibility becomes increasingly important • All changes must be carefully considered and thoroughly reviewed • Releases to PyPI, Conda, Mac Homebrew, Debian, … @hackebrot

Slide 35

Slide 35 text

Learnings: Breaking changes • Be careful about adding new features • Test your projects for supported Python versions and platforms • Write documentation describing the project and its scope • Say “NO” @hackebrot

Slide 36

Slide 36 text

Workflows • Asynchronous communication makes it difficult to make decisions • We established guidelines for merging code to ensure new code is maintainable, idiomatic Python, tested and documented • Lack of tools for maintainers on GitHub @hackebrot

Slide 37

Slide 37 text

Learnings: Workflows • Set up meetings on IRC/Gitter/Slack or video calls for discussions that are hard to have over email or GitHub issue comments • Document decisions made in a GitHub issue or the documentation • Work towards making yourself redundant • Reach out to other maintainers and suggest product enhancements @hackebrot

Slide 38

Slide 38 text

Maintainers are humans too • Maintainers are humans and volunteer their free time to lead the project • They don’t always have a time or resources to dedicate to the project • Every maintainer had their own reasons and motivations for taking on that responsibility and they might have changed over time @hackebrot

Slide 39

Slide 39 text

Learnings: Maintainers are humans too • Stick to best-practices, use automated testing and code checks, add automation and integrations • Document the process of bringing on new maintainers and guidelines for reviewing and merging changes • Do not tolerate toxic and abusive behavior from community members! @hackebrot

Slide 40

Slide 40 text

Expectations • Managing expectations is really hard! @hackebrot

Slide 41

Slide 41 text

Learnings: Expectations • Write documentation for different audiences @hackebrot

Slide 42

Slide 42 text

#WriteTheDocs

Slide 43

Slide 43 text

Frustrations for maintainers

Slide 44

Slide 44 text

Bike-shedding @hackebrot

Slide 45

Slide 45 text

“We need this at work…” @hackebrot

Slide 46

Slide 46 text

“You broke our deployment” @hackebrot

Slide 47

Slide 47 text

“…and this ‘poyo’ introduction is a great example how direction of cookiecutter can seem immature to my eyes from times to times” @hackebrot

Slide 48

Slide 48 text

“…can’t you simply…” @hackebrot

Slide 49

Slide 49 text

“Not sure how much ‘sponsorship’ is needed, but here is a site for allowing the crowd to contribute as I know my organization would be interested in helping…” @hackebrot

Slide 50

Slide 50 text

Unseen work: running sprints, ordering stickers, exploring sponsorship, submitting talks @hackebrot

Slide 51

Slide 51 text

Suggested solutions oftentimes require even more work from maintainers @hackebrot

Slide 52

Slide 52 text

People do not respect boundaries and send direct emails rather than opening GitHub issues @hackebrot

Slide 53

Slide 53 text

Maintaining open-source projects becomes work at some point, but without compensation or clear boundaries @hackebrot

Slide 54

Slide 54 text

Empathy @hackebrot

Slide 55

Slide 55 text

Take-aways for maintainers

Slide 56

Slide 56 text

Set expectations @hackebrot

Slide 57

Slide 57 text

Work towards making yourself redundant @hackebrot

Slide 58

Slide 58 text

Say “NO”! @hackebrot

Slide 59

Slide 59 text

Lead by example! @hackebrot

Slide 60

Slide 60 text

Do not tolerate toxic and abusive behavior from community members! @hackebrot

Slide 61

Slide 61 text

Allow yourself to take breaks or even walk away @hackebrot

Slide 62

Slide 62 text

Take care of yourself! @hackebrot

Slide 63

Slide 63 text

Thank you!

Slide 64

Slide 64 text

https://speakerdeck.com/hackebrot/ the-challenges-of-maintaining-a- popular-open-source-project @hackebrot

Slide 65

Slide 65 text

@hackebrot