Hellooooooooo Jernej!

> A group of people here at my UNI wants to start creating databases storing
> interesting graphs and some of their (non-trivial to compute) invariants.
> The idea is to then make them available through optional Sage spkg's.
>
> ...
>
> - Is there any other method that you'd suggest for keeping such
> classifications?
> - Do you have any other constructive comments/requests before we start
> designing such thing?

Well, perhaps not an advice but perhaps an opinion: do not trust
anybody, do not trust any code.

For a start, I wouldn't use the "database" stuff either (not
maintained=dangerous). About the SPKG: right now the spkg are a mess:
you cannot download them from Sage's website (broken links), and my
work on Sage during the last days have been exclusively focused on
trying to build an 'up-to-date' list of them. It is no joke: getting
this list isn't very easy. "sage -standard", "sage -optional" are
broken, and that's only the beginning.

Also, the long-term status of spkg is a bit uncertain, and I fail to
see what it would bring you.

To me, the best way to share your graphs and make then easy to use is
simply to... provide a .py file on your website that makes it easy to
load them and explore the result of your computations. I thought about
it a bit, and it does not have to contain much:

1) A big list of dictionaries, each of which contains {"ID": '12345',
"parameter1": ..., "parameter2": ... }
2) A function taking an ID as input and returning the graph as output

The point of splitting the two is that you have a lot of data, and
that you do not want to store everything in RAM in order to be able to
use the data. Then, when you want the graph, you can do
"load_graph(its_ID)" and get it.

With some documentation at the head of the python file and a couple of
examples, that's probably the best and most reliable way to share your
graphs. It could also be used by anybody using Python (more than just
Sage users).

Note that it is very easy to query such a database:

    sage: my_filtered_list = [load_graph(g['ID']) for g in db if
g['parameter1'] == 2]

Also, I just had a look at your files: they are very heavy, but the
text files are not compressed. You could save a lot by either:
1) Compressing them
2) Storing the graph as graph6 or sparse6 string

graph6 and sparse6 are "safe" ways to store graph, as they are
relatively famous. You can even encode/decode them in command-line
with Brendan McKay's "Nauty" tools.

This, of course, should only be taken as "an opinion". Good luck! ;-)

Nathann

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to