Contributing to SageMath

From the Sage Developer’s Guide:

Everybody who uses Sage is encouraged to contribute something back to Sage at some point.

How you can help

Brief overview of the components

trac server

Let’s explore the trac server and a few tickets:

git workflow

git-trac workflow

Overview of the review process

See also the Reviewer’s check list in the Sage Developer’s Guide.

Image of the review process

Getting ready for Sage development

Getting Ready 1: Sign up for a trac account

Send an email to sage-trac-account@googlegroups.com with:

(You will need to do this once for each computer that you will use for Sage development, including CoCalc projects if you choose to use CoCalc for Sage development).

Getting Ready 3: Configure git and git-trac

Getting Ready 4: Get the Sage source code

Tips and Tricks

Checkout an old ticket without recompiling for hours

If you checkout the branch associated with a ticket using the command

git trac checkout TICKETNUMBER

then your version of Sage will coincide with the version of Sage on which the branch is based. The main drawback here is that make build will compile an older version of Sage, which can take a very, very long time.

Instead, you can attempt to merge the branch with the most recent version of develop:

git checkout develop
git checkout -b t/TICKETNUMBER/TICKETNAME
git trac fetch TICKETNUMBER
git merge FETCH_HEAD
[git trac push]

Here is a short description of the above commands:

  1. checkout the current develop branch of Sage
  2. create a new branch (based off develop) with the name t/TICKETNUMBER/TICKETNAME
  3. fetch the data associated with the branch on the ticket (but do not actually create the branch)
  4. merge the fetched data into the current branch; this step might require conflict resolution
  5. [optional, but good idea] share your changes: you updated the branch to the latest development version, and other people will find this helpful