Differences between revisions 6 and 7
Revision 6 as of 2014-07-20 20:02:48
Size: 2988
Editor: chapoton
Comment: no more mercurial
Revision 7 as of 2016-12-08 21:02:45
Size: 3123
Editor: chapoton
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
== How to Begin Sage Development == == How to Begin SageMath Development ==
Line 4: Line 4:
This is a quick guide for developers who want to contribute to Sage. It is intended especially for newbie programmers. This is a quick guide for developers who want to contribute to SageMath. It is intended especially for newbie programmers.
Line 6: Line 6:
First, Sage's main language is [[http://www.python.org|Python]]. Some parts of Sage can be written in other languages, especially the [[http://www.sagemath.org/links-components.html|components]] that do the heavy number crunching, but most native functionality is done in Python, including "glue code". First, SageMath's main language is [[http://www.python.org|Python]]. Some parts of SageMath can be written in other languages, especially the [[http://www.sagemath.org/links-components.html|components]] that do the heavy number crunching, but most native functionality is done in Python, including "glue code".
Line 10: Line 10:
If you don't know Python, you should start there, since it is Sage's main language. A good place to start is the [[http://docs.python.org/tutorial/|Python Official Tutorial]] and other documents available at http://python.org/doc/ . Another good place to take a look at is [[http://www.diveintopython.org/|Dive Into Python]], which may be pretty helpful in some specific topics like test-driven development. If you don't know Python, you should start there, since it is SageMath's main language. A good place to start is the [[http://docs.python.org/tutorial/|Python Official Tutorial]] and other documents available at http://python.org/doc/ . Another good place to take a look at is [[http://www.diveintopython.org/|Dive Into Python]], which may be pretty helpful in some specific topics like test-driven development.
Line 14: Line 14:
Once you are comfortable with Python itself (which is pretty fast for basics) you can start using Sage. If you want, you can try to learn Python by using Sage, but that isn't recommended because it's helpful to know what is pure Python and what is Sage doing its "magic". There are many things that work on one that don't on the other, because Sage does a lot of type conversions behind the scenes. Once you are comfortable with Python itself (which is pretty fast for basics) you can start using SageMath. If you want, you can try to learn Python by using SageMath, but that isn't recommended because it's helpful to know what is pure Python and what is SageMath doing its "magic". There are many things that work on one that don't on the other, because SageMath does a lot of type conversions behind the scenes.
Line 16: Line 16:
Then take a look at the [[http://www.sagemath.org/doc/developer/|official development guide]] for Sage. After that, you can take a look at the [[http://wiki.sagemath.org/devel/TracGuidelines|trac guidelines]] which details some aspects of Sage development and how to get a Trac account. You can also join the [[http://groups.google.com/group/sage-devel|sage-devel]] list at Google Groups and hang around the #sage-devel IRC channel on [[http://freenode.net/|Freenode]]. Getting an account in this wiki can be helpful too. Then take a look at the [[http://www.sagemath.org/doc/developer/|official development guide]] for SageMath. After that, you can take a look at the [[http://wiki.sagemath.org/devel/TracGuidelines|trac guidelines]] which details some aspects of SageMath development and how to get a Trac account. You can also join the [[http://groups.google.com/group/sage-devel|sage-devel]] list at Google Groups and hang around the #sage-devel IRC channel on [[http://freenode.net/|Freenode]]. Getting an account in this wiki can be helpful too.
Line 18: Line 18:
Then, you can choose to grab a ticket from the [[http://trac.sagemath.org/sage_trac|trac server]] to solve or you may want to implement some feature you have in mind. If you want to implement something, it's good practice to include a ticket and/or discuss in the group first, so that the gurus can give their opinion (and it's nice to listen to them, since they know Sage's internals much better and may give some advice). They are pretty open to new ideas, too, like all mathematicians should be :) Then, you can choose to grab a ticket from the [[http://trac.sagemath.org/sage_trac|trac server]] to solve or you may want to implement some feature you have in mind. If you want to implement something, it's good practice to include a ticket and/or discuss in the group first, so that the gurus can give their opinion (and it's nice to listen to them, since they know SageMath's internals much better and may give some advice). They are pretty open to new ideas, too, like all mathematicians should be :)

||<#FFFF66>Please write Python3-compatible code (see [[Python3-compatible code]])||

How to Begin SageMath Development

This is a quick guide for developers who want to contribute to SageMath. It is intended especially for newbie programmers.

First, SageMath's main language is Python. Some parts of SageMath can be written in other languages, especially the components that do the heavy number crunching, but most native functionality is done in Python, including "glue code".

One of the good aspects of Python that Sage inherits is that working code is considered more valuable than just fast code. Sure, fast code is good, but clean, readable code is important, and as anything math-related, inaccurate results are unacceptable. Correctness comes before optimization.

If you don't know Python, you should start there, since it is SageMath's main language. A good place to start is the Python Official Tutorial and other documents available at http://python.org/doc/ . Another good place to take a look at is Dive Into Python, which may be pretty helpful in some specific topics like test-driven development.

In the meantime, you can grab your copy of the sage source and get used to git. The pro git book is recommended for those who aren't used to that version control system (and to some extent to those who never used such a system).

Once you are comfortable with Python itself (which is pretty fast for basics) you can start using SageMath. If you want, you can try to learn Python by using SageMath, but that isn't recommended because it's helpful to know what is pure Python and what is SageMath doing its "magic". There are many things that work on one that don't on the other, because SageMath does a lot of type conversions behind the scenes.

Then take a look at the official development guide for SageMath. After that, you can take a look at the trac guidelines which details some aspects of SageMath development and how to get a Trac account. You can also join the sage-devel list at Google Groups and hang around the #sage-devel IRC channel on Freenode. Getting an account in this wiki can be helpful too.

Then, you can choose to grab a ticket from the trac server to solve or you may want to implement some feature you have in mind. If you want to implement something, it's good practice to include a ticket and/or discuss in the group first, so that the gurus can give their opinion (and it's nice to listen to them, since they know SageMath's internals much better and may give some advice). They are pretty open to new ideas, too, like all mathematicians should be :)

Please write Python3-compatible code (see Python3-compatible code)

devel/BeginSageDevelopment (last edited 2022-05-08 20:39:15 by mkoeppe)