Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#16541 closed enhancement (fixed)

MOLS table : 10 000 integers

Reported by: ncohen Owned by:
Priority: major Milestone: sage-6.3
Component: combinatorial designs Keywords:
Cc: vdelecroix, knsam, brett Merged in:
Authors: Nathann Cohen Reviewers: Volker Braun, Vincent Delecroix
Report Upstream: N/A Work issues:
Branch: 911c676 (Commits) Commit:
Dependencies: #16423 Stopgaps:

Change History (44)

comment:1 Changed 5 years ago by ncohen

  • Branch set to u/ncohen/16541
  • Status changed from new to needs_review

comment:2 Changed 5 years ago by git

  • Commit set to 3bdf9d801c467d3d8e2d1b3d94997b8d14362087

Branch pushed to git repo; I updated commit sha1. Last 10 new commits:

81b9448trac #16430: put back the seealso
0fa89d5trac #16347: Wilson's construction with two truncated groups
828ff22trac #16437: cut the branches in W. dec. with two trunc. blocks
8ebd21btrac #16347: use is_sum_of_squares_pyx instead of two_squares
0175134trac #16347: doc + simplifications
9ff5062trac #16423: Table of MOLS from the handbook and comparison with Sage
e64be98trac #16423: tiny code improvement and alignment
e948cf6trac #16423: Aligning the alignment
0a7d853trac #16423: Broken doctests
3bdf9d8trac #16541: MOLS table : 10 000 integers

comment:3 Changed 5 years ago by vdelecroix

Cool!

  • Would be better if you read the handbook_data.txt only if compare=True.
  • Would be nice if we could print the table of the handbook itself! Like a sage/compare/handbook alternative

Vincent

comment:4 Changed 5 years ago by git

  • Commit changed from 3bdf9d801c467d3d8e2d1b3d94997b8d14362087 to 29c48c3b22f1fc2972630409d3b77d35a168540e

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

29c48c3trac #16541: MOLS table : 10 000 integers

comment:5 Changed 5 years ago by ncohen

I added a "if" to avoid loading the file when it is not necessary. If you want to be able to print the handbook's table you will have to add a commit.

Nathann

comment:6 Changed 5 years ago by vdelecroix

  • Status changed from needs_review to positive_review

Good to go! (doc builds and doctests pass)

Vincent

comment:7 Changed 5 years ago by ncohen

Thanks !

Nathann

comment:8 Changed 5 years ago by vbraun

  • Reviewers set to Vincent Delecroix

reviewer name

comment:9 Changed 5 years ago by vbraun

Missing file?

sage -t --long src/sage/combinat/designs/latin_squares.py
**********************************************************************
File "src/sage/combinat/designs/latin_squares.py", line 46, in sage.combinat.designs.latin_squares
Failed example:
    MOLS_table(15,compare=True) # long time
Exception raised:
    Traceback (most recent call last):
      File "/Users/buildbot/build/sage/bsd-1/sage_git/build/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 480, in _run
        self.execute(example, compiled, test.globs)
      File "/Users/buildbot/build/sage/bsd-1/sage_git/build/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 839, in execute
        exec compiled in globs
      File "<doctest sage.combinat.designs.latin_squares[2]>", line 1, in <module>
        MOLS_table(Integer(15),compare=True) # long time
      File "/Users/buildbot/build/sage/bsd-1/sage_git/build/local/lib/python2.7/site-packages/sage/combinat/designs/latin_squares.py", line 470, in MOLS_table
        handbook_file = open("handbook_data.txt",'r')
    IOError: [Errno 2] No such file or directory: 'handbook_data.txt'
**********************************************************************
File "src/sage/combinat/designs/latin_squares.py", line 460, in sage.combinat.designs.latin_squares.MOLS_table
Failed example:
    MOLS_table(5,compare=True) # long time
Exception raised:
    Traceback (most recent call last):
      File "/Users/buildbot/build/sage/bsd-1/sage_git/build/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 480, in _run
        self.execute(example, compiled, test.globs)
      File "/Users/buildbot/build/sage/bsd-1/sage_git/build/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 839, in execute
        exec compiled in globs
      File "<doctest sage.combinat.designs.latin_squares.MOLS_table[2]>", line 1, in <module>
        MOLS_table(Integer(5),compare=True) # long time
      File "/Users/buildbot/build/sage/bsd-1/sage_git/build/local/lib/python2.7/site-packages/sage/combinat/designs/latin_squares.py", line 470, in MOLS_table
        handbook_file = open("handbook_data.txt",'r')
    IOError: [Errno 2] No such file or directory: 'handbook_data.txt'
