First time here? Check out the FAQ!

Ask Your Question
0

Track a sage worksheet in git

asked 11 years ago

Kevin gravatar image

updated 9 years ago

FrédéricC gravatar image

I would like to track the changes to a sage worksheet in git so I can collaborate with github/bitbucket with a group who typically does not have access to a centralized machine. Right now I have been copying the sage .sws files to the repository for each version, but they are binary so much of the utility of version control is lost (the comments, feature tracking, etc still work)

I suggest a split between text/code and binary data and maybe having 2 files per worksheet instead of 1. I have already played with uncompressing the sws and version tracking the worksheet.html, but that doesn't integrate as nicely into a workflow.

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
0

answered 11 years ago

tmonteil gravatar image

You can work with .rst (ReStructuredText) files since these can be imported in a notebook and that there are ways to convert from .sws to .rst in both directions:

sage -advanced

tells you:

File conversion:
  -rst2txt [...]      -- Generates Sage worksheet text file from standalone
                         reStructuredText source.
  -rst2sws [...]      -- Generates Sage worksheet (.sws) from standalone
                         reStructuredText source.
  -sws2rst <sws doc>  -- Generates a reStructuredText source file from
                         a Sage worksheet (.sws) document.

Also, all the documentation and tutorials are written in ReStructuredText, and can be used as worksheets. They can be a good source of example to start with.

Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 11 years ago

Seen: 260 times

Last updated: Nov 13 '13