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.

C8eedb2bca5728f0f73294b5b5a0222e?s=128

Carol Willing
PRO

November 10, 2020
Tweet

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
  2. Core Python = CPython

  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
  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
  5. Beyond BDFL

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

    Victor Stinner
  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
  8. Which contributions are needed

  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.
  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)
  11. Comparing Projects

  12. CPython and Data/Scientific Projects • GitHub workflow • Pull requests

    • Code Review • Automated Testing / CI What's similar
  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
  14. Getting Started and continuing to contribute

  15. First time contributors to open source Consider Python projects in

    the Scientific / Data community
  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
  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
  18. Dev Guide devguide.python.org devguide.python.org

  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)
  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
  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
  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
  23. Learn about CPython Internals 23

  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
  25. Our time is limited so... 25

  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
  27. Happy contributing! Join the discussion: discuss.python.org

  28. 28 Thank you