For Python (and actually for all programming languages, meanwhile), I've always been using Eclipse as an IDE. With PyDev you get pretty nice Python syntax highlighting, code outlines, and features such as code completion, although I have never used that a lot. PyDev has even added Cython support for .pyx files recently—yeah!
I have added the complete Sage tree (which is located in /Applications/sage/ on my Mac) as an Eclipse project. As recommended and described earlier, I created a new branch ("sandbox") using sage -clone lattices; consequently, I'm working on the files in sage/devel/sage-lattices.
Test-driven development makes much sense in general, and especially when working on Sage:
- Due to the fact that you have to rebuild Sage every time you change something, working completely "interactive" isn't possible.
- You don't want to type the code to "bootstrap" your tests (e.g. creating lattices) every single time you change something.
- Eventually, lots of examples are demanded in the documentation anyway.
This is why I usually add some examples that I want to be working in Python docstrings, then code something, and then run the tests. Running the tests is done by
./sage -bt devel/sage-lattices/sage/lattices/lattice.py
which will rebuild the changed components of Sage (compiling Cython code if necessary) and then run the tests defined in lattice.py. Usually it says "All tests passed!" in the end; otherwise it gives an overview of the test cases (examples) that failed.
To see how the documentation that is generated from docstrings looks like, I sometimes rebuild it. For some strange reasons, the documentation generator (Sphinx) does not always recognize that I changed something in the source files. To avoid having to rebuild the complete reference manual (which takes quite a while) every time, I created a small documentation part that only includes the lattices chapter. This is easily done by adding a folder to doc/en and creating files conf.py, index.rst, and lattices.rst therein. The latter basically contains
Lattices ======== .. automodule:: sage.lattices.lattice :members: :undoc-members: :show-inheritance:Then, the relevant documentation can be rebuilt using
sage --docbuild lattices html -S -a,-E(-S passes arguments on to Sphinx, -a,-E erase and recreate everything.)
On a side note: When building the HTML documentation on my Mac, I got a bunch of warnings saying "Incompatible library version: libfontconfig.1.dylib requires version 13.0.0 or later, but libfreetype.6.dylib provides version 10.0.0". It seems that the system-wide version of dvipng that I installed through Fink referenced a library "libfreetype" that was loaded through Sage, but with an insufficiently recent version. I simply resolved this by replacing the libfreetype* files in sage/local/lib with the Fink files from /sw/lib. Now the HTML documentation displays beautiful PNG graphics for LaTeX formulas.
I tried to use the integrated Eclipse/PyDev Python debugger with Sage, but ran into some problems. First, you have to launch Eclipse through the Sage shell, i.e. using
sage -sh /path/to/eclipseBut then, after selecting sage-python as interpreter, when I tried to run the doctests in debug mode, I still got some weird ImportErrors. I could reproduce them using sage-python alone (leaving Eclipse out) and reported the issue on sage-trac.
Despite test-driven development, sometimes I still want to play around with things in Sage interactively. To reload my lattice module after having done
from sage.lattices import latticeat one point, I still have to rebuild everything (using the mentioned
sage -bt ...
command which tests things as well), and then reload it usinglattice = reload(lattice)Then I can go on creating lattices, e.g. by
L = lattice.Lattice([[1, 0], [0, 1]])and experiment with them.
When I am done working on something, I do a git commit to my sage repository using
git commit -am "my commit message"Using the Eclipse git interface is terribly slow when working on the entire Sage tree (even though only a few files are checked in), so I'm using the terminal for this. Usually I also push commits to the github repository using
git pushimmediately.
Usually I have at least three terminal windows open: one entirely for running the doctests, one for handling git, and one for "experiments" in Sage. To finally include a picture on this blog as well, here's how this might look like:
Please let me know if you have any suggestions.
Finally, some useful documentation links:
Hey this is great! This is definitely helpful
ReplyDeleteI've been working with sage + pydev on a little project for myself.
This will definitely help me work on documentation!
Thanks. Good look with the Lattice Coding!
Thanks for sharing, Reach your Goal & finally get a successful future. If you want to learn a high level language…………… Devops Training in Bangalore
ReplyDeleteIt is really a great work and the way in which u r sharing the knowledge is excellent.
ReplyDeleteThanks for helping me to understand basic concepts. As a beginner your post help me a lot.Thanks for your informative article.
Java Training in chennai |AWS Training in Chennai
Nice Blog on Eclipse/PyDev/git workflow for Sage..
ReplyDeleteIts Really a Interesting blog i red..
Devops Training
The knowledge of technology you have been sharing thorough this post is very much helpful to develop new idea. here by i also want to share this.
ReplyDeleteDigital Marketing online training
full stack developer training in pune
full stack developer training in annanagar
It's interesting that many of the bloggers to helped clarify a few things for me as well as giving.Most of ideas can be nice content.The people to give them a good shake to get your point and across the command
ReplyDeletepython training institute in chennai
python training in Bangalore
python training in pune
python training institute in chennai
python training in velachery
python online training
I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post.is article.
ReplyDeleteBlueprism training in Pune
Blueprism online training
Blue Prism Training in Pune
Good Post, I am a big believer in posting comments on sites to let the blog writers know that they ve added something advantageous to the world wide web.
ReplyDeleteData Science training in kalyan nagar | Data Science training in OMR
selenium training in chennai | Data Science training in chennai
Data science training in velachery | Data science online training
This is such a great post, and was thinking much the same myself. Another great update.
ReplyDeletejava training in chennai
java training in marathahalli | java training in btm layout
I was looking for this certain information for a long time. Thank you and good luck.
ReplyDeleteangularjs Training in chennai
angularjs-Training in pune
angularjs-Training in chennai
angularjs Training in chennai
angularjs-Training in tambaram
Thank you for benefiting from time to focus on this kind of, I feel firmly about it and also really like comprehending far more with this particular subject matter. In case doable, when you get know-how, is it possible to thoughts modernizing your site together with far more details? It’s extremely useful to me.
ReplyDeleteMicrosoft Azure online training
Selenium online training
Java online training
Java Script online training
Share Point online training
Really nice experience you have. Thank you for sharing. It will surely be an experience to someone.
ReplyDeletedevops online training
aws online training
data science with python online training
data science online training
rpa online training
Attend The Python training in bangalore From ExcelR. Practical Python training in bangalore Sessions With Assured Placement Support From Experienced Faculty. ExcelR Offers The Python training in bangalore.
ReplyDeletepython training in bangalore
Your info is really amazing with impressive content..Excellent blog with informative concept. Really I feel happy to see this useful blog, Thanks for sharing such a nice blog..
ReplyDeleteIf you are looking for any Data science Related information please visit our website data science institutes in bangalore page!
It’s great to come across a blog every once in a while that isn’t the same out of date rehashed material. Fantastic read.
ReplyDeletecloud computing training in chennai | Cloud computing training class in chennai
Hi,
ReplyDeleteBest article, very useful and well explanation. Your post is extremely incredible.Good job & thank you very much for the new information, i learned something new. Very well written. It was sooo good to read and usefull to improve knowledge. Who want to learn this information most helpful. One who wanted to learn this technology IT employees will always suggest you take Hadoop Admin Training Institute.
I’ve been searching for some decent stuff on the subject and haven't had any luck up until this point, You just got a new biggest fan!.. Keyword
ReplyDeleteNice...
ReplyDeletefreeinplanttraining
courseforECEstudents
internship-in-
chennai-for-bsc
inplant-
training-for-automobile-engineering-students
freeinplanttraining
for-ECEstudents-in-chennai
internship-for-
cse-students-in-bsnl
application-for-
industrial-training
best-inplant-
training-in-chennai-for-CSE-student.
implant-
training-for-biotechnology-students
Interesting
ReplyDeleteinterview-questions/aptitude/permutation-and-combination/how-many-groups-of-6-
persons-can-be-formed
tutorials/oracle/oracle-delete
technology/chrome-flags-complete-guide-enhance-browsing-experience/
interview-questions/aptitude/time-and-work/a-alone-can-do-1-4-of-the-work-in-2-days
interview-questions/programming/recursion-and-iteration/integer-a-40-b-35-c-20-d-10
-comment-about-the-output-of-the-following-two-statements
tutorials/apache-pig/apache-pig-subtract-function
errors-and-fixes/csharp/xml-serializer-there-was-an-error-reflecting-type
interview-questions/aptitude/simple-interest/if-the-simple-interest-on-a-certain-sum-
of-money
interview-questions/aptitude/compound-interest/rs-5887-is-divided-between-shyam-
and-ram
letters/tag/specimen-presentation-of-letters-issued-by-company/
Very nice
ReplyDeletea alone can do 14 of the work in 2 days
Rs 5887 is divided between shyam and ram
If the simple interest on a certain sum...
xml
serializer...
Apache pig subtract
function...
Integer a 40 b 35 c 20 d 10...
How many groups of 6 persons...
Chrome flags
complete guide...
Oracle delete..
specimen
presentation of letters..
A great information i got from your post.Thank you for shairing this
ReplyDeleteData Science Training In Bangalore
Data science course In Bangalore
Python Certification Course in Bangalore
awesome.....!
ReplyDeleteinplant training in chennai
inplant training in chennai
inplant training in chennai for it
italy web hosting
afghanistan hosting
angola hosting
afghanistan web hosting
bahrain web hosting
belize web hosting
india shared web hosting
thanks for this amazing opportunity to learn in this
ReplyDeleteAngularJS Training in Chennai | AngularJS Training in Anna Nagar | AngularJS Training in OMR | AngularJS Training in Porur | AngularJS Training in Tambaram | AngularJS Training in Velachery
Superb article.Keep moving. Java training in Chennai | Certification | Online Course Training | Java training in Bangalore | Certification | Online Course Training | Java training in Hyderabad | Certification | Online Course Training | Java training in Coimbatore | Certification | Online Course Training | Java training in Online | Certification | Online Course Training
ReplyDelete
ReplyDeleteThanks For Sharing The Wonderfull Content With Us !
Best Degree College In Hyderabad
Best Degree College In Attapur
I am sure this post has helped me save many hours of browsing other related posts just to find what I was looking for.
ReplyDeleteAngular js Training in Chennai
Angular js Training in Velachery
Angular js Training in Tambaram
Angular js Training in Porur
Angular js Training in Omr
Angular js Training in Annanagar
Its a very well drafted blog. Really helpful. Thanks for sharing it across.
ReplyDeleteSelenium Training in Chennai
Selenium Training in Velachery
Selenium Training in Tambaram
Selenium Training in Porur
Selenium Training in Omr
Selenium Training in Annanagar
I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging.
ReplyDeleteamazon web services aws training in chennai
microsoft azure training in chennai
workday training in chennai
android-training-in chennai
ios training in chennai
I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging.
ReplyDeleteJava course in chennai
python course in chennai
web designing and development course in chennai
selenium course in chennai
digital-marketing seo course in chennai
good article
ReplyDeletethanks for sharing
data science training in chennai
ccna training in chennai
iot training in chennai
cyber security training in chennai
ethical hacking training in chennai
I see the greatest contents on your blog and I extremely love reading them.
ReplyDeletefull stack web development course
This post is so interactive and informative.keep update more information…
ReplyDeleteGerman Classes in Anna Nagar
German Classes in chennai
Всякий рассчитывает узнать собственную судьбу и видит определенные методы ворожбы гораздо больше достоверными. Гадание на любовь на любимую - способ понять приближающиеся явления постоянно манил род людской. Хиромантия позволяет просмотреть, что вас ждет в ближайшее время.
ReplyDeleteReally nice and interesting post. I was looking for this kind of information and enjoyed reading this one.
ReplyDeletedata analytics course in hyderabad
Great post. keep sharing such a worthy information.
ReplyDeletecontent writing course in chennai
online content writing course
Good content. You write beautiful things.
ReplyDeletetaksi
mrbahis
hacklink
sportsbet
mrbahis
korsan taksi
hacklink
vbet
vbet
Success Write content success. Thanks.
ReplyDeletedeneme bonusu
kralbet
betturkey
canlı poker siteleri
betmatik
canlı slot siteleri
betpark
kralbet
ReplyDeletebetpark
tipobet
slot siteleri
kibris bahis siteleri
poker siteleri
bonus veren siteler
mobil ödeme bahis
betmatik
5ABA5
betmatik
ReplyDeletekralbet
betpark
mobil ödeme bahis
tipobet
slot siteleri
kibris bahis siteleri
poker siteleri
bonus veren siteler
EAHRG3
çorum
ReplyDeleteantep
ısparta
hatay
mersin
4MQ6
amasya
ReplyDeletetokat
samsun
yozgat
zonguldak
YT5G
https://saglamproxy.com
ReplyDeletemetin2 proxy
proxy satın al
knight online proxy
mobil proxy satın al
EPZ1XO
شركه مكافحه النمل الابيض بالقصيم 6wtJ7n5Qkt
ReplyDelete