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

Contributing to Core Python

Contributing to Core Python

Contributing to Core Python: An Opinionated Guide for Scientists and Data Scientists

Presented to Data Umbrella Meetup on November 10, 2020.

Carol Willing
PRO

November 10, 2020
Tweet

More Decks by Carol Willing

Other Decks in Programming

Transcript

  1. Contributing to Core Python
    An Opinionated Guide for Scientists and Data Scientists
    1
    Carol Willing
    Twitter: @WillingCarol

    GitHub: @willingc
    Data Umbrella Meetup
    November 10, 2020

    View Slide

  2. Core Python = CPython

    View Slide

  3. Data and Science
    • Primary Audience

    • Data scientists

    • Scientists

    • Data Engineers

    • Folks who may get value but are not the
    focus of this talk

    • Computer scientists

    • Compiler engineers

    • Operating system experts
    Contributing to CPython
    Climate Change
    ECMWF

    View Slide

  4. Contributing to Core Python
    An opinionated approach for scientists and data scientists
    Core Python Today

    Comparing Core Python to Data / Science Projects

    Getting Started

    View Slide

  5. Beyond BDFL

    View Slide

  6. Steering Council
    Barry Warsaw
    Brett Cannon
    Carol Willing
    Thomas Wouters
    Victor Stinner

    View Slide

  7. PEP 13: Python Language Governance
    ‣ Quality and Stability
    ‣ Contributing accessible, inclusive, sustainable
    ‣ Core team and PSF relationship
    ‣ Decision making processes for PEPs
    ‣ Seek consensus

    View Slide

  8. Which contributions are needed

    View Slide

  9. Python Software Foundation (python.org)
    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.

    View Slide

  10. Ways to Contribute
    More ways than writing new code
    • Add new code with backward compatibility

    • Maintain security and improve core development workflow

    • Writing and running tests

    • Writing and editing documentation

    • Triaging bugs for reproducibility

    • Reviewing PRs

    • Share your knowledge with the community (talks, blog posts, and meetups)

    View Slide

  11. Comparing
    Projects

    View Slide

  12. CPython and Data/Scientific Projects
    • GitHub workflow

    • Pull requests

    • Code Review

    • Automated Testing / CI
    What's similar

    View Slide

  13. CPython and Data/Scientific Projects
    • New feature velocity

    • Use beyond data / science

    • Project Age and Lifecycle (30
    years vs <10 years)

    • Stability and backward
    compatibility

    • Context of use: CPython is a
    foundation for projects to be built
    upon
    What differs

    View Slide

  14. Getting
    Started
    and continuing to contribute

    View Slide

  15. First time contributors to open source
    Consider Python projects in the Scientific / Data community

    View Slide

  16. Mindset
    Getting set for success
    • Check your intent or why you want to contribute

    • Set a goal

    • Limit scope of your initial impact

    • Practice patience

    • Be persistent

    View Slide

  17. Common reasons for contributing
    These are just a few of the many reasons.
    • Fix a possible bug

    • Improve the documentation for the next person

    • Thought it would be cool

    • Wanted to understand more about how things work

    • Strengthen development skills

    View Slide

  18. Dev Guide
    devguide.python.org
    devguide.python.org

    View Slide

  19. Helpful prerequisites
    This will improve your contribution experience.
    • Take time to understand CPython's culture

    • Understand difference between core language and standard library

    • Remember most core developers are volunteers

    • Understand Git and GitHub workflow

    • Familiarity with Python (C is not necessary)

    View Slide

  20. Build CPython
    Dev Guide Quick Reference Steps 1 - 3
    • Fork and clone source code from https://github.com/python/cpython

    • Use the C compiler to configure and build Python

    • Unix/Linux/macOS

    • Windows
    https://devguide.python.org/#quick-reference
    ./configure --with-pydebug && make -j
    PCbuild\build.bat -e -d

    View Slide

  21. Run the tests
    Dev Guide Quick Reference Step 4
    • From the command line, run the tests

    • Unix/Linux

    • Mac

    • Windows
    https://devguide.python.org/#quick-reference
    python.exe -m test
    python.bat -m test
    python -m test

    View Slide

  22. Congrats on building and testing
    Dev Guide will help answer additional questions on contributing
    • Changes are submitted as GitHub pull requests

    • CI will run the automated tests

    • Wait for review

    • Address feedback

    • Core dev review and hopefully merge

    View Slide

  23. Learn about CPython Internals
    23

    View Slide

  24. Resources
    • Anthony Shaw's blog post and/
    or book on CPython internals

    • Core developer websites

    • Guido

    • Victor Stinner

    • Brett Cannon

    • CPython sprints

    • PyCon talks by core developers

    • My PyCon 2015 talk

    • Mariatta

    • Victor

    • AsyncIO: Lukasz on YouTube

    View Slide

  25. Our time is limited so...
    25

    View Slide

  26. Community is key
    26
    Python Brasil official photo.
    The sign represents Python in BSL (Brazilian Sign Language),
    made by Amanda and Sávio at Python Sul 2018
    https://pyfound.blogspot.com/2019/02/python-brasil-people-technology.html
    PyLadiesBRConf official photo
    PyLadiesBRConf official photo

    View Slide

  27. Happy contributing!
    Join the discussion:
    discuss.python.org

    View Slide

  28. 28
    Thank you

    View Slide