From 98b59ba58fd5606d0711bd851451ce7d89af37e4 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 11 Mar 2024 01:01:41 -0700 Subject: [PATCH 1/5] src/download-packages.html: Remove some outdated links --- src/download-packages.html | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/download-packages.html b/src/download-packages.html index aa1cbc65..4be24743 100755 --- a/src/download-packages.html +++ b/src/download-packages.html @@ -6,20 +6,12 @@

Packages (SPKG)

- {{ sage }} consists of a selected set of packages which are well tested and integrated into the {{ sage }} - framework. Please have a look at the {{ sage }} - Wiki tracking SPKGs. There is also a list of links of {{ sage }} - components. The installation scripts of the {{ sage }} distribution will download the necessary package archives from one of the following mirrors automatically. - - + Most {{ sage }} users will not need to download any package archives manually.
-Most {{ sage }} users will not need to download any package archives manually. -{{ sage }} developers who need to access a specific version of a package (including old-style packages), -please use one of the mirrors: {{ mirrors("spkg") }}
{% endblock %} From 5cf6355a23f0aa6651988ff769b4c98cd73f241c Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 11 Mar 2024 01:04:05 -0700 Subject: [PATCH 2/5] scripts/README.TXT: Remove section on mercurial --- scripts/README.TXT | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/scripts/README.TXT b/scripts/README.TXT index 449f3c32..362d217d 100644 --- a/scripts/README.TXT +++ b/scripts/README.TXT @@ -113,30 +113,6 @@ pages. 3. To manually run the script, call ./mirror_manager_wrapper.sh -Updating Mercurial repositories at http://hg.sagemath.org ---------------------------------------------------------- - -1. Extract a Sage binary tarball. - -2. Navigate to the SAGE_ROOT of the resulting directory. - -3. Now issue this command: - - /home/sagemath/bin/sage-pushall - - This script uses Sage. If the above command doesn't work, open the - script in a text editor. Change all occurrences of "sage" to - - SAGE_ROOT/sage - - Save your changes and issue the command - - /home/sagemath/bin/sage-pushall - - After the script finish running, change all instances of - "SAGE_ROOT/sage" in the script back to "sage". - - Publications database --------------------- From b8eac7508021462aa730dd56757f9099a7d5d20f Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 11 Mar 2024 01:07:25 -0700 Subject: [PATCH 3/5] scripts/update_components.py: Remove --- scripts/README.TXT | 7 -- scripts/update_components.py | 191 ----------------------------------- 2 files changed, 198 deletions(-) delete mode 100755 scripts/update_components.py diff --git a/scripts/README.TXT b/scripts/README.TXT index 362d217d..4bf7dac3 100644 --- a/scripts/README.TXT +++ b/scripts/README.TXT @@ -153,13 +153,6 @@ This script automates updating the online and downloadable documentation. See the script for more information about its usage. -update_components.py --------------------- - -This script automates updating the page containing the list of components -that Sage uses. See the script for more information about its usage. - - MOTD: Message of the day ------------------------ diff --git a/scripts/update_components.py b/scripts/update_components.py deleted file mode 100755 index 5f9db7ae..00000000 --- a/scripts/update_components.py +++ /dev/null @@ -1,191 +0,0 @@ -#!/usr/bin/env python - -########################################################################### -# Copyright (c) 2010 Minh Van Nguyen -# 2014 Harald Schilly -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# http://www.gnu.org/licenses/ -########################################################################### - -# README -# -# Updating the online list of Sage components. To use this script, run it thus: -# -# $ ./update_components.py - -import copy -import os -from os.path import abspath, join -from subprocess import PIPE, Popen -import sys -import yaml - -# script uses relative paths, switch to its location -os.chdir(os.path.dirname(os.path.abspath(sys.argv[0]))) - -raise Exception("update_components is half/half broken. It did rely on the spkges but what still should work is the list of components from the yaml config file.") - -COMP_PAGE = abspath(join("..", "templates", "components.html")) -# STANDARD_DIR = abspath("../www/packages/standard") -PACKAGES_YAML = yaml.load(open(join("..", "conf", "packages.yaml"))) -# dictionaries of current packages -# Each package is described by the format -# spkg name without version number: (package name, URL, brief description) -SPKG = PACKAGES_YAML['spkg'] -# these components are embedded into other packages -SPKG_EMBEDDED = PACKAGES_YAML['spkg_embedded'] -# these packages should be excluded -SPKG_EXCLUDE = ["examples", "extcode", "sage", "sage_scripts", "sage_root"] - -############################## -# helper functions -############################## - - -def current_spkgs(spkgdir, spkg_db, spkg_exclude): - r""" - Return a list of the current packages in the standard spkg repository. - - INPUT: - - - spkgdir -- the directory where the standard spkg's are located. - - - spkg_db -- the database of standard packages. - - - spkg_exclude -- the spkg's to ignore. - - OUTPUT: - - A list of the current standard packages. If the given repository contains - an spkg not in the spkg database, we exit the script. In that case, you - might want to add that missing spkg to the spkg database of this script. - """ - # get list of current standard packages - P = Popen("ls %s/*.spkg" % spkgdir, shell=True, stdout=PIPE) - P = P.stdout.readlines() - P = [os.path.basename(s.strip()) for s in P] - # get rid of everything starting from the first dot "." - P = [s[:s.find(".")] for s in P] - # get rid of everything starting from the last dash "-" - P = [s[:s.rfind("-")] for s in P] - # determine those spkg's that are in the database of standard spkg's - spkg = [] - for s in P: - if s in spkg_db: - spkg.append(s) - elif s in spkg_exclude: - continue - else: - print("Unknown package '%s'. Consider adding this spkg to the spkg database of this script. Then re-run the script. Exiting..." % s) - sys.stdout.flush() - sys.exit(1) - return spkg - - -def replace_special(s): - r""" - Replace each special character from the spkg description with an - equivalent that is suitable for display on web pages. The special - characters we consider usually include escape sequences specific to LaTeX. - - INPUT: - - - s -- a string that describes an spkg. - - OUTPUT: - - A string the same as 's'. However, all special characters (LaTeX macros - for special characters) are replaced with equivalent HTML codes. - """ - replace_table = [ - ('\\"o', "ö"), - ('\\"u', "ü") - ] - cleansed_str = copy.copy(s) - for candidate, target in replace_table: - cleansed_str = cleansed_str.replace(candidate, target) - return cleansed_str - - -def update_page(f, spkg_current, spkg_db, spkg_embedded, sdelim, edelim): - r""" - Update the components page with the current list of standard spkg's. - - INPUT: - - - f -- the components page to update. - - - spkg_current -- the current list of standard packages. - - - spkg_db -- the database of standard packages. - - - spkg_embedded -- the list of packages that are embedded in other spkg's. - - - sdelim -- the delimiter signifying the start of the list of components. - - - edelim -- the delimiter signifying the end of the list of components. - - OUTPUT: - - Update the given components page with the current list of standard - packages. - """ - page = "{# AUTOGENERATED COMPONENT LIST -- update_components.py #} \n" - # get the package descriptions - P = [] - for s in spkg_current: - P.append(spkg_db[s]) - P += spkg_embedded.values() - # sorting the list of packages, ignoring cases - P = sorted(P, key=lambda x: x[0].lower()) - page = "
    \n" - for s in P: - # no URL provided for a component - if s[1] == "": - page += "
  1. %s: %s
  2. \n" % (s[0], replace_special(s[2])) - else: - page += '
  3. %s: %s
  4. \n' % \ - (s[1], s[0], replace_special(s[2])) - page += "
