ASKSAGE: Sage Q&A Forum - Latest question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 22 Aug 2017 15:49:01 -0500Should I / how should I make an optional sage package?https://ask.sagemath.org/question/38621/should-i-how-should-i-make-an-optional-sage-package/I've written some code in sage that implements the strata algebra of the moduli spaces of curves as a sage ring. I hope it will be useful to others. I think that a good way to share it would be to make it an optional, (or perhaps experimental?) sage package.
Is this a good thing to do?
If so, what are the steps?
My code is all in .sage files, but I could easily turn it into .py files if that is better.
paragonTue, 22 Aug 2017 15:49:01 -0500https://ask.sagemath.org/question/38621/Implementing new CF class advicehttps://ask.sagemath.org/question/32672/implementing-new-cf-class-advice/My goal is to implement Gosper's algorithm for algebraic operations on continued fractions into Sage. To begin with, I would like to implement a functionality to perform a homographic transformation
$$x \rightarrow \frac{ax + b}{cx + d}$$
where $x$ is a CF.
The easiest way to do this is probably to create a new class in `sage.rings.continued_fraction` that would on inicialization accept the integer constants $a, b, c, d$ and a descendant of `ContinuedFraction_base` class. The most important method of this class would be `next()` or `_iter_()`, which would read the input $x$ until it can output new term using Gosper's algorithm.
How do I create an instance of this class with proper arguments, when for example $(3*x + 1)/2$, where $x$ is a CF, is called from Sage? (Instead of `_mul_()` being called, than `_add_()` and so on...)
Simplifying using inbuilt Sage methods and then evaluating the expression as a string using regular expressions somehow (like [this](http://sunjay.ca/2014/04/27/evaluating-simple-math-expressions-using-python-and-regular-expressions/)) might be a solution, but I am not sure if the best one.
Thank you very much for any advice on this!
EDIT: I have found this promising [link](http://doc.sagemath.org/html/en/thematic_tutorials/coercion_and_categories.html), but haven't found anything useful in there so far...mirgeeFri, 26 Feb 2016 00:29:45 -0600https://ask.sagemath.org/question/32672/Checklist for submitting a patch to trachttps://ask.sagemath.org/question/23841/checklist-for-submitting-a-patch-to-trac/I would like to create a checklist that one should go through before submitting a patch to the trac server:
**What are the points to be checked before submitting a patch to the trac server?**
AmriWed, 20 Aug 2014 01:17:58 -0500https://ask.sagemath.org/question/23841/Trouble building documentation with the development version of Sagehttps://ask.sagemath.org/question/23827/trouble-building-documentation-with-the-development-version-of-sage/When I run
sage -docbuild reference/groups html
I get
Deleting empty directory /home/amri/myfiles/myfiles/sage-6.0-i686-Linux/src/doc/common/static
Deleting empty directory /home/amri/myfiles/myfiles/sage-6.0-i686-Linux/src/doc/en/reference/graphs/static
Deleting empty directory /home/amri/myfiles/myfiles/sage-6.0-i686-Linux/src/doc/en/reference/graphs/templates
[groups ] WARNING: intersphinx inventory '/home/amri/myfiles/myfiles/sage-6.0-i686-Linux/src/doc/output/html/en/reference/game_theory/objects.inv' not fetchable due to <type 'exceptions.IOError'>: [Errno 2] No such file or directory: '/home/amri/myfiles/myfiles/sage-6.0-i686-Linux/src/doc/output/html/en/reference/game_theory/objects.inv'
[groups ] WARNING: intersphinx inventory '/home/amri/myfiles/myfiles/sage-6.0-i686-Linux/src/doc/output/html/en/reference/modfrm_hecketriangle/objects.inv' not fetchable due to <type 'exceptions.IOError'>: [Errno 2] No such file or directory: '/home/amri/myfiles/myfiles/sage-6.0-i686-Linux/src/doc/output/html/en/reference/modfrm_hecketriangle/objects.inv'
[groups ] WARNING: intersphinx inventory '/home/amri/myfiles/myfiles/sage-6.0-i686-Linux/src/doc/output/html/en/reference/repl/objects.inv' not fetchable due to <type 'exceptions.IOError'>: [Errno 2] No such file or directory: '/home/amri/myfiles/myfiles/sage-6.0-i686-Linux/src/doc/output/html/en/reference/repl/objects.inv'
[groups ] WARNING: intersphinx inventory '/home/amri/myfiles/myfiles/sage-6.0-i686-Linux/src/doc/output/html/en/reference/quivers/objects.inv' not fetchable due to <type 'exceptions.IOError'>: [Errno 2] No such file or directory: '/home/amri/myfiles/myfiles/sage-6.0-i686-Linux/src/doc/output/html/en/reference/quivers/objects.inv'
Error building the documentation.
Note: incremental documentation builds sometimes cause spurious
error messages. To be certain that these are real errors, run
"make doc-clean" first and try again.
Traceback (most recent call last):
File "/home/amri/myfiles/myfiles/sage-6.0-i686-Linux/src/doc/common/builder.py", line 1490, in <module>
getattr(get_builder(name), type)()
File "/home/amri/myfiles/myfiles/sage-6.0-i686-Linux/src/doc/common/builder.py", line 714, in _wrapper
getattr(DocBuilder, build_type)(self, *args, **kwds)
File "/home/amri/myfiles/myfiles/sage-6.0-i686-Linux/src/doc/common/builder.py", line 109, in f
execfile(sys.argv[0])
File "/home/amri/myfiles/myfiles/sage-6.0-i686-Linux/src/doc/common/custom-sphinx-build.py", line 210, in <module>
raise OSError(ERROR_MESSAGE)
OSError: [groups ] WARNING: intersphinx inventory '/home/amri/myfiles/myfiles/sage-6.0-i686-Linux/src/doc/output/html/en/reference/game_theory/objects.inv' not fetchable due to <type 'exceptions.IOError'>: [Errno 2] No such file or directory: '/home/amri/myfiles/myfiles/sage-6.0-i686-Linux/src/doc/output/html/en/reference/game_theory/objects.inv'
When I try
make doc-clean
I get
make: *** No rule to make target `doc-clean'. Stop.
Can someone explain what the problem is, and how to get around it? This was on a clean installation of 6.4.beta0
AmriTue, 19 Aug 2014 00:00:53 -0500https://ask.sagemath.org/question/23827/Working with pre-releaseshttps://ask.sagemath.org/question/10523/working-with-pre-releases/Hi,
it has been recommended ([here](http://ask.sagemath.org/question/567/on-what-versions-should-trac-patches-be-based)) to post patches based on and test them against the most recent pre-release. As they come quite frequently I wanted to know what's the best way to install and work with them:
Do you regularly rebuild them and always work with the current pre-release?
Do you only use them for developing and have an additional stable release for your ordinary work?
What do you do with the older versions? Can one just delete them?
...twchSat, 07 Sep 2013 12:44:08 -0500https://ask.sagemath.org/question/10523/What tests are useful while reviewing a patch if the patchbot report is already positive?https://ask.sagemath.org/question/10512/what-tests-are-useful-while-reviewing-a-patch-if-the-patchbot-report-is-already-positive/Hi,
the sage developer guide lists several tests that should be performed manually during the review process, like a complete doctest, building the documentation and checking coverage. Are all these test necessary and useful, if the patch bot already reported, that the patch has been positively tested against the latest pre-release? Or can some be simply skipped because they are already checked by the bot? What does the bot actually check?twchThu, 05 Sep 2013 11:04:42 -0500https://ask.sagemath.org/question/10512/How to include my code to next Sage release?https://ask.sagemath.org/question/10168/how-to-include-my-code-to-next-sage-release/Hi everyone! What should I do include my code to next Sage realease? I wrote few classes to work with Chevalley Groups: root systems, Lie algebras and Chevalley groups. yefremThu, 30 May 2013 00:34:27 -0500https://ask.sagemath.org/question/10168/Rolling back patcheshttps://ask.sagemath.org/question/9577/rolling-back-patches/I was wondering how I would rollback any change I make to the Sage branch by applying patches using
`hg_sage.apply("<path-and-name-to-the-patch>")`
The documentation does not seem to answer this question. I'd appreciate your help.
Come to think of it, I could have taken the Hg Queues route, much simpler to maintain, IMHO. *sigh*
Thank you.
KnSTue, 27 Nov 2012 09:24:26 -0600https://ask.sagemath.org/question/9577/Is there a general place for education materials on Sage Development?https://ask.sagemath.org/question/9361/is-there-a-general-place-for-education-materials-on-sage-development/Worksheets are fantastic. Is there a central repository for such a thing?SLOtoSFThu, 27 Sep 2012 23:01:28 -0500https://ask.sagemath.org/question/9361/How to install patches? (Or should we?)https://ask.sagemath.org/question/8835/how-to-install-patches-or-should-we/Hi -
Hopefully this question is basic, but I haven't been able to find a clear answer online. (For the record, I am using the Sage notebook with the app version of Sage on a Mac.)
I consider myself a lowly and ignorant end user of Sage -- maybe one day I'll know enough to be able to contribute to development, but that day is not near. How do I (or should I, even) download and install patches, fixes and updates to Sage, short of doing a whole new installation from scratch?
More specifically: Suppose I encounter some bug or shortcoming with Sage, and I discover that there is already a ticket for that problem on the [Sage developer trac](http://trac.sagemath.org/sage_trac/). Suppose that that ticket is categorized as "fixed," and I see a link to some file (usually ending with .spkg, .patch, or .diff) near the top of the page. Is that file something that I, the lowly end user, am meant to download and install, hopefully fixing my problem? Or are those files on sage_trac really just meant for development work, and the fix will only trickle down to the end users once those fixes are incorporated into a future version of Sage?
If am I meant to be installing these patches myself, how exactly is that done? That is, where do I put the files, and what do I type where?
I feel like an idiot phrasing it in such basic terms. And I'm sure that the answers to my questions are already floating out there somewhere, but I haven't been able to find them. For example, the help stuff I've found out there for sage_trac is all about how to post or contribute to a trac ticket, rather than how to take advantage of the fixes found for that ticket.jdcThu, 29 Mar 2012 05:27:33 -0500https://ask.sagemath.org/question/8835/Can one do development in the virtual machine?https://ask.sagemath.org/question/8514/can-one-do-development-in-the-virtual-machine/I'm pretty sure the answer to this is yes (for instance, the [VirtualBox instructions](http://boxen.math.washington.edu/sage/win/README-virtualbox.txt) strongly imply it), but I don't see it here, so I might as well ask it.
- Can one do development (e.g., `sage -b`) on the VirtualBox image with no prereqs?
- If not, what are the minimum additions needed (such as `yum/apt-get foo`)?kcrismanMon, 28 Nov 2011 06:50:53 -0600https://ask.sagemath.org/question/8514/