Slide 1

Slide 1 text

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

Slide 2

Slide 2 text

Core Python = CPython

Slide 3

Slide 3 text

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

Slide 4

Slide 4 text

Contributing to Core Python An opinionated approach for scientists and data scientists Core Python Today Comparing Core Python to Data / Science Projects Getting Started

Slide 5

Slide 5 text

Beyond BDFL

Slide 6

Slide 6 text

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

Slide 7

Slide 7 text

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

Slide 8

Slide 8 text

Which contributions are needed

Slide 9

Slide 9 text

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.

Slide 10

Slide 10 text

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)

Slide 11

Slide 11 text

Comparing Projects

Slide 12

Slide 12 text

CPython and Data/Scientific Projects • GitHub workflow • Pull requests • Code Review • Automated Testing / CI What's similar

Slide 13

Slide 13 text

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

Slide 14

Slide 14 text

Getting Started and continuing to contribute

Slide 15

Slide 15 text

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

Slide 16

Slide 16 text

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

Slide 17

Slide 17 text

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

Slide 18

Slide 18 text

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

Slide 19

Slide 19 text

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)

Slide 20

Slide 20 text

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

Slide 21

Slide 21 text

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

Slide 22

Slide 22 text

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

Slide 23

Slide 23 text

Learn about CPython Internals 23

Slide 24

Slide 24 text

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

Slide 25

Slide 25 text

Our time is limited so... 25

Slide 26

Slide 26 text

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

Slide 27

Slide 27 text

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

Slide 28

Slide 28 text

28 Thank you