\n" - with open(f, "w") as F: - F.write(page) - - -def usage(): - """ - Print the usage information for this script. - """ - print("".join(["Usage: ", sys.argv[0]])) - sys.stdout.flush() - -############################## -# the script starts here -############################## - - -if __name__ == "__main__": - # sanity checks - if len(sys.argv) != 1: - # this script currently doesn't accept any argument - usage() - sys.exit(1) - # if not os.path.isdir(STANDARD_DIR): - # print("Invalid standard spkg repository directory %s. Exiting..." % STANDARD_DIR) - # sys.stdout.flush() - # sys.exit(1) - # now update the list of components - update_page( - COMP_PAGE, - current_spkgs(SPKG, SPKG_EXCLUDE), - SPKG, - SPKG_EMBEDDED) From 66b7f8333805e39f729cd79016c00449282d0c67 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 11 Mar 2024 01:15:48 -0700 Subject: [PATCH 4/5] Replace links to links-components.html --- scripts/apache_stats.py | 2 +- src/index.html | 2 +- src/library-press.html | 6 +++--- src/tour.html | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/apache_stats.py b/scripts/apache_stats.py index e68fb26f..885c7dbe 100755 --- a/scripts/apache_stats.py +++ b/scripts/apache_stats.py @@ -214,7 +214,7 @@ def trow(f, spkg, rowsum): \n''') - f.write('

SPKG Statistics

') + f.write('

SPKG Statistics

') cat_list = ', '.join('%s' % (cat_color(_), _) for _ in cats) f.write('
Categories: %s
' % cat_list) ts_diff = db.ts_last - db.ts_first diff --git a/src/index.html b/src/index.html index 4e7d3674..9031c990 100644 --- a/src/index.html +++ b/src/index.html @@ -33,7 +33,7 @@ GAP, FLINT, R -and many more. +and many more. Access their combined power through a common, Python-based language or directly via interfaces or wrappers. {# diff --git a/src/library-press.html b/src/library-press.html index 3e8f281b..ac7f5dc5 100755 --- a/src/library-press.html +++ b/src/library-press.html @@ -29,7 +29,7 @@

About {{ sage }}

source alternative to Magma, Maple, Mathematica, and Matlab.
-{{ sage }} consists of a collection of mathematical software +{{ sage }} consists of a collection of mathematical software and a core library bundling the functionality of these components into one consistent experience. Additionally to that it provides a framework to express mathematical calculations and a library of mathematical algorithms. @@ -63,7 +63,7 @@

Key Points

  1. {{ sage }} aims to provide everything mathematicians, researchers and students need to do their calculations. -The basic concept is to combine many established +The basic concept is to combine many established software packages under one umbrella. Even more than that, it provides powerful and unique algorithms in its own library. {{ sage }}'s mission is to "create a viable free open source alternative to Magma, @@ -127,7 +127,7 @@

    Quick Facts

    Webbrowser (GUI) and as a library > 180 developers -~ 100 components +~ 100 components ~ 600 MB source code in total diff --git a/src/tour.html b/src/tour.html index 73a6082d..e4b76cbd 100755 --- a/src/tour.html +++ b/src/tour.html @@ -6,8 +6,8 @@

    {{ sage }} Feature Tour

    {{ sage }} -is built out of nearly -100 open-source packages and features a unified +is built out of +hundreds of open-source packages and features a unified interface. {{ sage }} can be used to study elementary and advanced, pure and applied mathematics. This includes a huge range of mathematics, @@ -16,7 +16,7 @@

    {{ sage }} Feature Tour

    group theory, combinatorics, graph theory, exact linear algebra and much more. It combines -various software packages +various software packages and seamlessly integrates their functionality into a common experience. It is well-suited From d7e72c3efb730da9dbf8b935ee79be52b1d3f002 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 11 Mar 2024 01:17:35 -0700 Subject: [PATCH 5/5] scripts/upstream_spkg_descr.py: Remove --- scripts/upstream_spkg_descr.py | 56 ---------------------------------- 1 file changed, 56 deletions(-) delete mode 100755 scripts/upstream_spkg_descr.py diff --git a/scripts/upstream_spkg_descr.py b/scripts/upstream_spkg_descr.py deleted file mode 100755 index 1b38f0ec..00000000 --- a/scripts/upstream_spkg_descr.py +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -# this script moves all the the SPKG.txt descriptions to the -# spkg/upstream/*/ directories. -from __future__ import print_function - -import os -import cgi -from glob import glob -# import codecs - -NOTES_TMPL_1 = """ -
    - -
    -"""
    -NOTES_TMPL_2 = "
    " - -# step 1: update the ~/sage-git directory -os.chdir(os.path.expanduser("~/sage-git")) -os.system("git fetch origin") -os.system("git checkout master") -os.system("git reset --hard origin/develop") - -# step 2: construct path to source SPPK and -# walk through all the directories in the target directories -src_dir = os.path.expanduser("~/sage-git/build/pkgs/") -targ_dir = os.path.expanduser("~/files/spkg/upstream/") -os.chdir(targ_dir) -print("starting") -for dirname in glob("*"): - if not os.path.isdir(dirname): - continue - # check if index.html exists (if not, also create md5sums.txt) - if not os.path.exists(os.path.join(dirname, "index.html")): - for auxfn in ["index.html", "md5sums.txt"]: - os.system("touch %s" % os.path.join(dirname, auxfn)) - spkg_txt = os.path.join(src_dir, dirname, "SPKG.txt") - if not os.path.exists(spkg_txt): - print("WARNING: %s does not exist" % spkg_txt) - continue - spkg_target = os.path.join(targ_dir, dirname, "notes.txt") - print("%-25s" % dirname, end="") - # print spkg_txt, - txt = open(spkg_txt, "rb").read() # .decode("utf8") - with open(spkg_target, "wb") as f: - f.write(NOTES_TMPL_1) - f.write(cgi.escape(txt)) - f.write(NOTES_TMPL_2) - print("ok")