Skip to content

Setting up a development environment

Colin B. Macdonald edited this page Jul 25, 2023 · 4 revisions

This software involves some IPC with SymPy which makes debugging complicated.

Here is one of the main dev's workflow: feel free to edit or add alternatives!

Dev workflow

Setting up in-tree development use while also possibly using

cd src      # or whereever you keep your code
git clone https://github.com/gnu-octave/symbolic.git
git clone https://github.com/sympy/sympy.git
cd symbolic/inst/
# symlink the sympy module to inside the inst dir
ln -s ~/src/sympy/sympy sympy
octave

That is, Octave is running inside the inst dir. Now one can change SymPy branches (by just changing into sympy and git switch ...).

To change code live on the fly (say after modifying methods in @sym/), do something like this in Octave (or just restart Octave of course).

>> clear all; clear classes; clear all
>> sympref reset

debugging the python code cell arrays in .m files.

There is a dbout() function that you can use like print() for debugging: it prints to stderr which is echoed on-screen in the Octave REPL.

Alternative workflows

Are you using something different? Feel free to describe it here!