**********************************************************************

comment:10 Changed 5 years ago by vdelecroix

nope, it is in the commit ​29c48c3... I don't understand the error!!

EDIT: and the doctest pass on my computer!

REDIT: actually depending from where you run the computation the test fails or not

from SAGE_ROOT running

sage -t src/sage/combinat/designs/latin_squares.py

does fail!!

Vincent

Last edited 5 years ago by vdelecroix (previous) (diff)

comment:11 follow-up: Changed 5 years ago by vdelecroix

Easy solution:

move the file handbook_data.txt into local/share (where most of the raw data belong) and then use

import os.path
from sage.misc.misc import SAGE_SHARE
handbook_file = open(os.path.join(SAGE_SHARE, "handbook_data.txt"),'r')
...

What do you think Nathann?

Vincent

comment:12 Changed 5 years ago by vdelecroix

  • Status changed from positive_review to needs_work

comment:13 follow-up: Changed 5 years ago by vdelecroix

All right, proposition at "public/16541v2"?

By the way Nathann, there is no license issue with copying the whole MOLS table from the handbook?

Vincent

comment:14 in reply to: ↑ 13 Changed 5 years ago by ncohen

All right, proposition at "public/16541v2"?

By the way Nathann, there is no license issue with copying the whole MOLS table from the handbook?

You mean that whoever copies/paste Sage's table of MOLS in a paper has to publish it in open access, or that whoever uses our table in a software has to license it with the GPL ? :-P

I take it as a mathematical result. Or 10 000 mathematical results. Of which a good part has been obtained with Sage's functions ;-)

Nathann

comment:15 in reply to: ↑ 11 Changed 5 years ago by ncohen

Yo !

Easy solution:

move the file handbook_data.txt into local/share (where most of the raw data belong) and then use

import os.path
from sage.misc.misc import SAGE_SHARE
handbook_file = open(os.path.join(SAGE_SHARE, "handbook_data.txt"),'r')
...

What do you think Nathann?

I don't know if I can just write a file to SAGE_SHARE or if it has to go through a SPKG -_-

Nathann

comment:16 Changed 5 years ago by git

  • Commit changed from 29c48c3b22f1fc2972630409d3b77d35a168540e to f4f924081d9aa4e4124bb93683fbf5c9ef116b7f

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

f4f9240trac #16541: MOLS table : 10 000 integers

comment:17 Changed 5 years ago by ncohen

  • Description modified (diff)
  • Status changed from needs_work to needs_review

Branch updated with a new "designs" spkg. And the tar.bz2 that should be located in SAGE_ROOT/upstream/ is there :

http://www.steinertriples.fr/ncohen/tmp/designs-20140630.tar.bz2

Nathann

comment:18 follow-up: Changed 5 years ago by vdelecroix

Hi Nathann,

You are probably right with the spkg. In order to work, the spkg needs to be in standard but the policy is that new spkg goes into optional. Either you write a try/except in the function to test whether the file is here or you ask on sage-devel is everybody is ok to add a trivial text file to the list of standard spkg (the file is really like the database of conway polynomials, si I guess this is fine).

Vincent

comment:19 Changed 5 years ago by vdelecroix

  • Status changed from needs_review to needs_info

comment:20 in reply to: ↑ 18 Changed 5 years ago by ncohen

You are probably right with the spkg. In order to work, the spkg needs to be in standard but the policy is that new spkg goes into optional.

I don't think that anybody is stupid enough to tell me that I need to wait one year to add a text file into Sage.

I will write to Sage, if that's a problem.

Nathann

Last edited 5 years ago by ncohen (previous) (diff)

comment:21 Changed 5 years ago by vbraun

I'm ok with making it a standard spkg. Note that, by definition, this means that it is installed by default. You need a corresponding entry in build/deps for that.

A more specific name than "designs" would be nice, maybe "combinatorial_designs". But design alone isn't even unique in math, e.g. dessins d'enfants.

A saner way to install the file would be to mkdir -p the target directory and then just copy the file. Blowing the whole directory away is unnecessary and potentially counterproductive in the future, maybe you'll add an optional huge database later on. Not to mention umasks.

