What is the best way to create a library on top of Sage?
I am interested in using Sage to create a library for control theory (similar to SymPy and Python Control) below: https://docs.sympy.org/latest/modules...
https://github.com/python-control/pyt...
These libraries are great, but I want a library that has symbolic and numeric functionality. Therefore, I am considering using Sage to write the symbolic end and tie that with Python Control for the numeric end.
What is a good way to start creating this so that it can hopefully be integrated into the Sage build sometime in the future?
I came across someone with a similar idea before. They were using Sage to create a library for mechanics. The code is below. I notice that use a cas_utils.sage
to hold their library. Then in notebooks like 061-Lagrange_bead_rotating_circle.ipynb
, they load this library to use the features. Is this a good way to approach making a rough library based on Sage?
There is a lot of information in the Sage Developer's Guide: https://doc.sagemath.org/html/en/deve....
Hi John,
Thanks for the response. I have browsed a bit through the developers guide. One thing I struggle with is knowing where to start.
There is a lot of good stuff in that guide, but as a new developer I am not sure where to start. So any direction is appreciated to make some basic code.
I think that you should just start writing code and using it. Writing a library for addition to Sage will likely take many iterations, so don't even try to get it right the first time: get something that works, then improve it, then think about it some more and see if it needs to be reorganized or optimized or modified in some other way, then work on it some more, etc. The more you and others use it, the more feedback you'll get. For example, https://trac.sagemath.org/ticket/30680 proposed a new addition to the Sage library, but almost everything got rewritten between the original proposal and merging the new stuff. There were also probably lots of revisions before it even got to the stage of being an actual proposal.
I will do that! Thanks for the encouragement