Welcome to the Sage Developer’s Guide!

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

  • Add examples to the documentation
  • Find bugs or typos
  • Fix a bug
  • Implement a new function
  • Contribute a useful tutorial for a mathematical topic
  • Translate an existing document to a new language
  • Create a new class, create a fast new C library, etc.

This document describes how to write programs using Sage, how to modify and extend the core Sage libraries, and how to modify Sage’s documentation. We also discuss how to share your new and modified code with other Sage users around the globe.

It is not necessary to memorize this entire guide to begin working on Sage, but careful reading of different sections now will be well worth the effort in seamless contributions later. There are four main things to be aware of.

  • All development takes place on or via the Sage Trac server, including bug reports, fixes, new functionality, and discussions about approaches to particular tickets. If you don’t have an account on it, read about how to acquire a Trac account. This is recommended even if you only want to report bugs or request new functionality, not necessarily to help make changes to Sage.
  • Next, if you’ve never worked on software before, you will want to read about the prerequisites to compile from the installation guide. This will allow you to make your changes in the source code work. Pay close attention to any system-specific requirements.
  • Once you start writing code for Sage, you will want to carefully read the conventions and guidelines we use. (Looking at newer files and functionality within Sage is another way to get a sense for the the general style, but refer here for details.)
    • There is an entire section on how to modify or add to the various manuals and tutorials, including localizing to other languages.
  • Finally, in order to share changes with the Sage community, you will need to learn some basics of the source code revision control process. There are several places to start, depending upon your previous knowledge.
    • Don’t forget to acquire a Trac account.
    • First, you will need to install the ‘git’ revision control software if you don’t already have it.
    • Then you will need to go through a short process to configure git for use with Trac.
    • Assuming you have git installed and know the basics of how to use it, the next step is the overview of the Sage development flow in the concise development guide.
    • For those unfamiliar with git or revision control, please start by reading about collaborative development with Git-Trac, which provides some easier interface with git and Trac, both for newbies and power users.
    • Alternately, one can do certain amounts of Sage development without having git installed, by using Sage’s own internal installation of git and the Sage dev scripts. This is mainly intended as a bridge to full use of git once one becomes more comfortable with the system.

No matter where you start, good luck and welcome to Sage development!

Git and Trac

Writing Code for Sage

Indices and tables

This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License.