comment:22 Changed 5 years ago by git

  • Commit changed from f4f924081d9aa4e4124bb93683fbf5c9ef116b7f to f20116d6eb35ebf80e71f6498603938b0326edec

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

f20116dtrac #16541: MOLS table : 10 000 integers

comment:23 Changed 5 years ago by ncohen

  • Description modified (diff)
  • Status changed from needs_info to needs_review

New commits:

f20116dtrac #16541: MOLS table : 10 000 integers

comment:24 Changed 5 years ago by ncohen

Is that right ?

Nathann

comment:25 Changed 5 years ago by vdelecroix

  • Status changed from needs_review to positive_review

At least for me this is good!

Vincent

comment:26 Changed 5 years ago by vbraun

  • Status changed from positive_review to needs_work

Can you add a == License == section? Data cannot be copyrighted, but the way it is stored in a database is. Not specifying a license means we are not allowed to distribute it.

comment:27 Changed 5 years ago by ncohen

And what should I put there ? GPL2 or something ? Is that a correct license for data ?

Nathann

comment:28 Changed 5 years ago by ncohen

Besides how can I give a license to a data I just found in a book ? O_o

comment:29 Changed 5 years ago by vbraun

GPL or Public Domain is fine. The data is not copyrighted, its the presentation. You choose the license since you curated the electronic database (even if its a bit silly in this case).

comment:30 Changed 5 years ago by git

  • Commit changed from f20116d6eb35ebf80e71f6498603938b0326edec to e282f17bd361245dc899a4e56fede2d52f0efdba

Branch pushed to git repo; I updated commit sha1. New commits:

7e463a9trac #16541: Merged with beta5
e282f17trac #16541: Setting a license for a list of integers

comment:31 Changed 5 years ago by ncohen

  • Status changed from needs_work to needs_review

Okay....

Nathann

comment:32 Changed 5 years ago by vbraun

  • Status changed from needs_review to positive_review

comment:33 Changed 5 years ago by vbraun

  • Status changed from positive_review to needs_work

Code still refers to designs/MOLS_table.txt. Also, I'd recommend to use os.path.join to concatenate paths.

comment:34 Changed 5 years ago by ncohen

Arg, sorry... And obviously doctests passed because the file was installed on my computed T_T

Nathann

comment:35 Changed 5 years ago by git

  • Commit changed from e282f17bd361245dc899a4e56fede2d52f0efdba to cd902358a5b5138dcb2550339f8073d557d369db

Branch pushed to git repo; I updated commit sha1. New commits:

cd90235trac #16541: New directory

comment:36 Changed 5 years ago by ncohen

  • Status changed from needs_work to needs_review

comment:37 Changed 5 years ago by vbraun

  • Status changed from needs_review to needs_work

Its still not installed by default. You also need to define the COMBINATORIAL_DESIGNS variable somewhere, there should be a corresponding line COMBINATORIAL_DESGINS=newest_version combinatorial_designs(or so, with corrected backticks) in build/install

Last edited 5 years ago by vbraun (previous) (diff)

comment:38 Changed 5 years ago by git

  • Commit changed from cd902358a5b5138dcb2550339f8073d557d369db to 911c6764de1702a1471815d5379ed105a2d363a3

Branch pushed to git repo; I updated commit sha1. New commits:

911c676trac #16541: make it a default spkg

comment:39 Changed 5 years ago by ncohen

  • Status changed from needs_work to needs_review

comment:40 Changed 5 years ago by ncohen

ping ?

comment:41 Changed 5 years ago by ncohen

Pom Pom Pom ...

comment:42 Changed 5 years ago by vdelecroix

  • Reviewers changed from Vincent Delecroix to Volker Braun, Vincent Delecroix
  • Status changed from needs_review to positive_review

Everything went fine on my computer... I set it to positive review.

Vincent

comment:43 Changed 5 years ago by vbraun

  • Branch changed from u/ncohen/16541 to 911c6764de1702a1471815d5379ed105a2d363a3
  • Resolution set to fixed
  • Status changed from positive_review to closed

comment:44 Changed 5 years ago by vbraun

  • Commit 911c6764de1702a1471815d5379ed105a2d363a3 deleted

Fix for the graph database boo-boo in #16735

Note: See TracTickets for help on using tickets.