Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

how to organize multifile project

I am working on a project to do some computations for a specialized theory. Currently, we have several files that define different objects that have various dependencies on each other. Currently, I have a file named "attachall.sage" that looks like

attach "poly.sage" attach "util2.sage" attach "quasihomogeneous.sage" attach "FJRW.sage" attach "algebra.sage"

etc. Then when I want to do some computations, I do sage: load attachall.sage sage: #do stuff with the objects

It works fine, I guess, but doesn't seem particularly clean-- it seems like there should be a preferred way to do this. Should I use python's import? But then I would have to re-preparse every time I changed the source, and have potentially annoying bugs if someone forgot to re-preparse after changing a file. Or should I look into making a spkg? I don't really know a lot about that and I'd like to keep it simple.

Eventually we'd like to be able to share this code with other groups.

Does anyone have any thoughts?

click to hide/show revision 2
somehow the newlines didn't show up

how to organize multifile project

I am working on a project to do some computations for a specialized theory. Currently, we have several files that define different objects that have various dependencies on each other. Currently, I have a file named "attachall.sage" that looks like

attach "poly.sage" attach "util2.sage" attach "quasihomogeneous.sage" attach "FJRW.sage" "poly.sage"

attach "util2.sage"

attach "quasihomogeneous.sage"

attach "FJRW.sage"

attach "algebra.sage"

etc. Then when I want to do some computations, I do sage: load attachall.sage sage: #do stuff with the objects

It works fine, I guess, but doesn't seem particularly clean-- it seems like there should be a preferred way to do this. Should I use python's import? But then I would have to re-preparse every time I changed the source, and have potentially annoying bugs if someone forgot to re-preparse after changing a file. Or should I look into making a spkg? I don't really know a lot about that and I'd like to keep it simple.

Eventually we'd like to be able to share this code with other groups.

Does anyone have any thoughts?

how to organize multifile project

I am working on a project to do some computations for a specialized theory. Currently, we have several files that define different objects that have various dependencies on each other. Currently, I have a file named "attachall.sage" that looks like

attach "poly.sage"

attach "util2.sage"

attach "quasihomogeneous.sage"

attach "FJRW.sage"

attach "algebra.sage"

etc. Then when I want to do some computations, I do

sage: load attachall.sage attachall.sage

sage: #do stuff with the objects

It works fine, I guess, but doesn't seem particularly clean-- it seems like there should be a preferred way to do this. Should I use python's import? But then I would have to re-preparse every time I changed the source, and have potentially annoying bugs if someone forgot to re-preparse after changing a file. Or should I look into making a spkg? I don't really know a lot about that and I'd like to keep it simple.

Eventually we'd like to be able to share this code with other groups.

Does anyone have any thoughts?

click to hide/show revision 4
retagged

how to organize multifile project

I am working on a project to do some computations for a specialized theory. Currently, we have several files that define different objects that have various dependencies on each other. Currently, I have a file named "attachall.sage" that looks like

attach "poly.sage"

attach "util2.sage"

attach "quasihomogeneous.sage"

attach "FJRW.sage"

attach "algebra.sage"

etc. Then when I want to do some computations, I do

sage: load attachall.sage

sage: #do stuff with the objects

It works fine, I guess, but doesn't seem particularly clean-- it seems like there should be a preferred way to do this. Should I use python's import? But then I would have to re-preparse every time I changed the source, and have potentially annoying bugs if someone forgot to re-preparse after changing a file. Or should I look into making a spkg? I don't really know a lot about that and I'd like to keep it simple.

Eventually we'd like to be able to share this code with other groups.

Does anyone have any thoughts?