sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.4k stars 473 forks source link

Move SAGE_DATA to SAGE_LOCAL/share #13123

Closed ohanar closed 12 years ago

ohanar commented 12 years ago

This is part of the new layout for git. Since it is not too difficult to separate off this change, I decided making this a distinct ticket was a good idea. SAGE_EXTCODE will be moved to SAGE_ROOT/devel/ext, and currently SAGE_LOCAL/share/sage/ext links to this.

New SPKGS:

Installation Steps:

Depends on #13457

CC: @kini @jdemeyer @robertwb @burcin

Component: relocation

Author: R. Andrew Ohana, Jeroen Demeyer

Reviewer: François Bissey, Jeroen Demeyer

Merged: sage-5.4.beta2

Issue created by migration from https://trac.sagemath.org/ticket/13123

ohanar commented 12 years ago
comment:45

I changed the logic in sage.databases.cremona since I wrote it, and it when replacing everything, it annoyed me that it wasn't factored appropriately.

I'll see about fixing the extcode spkg-install (most of the code there comes from a recent version of the sagenb spkg-install) andspkg/install, as well as adding a symlink for SAGE_DATA.

ohanar commented 12 years ago

apply to extcode repo

ohanar commented 12 years ago

Attachment: trac13123_extcode.patch.gz

Attachment: trac13123_scripts.patch.gz

apply to scripts repo

ohanar commented 12 years ago
comment:46

I also fixed the commit message for the patches for the sage repos (I had already fixed the commit messages for the spkgs).

jdemeyer commented 12 years ago
comment:47

I would really prefer to separate the refactoring of the Cremona database code from this ticket (and then have either this ticket depend on that or the other way around).

jdemeyer commented 12 years ago

Changed reviewer from François Bissey to François Bissey, Jeroen Demeyer

jdemeyer commented 12 years ago
comment:49

sage/interfaces/gap.py: why change hash(SAGE_ROOT) to hash(SAGE_LOCAL)? I don't understand why you made that change, nor the implications of that change.

jdemeyer commented 12 years ago

Description changed:

