Python loves your contributions

Python loves your contributions

For PyCon Ukraine 2018, I made this talk, where I explain how to contribute to Python and how to contribute with the community and for the community.

8987d77750701f93bb78228c86d2c205?s=128

Stéphane Wirtel

April 28, 2018
Tweet

Transcript

  1. Python loves your contributions by Stéphane Wirtel PyCon Ukraine 2018

    - Kharkiv - 04/28/2018 @matrixise - 1 / 103
  2. PythonFOSDEM CPython contributor #fellow member of @ThePSF member of EuroPython

    Society I live in Belgium Hi PyCon! I am Stéphane @matrixise - 2 / 103
  3. Contributing? @matrixise - 3 / 103

  4. Chapter 1: The Code @matrixise - 4 / 103

  5. Once upon a time... @matrixise - 5 / 103

  6. a bunch of happy developers, @matrixise - 6 / 103

  7. have developed a new language @matrixise - 7 / 103

  8. Python @matrixise - 8 / 103

  9. Nice!!! we are here only for this language ;-) @matrixise

    - 9 / 103
  10. for them, the main tool for the management, for the

    issues, and the contributions was the issue tracker! @matrixise - 10 / 103
  11. The Issue Tracker bugs.python.org aka b.p.o @matrixise - 11 /

    103
  12. The Issue Tracker could only handle the contributions as patches

    @matrixise - 12 / 103
  13. one or many patch(es) @matrixise - 13 / 103

  14. one or many patch(es) For the same issue @matrixise -

    14 / 103
  15. Rietveld for the reviews :-/ @matrixise - 15 / 103

  16. Rietveld @matrixise - 16 / 103

  17. Rietveld @matrixise - 17 / 103

  18. Rietveld was Custom fork of the official Rietveld Maintained by

    one person Not really sexy No hightligted diff Not perfectly integrated with the Bug Tracker @matrixise - 18 / 103
  19. Rietveld was Custom fork of the official Rietveld Maintained by

    one person Not really sexy No hightligted diff Not perfectly integrated with the Bug Tracker @matrixise - 19 / 103
  20. Typical Work ow @matrixise - 20 / 103

  21. Typical Work ow As a contributor Open an issue Checkout

    the CPython source code from hg.python.org Make the fix Upload a patch Have a review with Rietveld @matrixise - 21 / 103
  22. Typical Work ow As a core dev Download the patch

    Make sure it still applies cleanly Fix the conflicts or ask a new patch to the contributor Run test suite manually (10-15 min) Commit the change manually Write the commit message Commit in the maintenance branches first and then merged in the default branch Run the test suite manually again Commit the merge Push the changes @matrixise - 22 / 103
  23. Typical Work ow About the patch Is there a conflict?

    Who is the author? Is there a description? Where is the reference of revision? diff --git a/Misc/python.man b/Misc/python.man --- a/Misc/python.man +++ b/Misc/python.man @matrixise - 23 / 103
  24. Typical Work ow About the continuous integration Check the buildbots

    (between 1h & 1d... if we are lucky) Frequent bugs on Windows the developers are on Linux or OSX or just too lazy If green, port to several branches can introduce new bugs in the other branches risk of conflicts tests executed by Buildbot @matrixise - 24 / 103
  25. Typical Work ow About the continuous integration Check the buildbots

    (between 1h & 1d... if we are lucky) Frequent bugs on Windows the developers are on Linux or OSX or just too lazy If green, port to several branches can introduce new bugs in the other branches risk of conflicts tests executed by Buildbot CI: Only on the stable branches (2.7, 3.4+) @matrixise - 25 / 103
  26. Typical Work ow Status Download the sources from https://hg.python.org Use

    Patches Store them on bugs.python.org Use a custom version of Rietveld Complex Workflow @matrixise - 26 / 103
  27. Di culty for the contribution @matrixise - 27 / 103

  28. I am God! I want to contribute, change the work

    ow! @matrixise - 28 / 103
  29. How? @matrixise - 29 / 103

  30. Too simple ;-) @matrixise - 30 / 103

  31. We have just switched to Git/GitHub! Read for more information:

    PEP 512: Migration from hg.python.org to Git/GitHub @matrixise - 31 / 103
  32. The Open Hub 48% for SVN 37% for Git 2%

    for Mercurial PyPI 62% for Git 22% for Mercurial 13% for the rest Why Git? Git is 3 times more popupar as Mercurial for the top 100 projects on PyPI. @matrixise - 32 / 103
  33. Why GitHub? GitHub is popular and familiar Primary place if

    you want to contribute to a project Avoid a custom infrastructure Concept of Pull Requests are easier to review have nice syntax hightligted diffs can be commented Web API ( REST & GraphQL ) @matrixise - 33 / 103
  34. GitHub - Dashboards @matrixise - 34 / 103

  35. GitHub - Web interface @matrixise - 35 / 103

  36. GitHub - Reviews Integrated review Comment the code and ask

    for changes @matrixise - 36 / 103
  37. GitHub - Reviews - Ready to merge @matrixise - 37

    / 103
  38. Migrations to GitHub 15th January 2016: PEPs 22nd July 2016:

    DevGuide 11st February 2017: CPython (2 years) @matrixise - 38 / 103
  39. Automation @matrixise - 39 / 103

  40. Run the test suite and the performance tests Run the

    code coverage Compile the documentation Execute for master and the stable branches (2.7, 3.6) Execute on the branches from the contributors Automation @matrixise - 40 / 103
  41. The BOTS... @matrixise - 41 / 103

  42. Job checks if the the commiter has signed the Contributor

    Agreement aka CLA The knights who say ni! https://github.com/python/the-knights-who-say-ni CLA: https://www.python.org/psf/contrib/contrib-form/ @matrixise - 42 / 103
  43. Job checks the title of the PR with bedevere/issue-number has

    a Misc/NEWS.d/next entry with bedevere/news play with the labels awaiting review, awaiting merge, awaiting core review Bedevere! https://github.com/python/bedevere @matrixise - 43 / 103
  44. Job based on needs backport to X.Y backports a Pull

    Request to an other branch merges a complete backport Miss Islington! https://github.com/python/miss-islington @matrixise - 44 / 103
  45. BOTS + Automations = @matrixise - 45 / 103

  46. BOTS + Automations = @matrixise - 46 / 103

  47. BOTS + Automations = @matrixise - 47 / 103

  48. as you can see BOTS are really useful for the

    core-devs @matrixise - 48 / 103
  49. Status about the Work ow @matrixise - 49 / 103

  50. Before Contributor Open an issue Clone Upload a patch Core

    Dev Wait a review of a Core Dev Download the patch Fix the conflicts Run the tests manually Run the code coverage manually Commit manually Write the commit message Merge into the branches Run the test suite manually Commit the merge Push the changes etc... process is long & manual & error prone @matrixise - 50 / 103
  51. Before Contributor Open an issue Clone Upload a patch Core

    Dev Wait a review of a Core Dev Download the patch Fix the conflicts Run the tests manually Run the code coverage manually Commit manually Write the commit message Merge into the branches Run the test suite manually Commit the merge Push the changes etc... process is long & manual & error prone @matrixise - 51 / 103
  52. After Contributor Open an issue Clone Create a Pull Request

    Core Dev Review from contributors or core-dev Wait the feedback of the BOTS + Automation Wait the signal Mark the PR as needs backport to X.Y process is short & automatic @matrixise - 52 / 103
  53. After Contributor Open an issue Clone Create a Pull Request

    Core Dev Review from contributors or core-dev Wait the feedback of the BOTS + Automation Wait the signal Mark the PR as needs backport to X.Y process is short & automatic @matrixise - 53 / 103
  54. Statistics from Feb 2017 to Apr 2018 April is not

    yet nished @matrixise - 54 / 103
  55. Pull Requests: 6542 @matrixise - 55 / 103

  56. Merged Pull Requests: 4966 @matrixise - 56 / 103

  57. Top Merge Time @matrixise - 57 / 103

  58. Core-Devs & Contributors / Numbers @matrixise - 58 / 103

  59. Core-Devs & Contributors / Pull Requests @matrixise - 59 /

    103
  60. Code @matrixise - 60 / 103

  61. Documentation There is the PEP 545 for that!!! @matrixise -

    61 / 103
  62. Yeah! CPython loves your Pull Requests @matrixise - 62 /

    103
  63. Yeah! CPython loves your Pull Requests and @matrixise - 63

    / 103
  64. Your rst contribution could be the Ukrainian/Russian translation of the

    documentation. @matrixise - 64 / 103
  65. Your rst contribution could be the Ukrainian/Russian translation of the

    documentation. Read PEP 545 @matrixise - 65 / 103
  66. @matrixise - 66 / 103

  67. Communication We have several channels: Mailing lists python-list@python.org python-dev@python.org python-ideas@lists.python.org

    core-mentorship@python.org IRC (irc://irc.freennode.net/#python-dev) @matrixise - 67 / 103
  68. Communication ZulipChat @matrixise - 68 / 103

  69. Then @matrixise - 69 / 103

  70. We are ready for the future! @matrixise - 70 /

    103
  71. Chapter 2: The Community @matrixise - 71 / 103

  72.  -> Language and Community  Brett Cannon, PyCon US

    2014 @matrixise - 72 / 103
  73. The Python Community is respectful, safe and open! Code of

    Conduct @matrixise - 73 / 103
  74. Contributions @matrixise - 74 / 103

  75. Contributions Mailing lists IRC / slack channels / ZulipChat Meetups

    PyLadies DjangoGirls (Kiev, Kharkov?) Sprints PyCons @matrixise - 75 / 103
  76. Who organise? @matrixise - 76 / 103

  77. Who organise? you! @matrixise - 77 / 103

  78. Who organise? you! me! @matrixise - 78 / 103

  79. Who organise? you! me! all of us! @matrixise - 79

    / 103
  80. Conferences PyCon Ukraine 2018 PyCon US in Cleveland (USA) EuroPython

    2018 (Edinburgh / UK) @matrixise - 80 / 103
  81. Conferences PyCon Ukraine 2018 PyCon US in Cleveland (USA) EuroPython

    2018 (Edinburgh / UK) but also a lot of conferences DjangoCon Europe PyCon CZ 2018 (Prague / Czech Republic) PyCon PL 2018 (Ossa / Poland) ... https://python.org/events @matrixise - 81 / 103
  82. Conferences PyCon Ukraine 2018 PyCon US in Cleveland (USA) EuroPython

    2018 (Edinburgh / UK) but also a lot of conferences DjangoCon Europe PyCon CZ 2018 (Prague / Czech Republic) PyCon PL 2018 (Ossa / Poland) ... https://python.org/events You could also create a new conference PyConWeb PyData @matrixise - 82 / 103
  83. DjangoGirls &| PyLadies @matrixise - 83 / 103

  84. PyLadies http://www.pyladies.com/ @matrixise - 84 / 103

  85. DjangoGirls https://djangogirls.org/kharkiv/ @matrixise - 85 / 103

  86. How to become a good contributor Is there a recipe?

    @matrixise - 86 / 103
  87. No! @matrixise - 87 / 103

  88. No! maybe you will fail, but at least, you tried

    an initiative! @matrixise - 88 / 103
  89. Chapter 3 @matrixise - 89 / 103

  90. PSF Mission "The mission of the Python Software Foundation is

    to promote, protect, and advance the Python programming language, and to support and facilitate the growth of a diverse and international community of Python programmers". @matrixise - 90 / 103
  91. Python Software Foundation Intellectual Property Members Money @matrixise - 91

    / 103
  92. Intellectual Property Software Licenses Trademarks @matrixise - 92 / 103

  93. Members Basic (non-voting) Supporting Contributing/Managing Fellows @matrixise - 93 /

    103
  94. Money comes from... Donations Sponsorships PyCon US @matrixise - 94

    / 103
  95. Money goes to... Other PyCons Workshops Meetups fees Software projects

    Infrastructure Employees ... @matrixise - 95 / 103
  96. The PSF is NOT the Python Community, you are a

    member of this awesome Community @matrixise - 96 / 103
  97. Think globally; act locally Join the PSF (it's free) Engage

    with a community (or start one) Contribute - organise/mentor/code @matrixise - 97 / 103
  98. What Can I Do for Python ? @matrixise - 98

    / 103
  99. What Can I Do for Python ? now, you know!

    @matrixise - 99 / 103
  100. The contribution is for... @matrixise - 100 / 103

  101. @matrixise - 101 / 103

  102. Thank you! Дякую @matrixise stephane@wirtel.be @matrixise - 102 / 103

  103. @matrixise - 102 / 103

  104. Credits Talks Naomi Ceder for her presentation "Stay for the

    community" Brett Cannon for his sentence "Came for the language, stayed for the community" Images http://www.pierre-leautey.fr/lagence-de-communication-et-marketing-ds- consulting-de-pierrette-sicot/ @matrixise - 103 / 103