You will probably need the core, functions, solvers (or at least the
parts of solvers that you want to support), and integration.  You'll
aslo probably want the parsing module, as I noted.

You will actually find that the modules are more interlinked than you
might expect. For example, the functions module relies on the ntheory
module to evaluate some functions at numeric arguments (e.g.,
perfect_power is used in log.eval()).

There is a little graph of the dependencies of the modules in SymPy at
http://code.google.com/p/sympy/issues/detail?id=2103 (see the one from
comment 7).  This may not be up to date, but I provide the code to
regenerate it.

You'll see from there that you will probably need to convert the polys
(this is almost as essential as the core for some operations), the
logic and assumptions modules, which are used for assumptions (I
wouldn't recommend trying to remove assumptions from the code), you'll
need the matrices and simplify for the solvers and integration modules
(and perhaps other things as well), and you might need some stuff from
utilities (which shouldn't cause too many problems with pyjamas, I
would think).

You can probably get rid of tensor by limiting the scope of which
functions you want to support.

If you just want to get Symbol('x') to work, you should start with
just the core, and work your way up from there.  You can get a rough
idea of which modules are the most important by looking at what order
they are imported in sympy/__init__.py, since the ones that the others
depend on have to be imported first.

Aaron Meurer

On Sat, Sep 24, 2011 at 7:48 AM, dennis <[email protected]> wrote:
> You are right, I don't need to convert the whole project. What I need for my
> current project is some school math (deriving/integrating/solving functions
> like "x^2", "x^3-3x+2", "sin(x)", "log(x)" etc.). I don't need most of the
> other code e.g. plotting.
>
> So before refactoring the code I should probably check which modules I need
> to convert.
>
> I forked sympy at github (I hope that I have done that right, I have never
> worked with it before...) and created a branch sympy2js where I sorted out
> some modules like plotting/benchmark.
>
> Then I created a file runmin.py which contains:
>
> from sympy.core.symbol import Symbol
> print Symbol('x')
>
> So I now want to sort out all modules that are not needed for this simple
> code and then try to refactor only the needed modules.
>
> But when I for example delete the tensors folder I get some errors because
> it is included in many other modules. How should I find out which modules I
> can delete and which not? Do you have a list of the minimum required
> modules?
>
> I don't think that eval() is supported by pyjamas. For example "print
> eval('4*4')" compiles fine but gives an error at runtime in the browser.
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/sympy/-/jQKNmtFhCq4J.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/sympy?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to