Contributing to Python: Difference between revisions

From OpenHatch wiki
Content added Content deleted
imported>Jesstess
No edit summary
imported>Jesstess
m (Protected "Contributing to Python" (‎[edit=sysop] (indefinite) ‎[move=sysop] (indefinite)))
 
(38 intermediate revisions by the same user not shown)
Line 1: Line 1:
Welcome! This page contains instructions for prospective OPW and Google Summer of Code interns, as well as anyone else interested in contributing to Python.
Welcome! This page contains instructions for getting started with contributing to Python. They cover practicing some of the common tools of open source development, as well as steps for contributing specifically to Python.

These instructions were written for prospective [http://wiki.python.org/moin/OPW/2014 GNOME Outreach Program for Women] and [http://wiki.python.org/moin/SummerOfCode/2014 Google Summer of Code] interns, but are relevant for anyone interested in contributing to CPython and the standard library.

[[File:Python_logo.png|200px]] [[File:Opw.png|200px]] [[File:Pyladies_logo.png|200px]]


= Part 1: environment setup =
= Part 1: environment setup =


== Goal #1: install an IRC client ==
== Goal #1: install an IRC client ==

[[File:Chat.png|100px]]


IRC is a real-time chat protocol that open source projects often use to talk about the project and as a medium for users and developers to help each other.
IRC is a real-time chat protocol that open source projects often use to talk about the project and as a medium for users and developers to help each other.
Line 12: Line 18:
* [[Contributing_to_Python/OSX IRC|OS X]]
* [[Contributing_to_Python/OSX IRC|OS X]]
* [[Contributing_to_Python/Linux IRC|Linux]]
* [[Contributing_to_Python/Linux IRC|Linux]]



== Goal #2: practice navigating from the command line ==
== Goal #2: practice navigating from the command line ==

[[File:Utilities-terminal.png|100px]]


Many of the tools of open source development are primarily used via the command line. Let's get some practice with navigating the computer from the command line.
Many of the tools of open source development are primarily used via the command line. Let's get some practice with navigating the computer from the command line.
Line 20: Line 29:
* [[Contributing_to_Python/OSX command line|OS X]]
* [[Contributing_to_Python/OSX command line|OS X]]
* [[Contributing_to_Python/Linux command line|Linux]]
* [[Contributing_to_Python/Linux command line|Linux]]



== Goal #3: Get familiar with the Python bug tracker ==
== Goal #3: Get familiar with the Python bug tracker ==


[[File:Bug.png|100px]]
Python tracks bugs and features at http://bugs.python.org/.


Python tracks bugs and features at http://bugs.python.org/. Please create an account on this site now.
Please familiarize yourself with how Python uses its bug tracker by exploring and finding answers to the following questions:


Next, familiarize yourself with how Python uses its bug tracker by exploring and finding answers to the following questions:
1. What is the oldest open Python ticket?
1. How many open issues need a patch?
1. How many "critical"-level open issues are there?


# What is the oldest open Python ticket?
== Goal #4: Version control ==
# How many open issues need a patch?
# How many "critical"-level open issues are there?


== Goal #4: practice using version control ==

[[File:History.png|100px]]


Mercurial is the distributed version control system Python uses to manages changes to its code.
Mercurial is the distributed version control system Python uses to manages changes to its code.


Please [http://mercurial.selenic.com/downloads/ download and install Mercurial now].
If you have not used Mercurial before, please go through this tutorial: http://hginit.com/


If you have not used Mercurial before, please go through [http://hgbook.red-bean.com/read/a-tour-of-mercurial-the-basics.html this tutorial].
== Goal #5: creating patches ==


== Goal #5: practice creating patches ==

[[File:Patch.png|100px]]

Code changes are represented in a concise and standard format called a "diff". <tt>patch</tt> is a utility which applies a "diff" to someone else's copy of the code.


If you have not used diff and patch before, please go through the diff and patch training mission at:
If you have not used diff and patch before, please go through the diff and patch training mission at:


http://openhatch.org/missions/diffpatch
http://openhatch.org/missions/diffpatch



= Part II: contributing to Python =
= Part II: contributing to Python =


== Goal #1: join the mailing list ==
Join the Python core-mentorship mailing list and introduce yourself: https://mail.python.org/mailman/listinfo/core-mentorship.

Read the Python developer guide: http://docs.python.org/devguide/
[[File:Email.png|100px]]
Create an account on the Python bug tracker: http://bugs.python.org/

Submit a patch for a Python bug (see the next section for help getting started)
The Python community has a lot of mailing lists. The 2 big ones for new contributors are:
Let the core mentorship mailing list know that you've submitted your patch and are ready to work on your application. We'll craft an application together for a project that fits your background and interests and what you want to learn this summer!

# [http://mail.python.org/mailman/listinfo/core-mentorship core-mentorship]: This is a great place to ask questions about contributing, ask for reviews, and get suggestions for bugs to work on.
# [http://mail.python.org/mailman/listinfo/python-dev python-dev]: The main mailing list for developing and releasing Python. Please do not ask general Python questions on this list.

The core-mentorship mailing list will be our focus as we get settled in, so please [http://mail.python.org/mailman/listinfo/core-mentorship join the list] now.


== Goal #2: read the developer guide ==

[[File:Safari.png|100px]]

Python has excellent documentation for getting started with contribution in its developer guide: http://docs.python.org/devguide/

Please read through the following sections of the developer guide:

# [http://docs.python.org/devguide/#quick-start Quick start]
# [http://docs.python.org/devguide/setup.html Setup]
# [http://docs.python.org/devguide/help.html Where to get help]
# [http://docs.python.org/devguide/patch.html The lifecycle of a patch]
# [http://docs.python.org/devguide/runtests.html Writing and running tests]
# [http://docs.python.org/devguide/tracker.html#tracker Using the issue tracker]
# [http://docs.python.org/devguide/devcycle.html The CPython development cycle]

By the end, you'll:

* Have downloaded the Python source code
* Built Python
* Run the test suite
* Have an overview of the development cycle.

Don't worry if this doesn't feel fully digested yet! The process will become clearer with practice.


== Goal #3: pick a bug to work on ==

[[File:Debugging.png|100px]]

It's time to pick a Python bug to work on! Visit http://bugs.python.org/ and browse for one that looks good.

It's a bit of an art to determine if a bug is good for a new contributor, so here are some suggestions:

First, the developer guide suggests 2 good areas for first-time contributors:

# [http://docs.python.org/devguide/docquality.html Documentation]
# [http://docs.python.org/devguide/coverage.html Test coverage]

If those sound interesting to you, look for issues in those areas.

Next, for the office hours on Sunday, March 9th, we'll have a list of beginner-friendly bugs. Check back here on Sunday to review that list.

Finally, you can always ask for help or suggestions on the core-mentorship mailing list or in the <tt>#pyladies</tt> IRC channel.


== Goal #4: submit a patch for a Python bug ==

[[File:Patch.png|100px]]

Follow the steps in the developer guide to create and submit a patch for your bug: http://docs.python.org/devguide/patch.html.

Make sure to run the test suite first and that the tests all still pass!


== Goal #5: start working on your application ==

[[File:Opw.png|100px]]

If you are a prospective GNOME Outreach Program for Women or Google Summer of Code intern, you're ready to start working on your application.

Let the core mentorship mailing list know that you've submitted your patch and are ready to apply for the internship. We'll craft an application together for a project that fits your background and interests and what you want to learn this summer!

Latest revision as of 17:15, 5 March 2014

Welcome! This page contains instructions for getting started with contributing to Python. They cover practicing some of the common tools of open source development, as well as steps for contributing specifically to Python.

These instructions were written for prospective GNOME Outreach Program for Women and Google Summer of Code interns, but are relevant for anyone interested in contributing to CPython and the standard library.

Part 1: environment setup

Goal #1: install an IRC client

IRC is a real-time chat protocol that open source projects often use to talk about the project and as a medium for users and developers to help each other.

Please follow the instructions below for your operating system to install IRC and join the #pyladies IRC channel on Freenode:


Goal #2: practice navigating from the command line

Many of the tools of open source development are primarily used via the command line. Let's get some practice with navigating the computer from the command line.


Goal #3: Get familiar with the Python bug tracker

Python tracks bugs and features at http://bugs.python.org/. Please create an account on this site now.

Next, familiarize yourself with how Python uses its bug tracker by exploring and finding answers to the following questions:

  1. What is the oldest open Python ticket?
  2. How many open issues need a patch?
  3. How many "critical"-level open issues are there?


Goal #4: practice using version control

Mercurial is the distributed version control system Python uses to manages changes to its code.

Please download and install Mercurial now.

If you have not used Mercurial before, please go through this tutorial.


Goal #5: practice creating patches

Code changes are represented in a concise and standard format called a "diff". patch is a utility which applies a "diff" to someone else's copy of the code.

If you have not used diff and patch before, please go through the diff and patch training mission at:

http://openhatch.org/missions/diffpatch


Part II: contributing to Python

Goal #1: join the mailing list

The Python community has a lot of mailing lists. The 2 big ones for new contributors are:

  1. core-mentorship: This is a great place to ask questions about contributing, ask for reviews, and get suggestions for bugs to work on.
  2. python-dev: The main mailing list for developing and releasing Python. Please do not ask general Python questions on this list.

The core-mentorship mailing list will be our focus as we get settled in, so please join the list now.


Goal #2: read the developer guide

Python has excellent documentation for getting started with contribution in its developer guide: http://docs.python.org/devguide/

Please read through the following sections of the developer guide:

  1. Quick start
  2. Setup
  3. Where to get help
  4. The lifecycle of a patch
  5. Writing and running tests
  6. Using the issue tracker
  7. The CPython development cycle

By the end, you'll:

  • Have downloaded the Python source code
  • Built Python
  • Run the test suite
  • Have an overview of the development cycle.

Don't worry if this doesn't feel fully digested yet! The process will become clearer with practice.


Goal #3: pick a bug to work on

It's time to pick a Python bug to work on! Visit http://bugs.python.org/ and browse for one that looks good.

It's a bit of an art to determine if a bug is good for a new contributor, so here are some suggestions:

First, the developer guide suggests 2 good areas for first-time contributors:

  1. Documentation
  2. Test coverage

If those sound interesting to you, look for issues in those areas.

Next, for the office hours on Sunday, March 9th, we'll have a list of beginner-friendly bugs. Check back here on Sunday to review that list.

Finally, you can always ask for help or suggestions on the core-mentorship mailing list or in the #pyladies IRC channel.


Goal #4: submit a patch for a Python bug

Follow the steps in the developer guide to create and submit a patch for your bug: http://docs.python.org/devguide/patch.html.

Make sure to run the test suite first and that the tests all still pass!


Goal #5: start working on your application

If you are a prospective GNOME Outreach Program for Women or Google Summer of Code intern, you're ready to start working on your application.

Let the core mentorship mailing list know that you've submitted your patch and are ready to apply for the internship. We'll craft an application together for a project that fits your background and interests and what you want to learn this summer!