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

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
  2. 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
  3. Contributing to Core Python An opinionated approach for scientists and

    data scientists Core Python Today Comparing Core Python to Data / Science Projects Getting Started
  4. PEP 13: Python Language Governance ‣ Quality and Stability ‣

    Contributing accessible, inclusive, sustainable ‣ Core team and PSF relationship ‣ Decision making processes for PEPs ‣ Seek consensus
  5. 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.
  6. 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)
  7. CPython and Data/Scientific Projects • GitHub workflow • Pull requests

    • Code Review • Automated Testing / CI What's similar
  8. 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
  9. 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
  10. 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
  11. 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)
  12. 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
  13. 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
  14. 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
  15. 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
  16. 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