--- 
+++ 
@@ -9,6 +9,6 @@
 Installation Steps:
 * Add new spkgs
 * Apply [attachment: trac13123_library.patch](https://github.com/sagemath/sage-prod/files/10655790/trac13123_library.patch.gz) to the library repo
-* Apply [attachment: trac13123_root.patch](https://github.com/sagemath/sage-prod/files/10655793/trac13123_root.patch.gz) to the root repo
+* Apply [attachment: trac13123_root.patch](https://github.com/sagemath/sage-prod/files/10655793/trac13123_root.patch.gz) and [attachment: 13123_root_review.patch](https://github.com/sagemath/sage-prod/files/10655792/13123_root_review.patch.gz) to the root repo
 * Apply [attachment: trac13123_scripts.patch](https://github.com/sagemath/sage-prod/files/10655788/trac13123_scripts.patch.gz) to the scripts repo
-* Apply [attachment: trac13123_extcode.patch](https://github.com/sagemath/sage-prod/files/10655787/trac13123_extcode.patch.gz) to the extcode repo
+* Apply [attachment: trac13123_extcode.patch](https://github.com/sagemath/sage-prod/files/10655787/trac13123_extcode.patch.gz) and [attachment: 13123_extcode_review.patch](https://github.com/sagemath/sage-prod/files/10655789/13123_extcode_review.patch.gz) to the extcode repo
jdemeyer commented 12 years ago
comment:50

Based on purely reading the patches: positive review modulo my reviewer patches and the Cremona and GAP changes that I mentioned.

In any case, this still needs massive amounts of testing.

kiwifb commented 12 years ago
comment:51

Sorry but I still don't understand the changes in sage/misc/explain_pickle.py and how they are related to the rest of the ticket. It may just be due to a lack of understanding on my part on the working of the pickle jar but the change seems unrelated to the rest of the ticket. Could someone offer me an explanation?

jdemeyer commented 12 years ago
comment:53

Attachment: 13123_extcode_review.patch.gz

jdemeyer commented 12 years ago
comment:54

This should be fixed:

sage -t --optional --long "devel/sage/sage/databases/symbolic_data.py"
**********************************************************************
File "/release/sage-5.4.beta2-try13123/devel/sage/sage/databases/symbolic_data.py", line 37:
    sage: sd = SymbolicData(); sd # optional - database_symbolic_data
Exception raised:
    Traceback (most recent call last):
      File "/release/sage-5.4.beta2-try13123/local/bin/ncadoctest.py", line 1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/release/sage-5.4.beta2-try13123/local/bin/sagedoctest.py", line 38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/release/sage-5.4.beta2-try13123/local/bin/ncadoctest.py", line 1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_0[2]>", line 1, in <module>
        sd = SymbolicData(); sd # optional - database_symbolic_data###line 37:
    sage: sd = SymbolicData(); sd # optional - database_symbolic_data
      File "/release/sage-5.4.beta2-try13123/local/lib/python/site-packages/sage/databases/symbolic_data.py", line 78, in __init__
        path=os.path.join(sage.misc.misc.SAGE_SHARE, 'symbolic_data')
    NameError: global name 'sage' is not defined
**********************************************************************
jdemeyer commented 12 years ago
comment:55

Also, I can't get the sloane_database optional doctests to work in sage/databases/sloane.py, but I don't think it's because of this ticket.

ohanar commented 12 years ago

apply to sage library

ohanar commented 12 years ago
comment:56

Attachment: trac13123_library.patch.gz

@kiwifb

Because the commented out code references SAGE_DATA/extcode and hasn't been used in a long long time (see #6233).

Ok, updated. Changes:

jdemeyer commented 12 years ago
comment:57

sage --bdist doesn't copy devel/ext, leading to non-working binary builds.

jdemeyer commented 12 years ago

Dependencies: #13457

jdemeyer commented 12 years ago

Description changed:

--- 
+++ 
@@ -10,5 +10,5 @@
 * Add new spkgs
 * Apply [attachment: trac13123_library.patch](https://github.com/sagemath/sage-prod/files/10655790/trac13123_library.patch.gz) to the library repo
 * Apply [attachment: trac13123_root.patch](https://github.com/sagemath/sage-prod/files/10655793/trac13123_root.patch.gz) and [attachment: 13123_root_review.patch](https://github.com/sagemath/sage-prod/files/10655792/13123_root_review.patch.gz) to the root repo
-* Apply [attachment: trac13123_scripts.patch](https://github.com/sagemath/sage-prod/files/10655788/trac13123_scripts.patch.gz) to the scripts repo
+* Apply #13457 and [attachment: trac13123_scripts.patch](https://github.com/sagemath/sage-prod/files/10655788/trac13123_scripts.patch.gz) and [attachment: 13123_bdist.patch](https://github.com/sagemath/sage-prod/files/10655791/13123_bdist.patch.gz) to the scripts repo
 * Apply [attachment: trac13123_extcode.patch](https://github.com/sagemath/sage-prod/files/10655787/trac13123_extcode.patch.gz) and [attachment: 13123_extcode_review.patch](https://github.com/sagemath/sage-prod/files/10655789/13123_extcode_review.patch.gz) to the extcode repo
jdemeyer commented 12 years ago

Attachment: 13123_bdist.patch.gz

jdemeyer commented 12 years ago
comment:62

Tested building from scratch, sdist, bdist, works fine. Positive review to everything not authored by me.

I agree with the deleting of the commented-out code in sage/misc/explain_pickle.py. If people really want to do something with that code, it's still in the Mercurial history.

My reviewer patches still need review.

ohanar commented 12 years ago

Changed author from R. Andrew Ohana to R. Andrew Ohana, Jeroen Demeyer

ohanar commented 12 years ago
comment:64

Mercurial should no longer be marked as a dependency for the extcode spkg (it is no longer used in the spkg-install).

jdemeyer commented 12 years ago

Attachment: 13123_root_review.patch.gz

kiwifb commented 12 years ago
comment:66

Looks all clear to me. I didn't really notice that the explain_pickle code was commented out last week, probably because of other stuff going on locally. But still happy that this is related to the rest of the ticket and not a freebie done at the same time.

As far as I can see it is ready to go.

jdemeyer commented 12 years ago

Merged: sage-5.4.beta2

jdemeyer commented 12 years ago

apply to root repo

jdemeyer commented 12 years ago
comment:68

Attachment: trac13123_root.patch.gz

Rebased attachment: trac13123_root.patch because of fuzz.

jdemeyer commented 11 years ago
comment:69

Why was GAP_STAMP changed from

GAP_STAMP = '%s/local/bin/gap_stamp'%SAGE_ROOT

to

GAP_STAMP = SAGE_EXTCODE

This seems a mistake and might be the cause of #13963.