Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Maintaining Demystified- DjangoCon US

Maintaining Demystified- DjangoCon US

KatherineMichel

September 07, 2021
Tweet

More Decks by KatherineMichel

Other Decks in Technology

Transcript

  1. Talk Goals • Fundamentals of maintaining • A Case Study:

    DjangoCon US Website • A Case Study: Pinax • Lessons learned
  2. Maintaining is Not Just About Code It is also about:

    • People • Community • Process • Communication • Kindness
  3. Some Signs of a Healthy Project • There is a

    welcoming atmosphere • There is recent activity • The maintainers respond quickly • The maintainers reduce issues/pull requests
  4. Ideal Process Prospective contributor: • Finds project • Agrees to

    Code of Conduct • Reads CONTRIBUTING.md • Uses docs, issue/pull request templates • Submits issue/pull request • Maintainer responds quickly
  5. Documentation • Highly valued • Often overlooked • And a

    means for establishing inclusive and accessible communities -From GitHub’s 2017 Open Source Survey
  6. Shared Repository Model DjangoCon US Website Repo Push branches, submit

    pull requests Can push or pull because of write permission, no fork necessary Clone Local dev environment
  7. Fork and Pull Model DjangoCon US Website Repo Fork Create

    pull request Push changes, including branches Local dev environment
  8. Creating a Pull Request DjangoCon US Website Repo Create a

    New Pull Request Títle and descriptión Create Choose branches
  9. Pull Request: Options If You Do Not Run the Code

    Locally • If no change is needed or the change can be made in the browser • Make the change in the browser • Click merge
  10. Pull Request: Options If You Run the Code Locally •

    If no change is needed, go back to the browser and click merge • If a change is needed, ask the contributor to make the change, or push the update yourself, then click merge
  11. Pull Request: Commands Shared Repo Branch Forked Repo Branch $

    git fetch origin $ git checkout -b <branch-name> origin/<branch-name> $ git merge main $ git push origin <branch-name> $ git checkout -b <branch-name> main $ git pull https://github.com/<user-name>/<repo-name> <branch-name> $ git push https://github.com/<user-name>/<repo-name> <branch-name>
  12. Security • Software supply chain • Individual-level (2FA, limited access)

    • Organization-level (secret and dependency scanning) • Project-level (new releases, security plan)
  13. More Useful GitHub Features • Issue and pull request templates

    • Global Community Health File Repo • Project Boards, milestones, issues, labels • Wiki, GitHub Pages/Jekyll • Labels/triaging, topics, blog posts
  14. Key Points An opportunity to: • Learn the fundamentals of

    maintaining • Grow a community of contributors
  15. • Fetch a pull request locally • Run the code

    • Push an update from a fork to a pull request • Merge a pull request locally • Push a pull request to a `main` branch I Learned How To...
  16. Psychological Safety • It is ideal to learn in an

    environment of psychological safety
  17. The Mistakes Disappear into the Git History • It’s ok

    to have a beginner mindset; make mistakes, keep improving
  18. The Beginner Perspective is Valuable • Project veterans may not

    be able to see the project through the eyes of a beginner • Improve it for the next person • Example: create installation docs
  19. Achieving 10x Results 10x skills that do not involve writing

    code • Maintaining the docs • Publicizing the project • Mentoring collaborators
  20. Key Points An opportunity to: • Maintain a complex Django

    library • Become a Python package release manager • Learn how to deal with scope creep
  21. I Was Hired by Eldarion to Maintain Pinax Pinax: an

    open-source library of reusable Django starter projects, apps, and themes for building websites
  22. How It Was Going 80 Projects and Apps account blog

    static stripe waitinglist zero company documents team-wiki wiki forums socialauth Pinax Themes Popular Pinax Apps Pinax Starter Projects django-user-accounts pinax-stripe pinax-announcements pinax-badges pinax-blog pinax-calendars pinax-cohorts pinax-comments pinax-documents pinax-eventlog pinax-events pinax-forums pinax-images pinax-invitations pinax-likes pinax-messages pinax-news pinax-notifications pinax-points pinax-ratings pinax-referrals pinax-submissions pinax-teams pinax-testimonials pinax-types pinax-waitinglist pinax-webanalytics pinax-wiki pinax-templates pinax-theme-bootstrap
  23. Pinax Starter Projects • Pinax starter projects are in one

    repo • Each starter project is in an individual branch
  24. Pinax Apps in Starter Projects Each starter project contains the

    relevant Pinax apps, to be installed from PyPI (the Python Package Index)
  25. Pinax Apps Stand Alone Alternatively, Pinax apps can be used

    independently of any Pinax starter project Search “pinax” on PyPI
  26. A Typical Release • Update the test matrix • Add

    new features • Implement new best practices • Fix deprecations • Improve documentation
  27. Maintaining Pinax Apps • GitHub Flow workflow • CalVer at

    release-level (year.month) • SemVer at app-level (major.minor.patch)
  28. pyenv and tox pyenv can be used to install multiple

    global Python versions Then tox can run the test matrix Terminal
  29. 20.07 Release • 28 apps included • Support for Python

    2.7 dropped • A huge milestone for me personally and professionally
  30. Major Improvements I’ve Led • Documentation of tribal knowledge •

    Consolidation of docs, in one easy-to-find place • Standardization of configurations • Creation of release and maintainer docs • Creation of Community Health Files and Templates • Reduction in the number of issues and pull requests
  31. Reduce Scope • Mark repos as deprecated • Archive repos

    • Disable issues • Communicate that the code is maintained sporadically
  32. Centralize Access and Knowledge • Centralize access • Be willing

    to hand access over • Avoid solutions that are unique
  33. Managing Volunteer Maintainers • Give selective permissions • Protect branches

    • Require reviews • Use status checks • Revert a pull request, if necessary
  34. When You Get Stuck • Google • Stack Overflow •

    GitHub docs • Git docs • Atlassian and GitLab docs
  35. OS Social Contract “... open source maintainers owe you quite

    literally nothing when it comes to their open source code, and treating them poorly is unethical.” - Brett Cannon, Python Core Dev
  36. Perks of Maintaining • Learn technical skills • Find new

    professional opportunities • Attend conferences • Meet smart, interesting people • Travel to incredible places
  37. Special Thank You :) Thank you to Ricardo Diaz Rincon

    for reviewing the Spanish version of this talk: Desmitificando el Mantenimiento (scheduled to be broadcast at DjangoCon US 2021 on October 23