This package is a SageMath package that contains all reusable sage code that I have written.
The full documentation for the package can be found at https://koffie.github.io/mdsage/doc/html/
The easiest way to install is with the following command:
sage -pip install git+https://github.com/koffie/mdsage.git
Alternatively you can download the source from the git repository:
git clone https://github.com/koffie/mdsage.git sage -pip install ./mdsage
For convenience this package contains a makefile
with this
and other often used commands. Should you wish too, you can use the
shorthand:
make install
Before making a contribution ensure that the tests still pass by running:
make test
At some point this package should be put on Pypi.
Once the package is installed, you can use it in Sage with:
sage: from mdsage import answer_to_ultimate_question sage: answer_to_ultimate_question() 42
More detailed documentation can be found at https://koffie.github.io/mdsage/doc/html/
Want to contribute or modify mdsage? Excellent! This section presents some useful information on what is included in the package.
All source code is stored in the folder mdsage
. All source folder
must contain a __init__.py
file with needed includes.
This package is configured for tests written in the documentation
strings, also known as doctests
. For examples, see this
source file. See also
SageMath's coding conventions and best practices document.
With additional configuration, it would be possible to include unit
tests as well.
Once the package is installed, one can use the SageMath test system
configured in setup.py
to run the tests:
sage setup.py test
This is just calling sage -t
with appropriate flags.
Shorthand:
make test
The documentation of the package can be generated using Sage's Sphinx installation:
cd docs sage -sh -c "make html"
Shorthand:
make doc