Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modularization of sagelib: Break out separate packages sagemath-environment, sagemath-repl #29941

Closed
mkoeppe opened this issue Jun 22, 2020 · 191 comments

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented Jun 22, 2020

The distribution sagemath-environment has no dependencies and contains:

It also includes the top-level scripts sage and sage-env, and the helper script sage-venv-config. This will allow users to run sage -sh even if sagelib is not installed.

To test:

$ ./bootstrap && ./sage -sh -c '(cd pkgs/sagemath-environment && SAGE_NUM_THREADS=16 tox -r -v -v -v -e py39)'

The distribution sagemath-repl depends on (install-requires) sagemath-environment and sagemath-objects and contains at least the following:

  • sage.repl
  • sage.doctest (which depends on sage.repl)
  • sage.misc.sage_input
  • sage.misc.sage_eval

It also includes scripts such as sage-runtests (which implements sage -t), sage-ipython (which is called when sage is invoked with no arguments), etc.

Of course, with nothing else installed, neither sage -t nor sage will work fully because sage.all is not available. But sage -t already has the option --environment for specifying a different top-level module in which to run the doctester; we use this in the test suite of sagemath-objects and sagemath-polyhedra (#32432).

To test:

$ ./bootstrap && ./sage -sh -c '(cd pkgs/sagemath-repl && SAGE_NUM_THREADS=16 tox -r -v -v -v -e py39)'

Afterwards:

$ source pkgs/sagemath-repl/.tox/py39/bin/activate
(py39) $ sage                                                                                        
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 9.6.rc3, Release Date: 2022-04-29                 │
│ Using Python 3.9.10. Type "help()" for help.                       │
└────────────────────────────────────────────────────────────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Warning: this is a prerelease version, and it may be unstable.     ┃
┃ Warning: sage.all is not available; this is a limited REPL.        ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
sage:                                                                                                                                                                                                                       

Note the new warning about sage.all.

We also change all pkgs/*/VERSION.txt files from symlinks to regular files, updated by sage-update-version when a new release is made. This makes it easier to cut post-versions such as 9.6.rc3.post4 or dev versions such as 9.6.rc4.dev1, as was necessary during the development of this ticket. See documentation added in this ticket.

Follow-ups (see Meta-ticket #29705):

Depends on #33797
Depends on #33016
Depends on #33799
Depends on #33801
Depends on #33803

CC: @kwankyu @tobiasdiez @kliem @orlitzky @dimpase @jhpalmieri @kiwifb

Component: refactoring

Keywords: sd111

Author: Matthias Koeppe

Branch/Commit: 3884373

Reviewer: Dima Pasechnik

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

@mkoeppe mkoeppe added this to the sage-9.2 milestone Jun 22, 2020
@mkoeppe mkoeppe modified the milestones: sage-9.2, sage-9.3 Aug 13, 2020
@mkoeppe
Copy link
Contributor Author

mkoeppe commented Dec 6, 2020

comment:2

Hoping we can make progress on this ticket this week - https://wiki.sagemath.org/days111

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Dec 6, 2020

Changed keywords from none to sd111

@mkoeppe mkoeppe changed the title Modularization of sagelib: Break out a separate package sage-repl Modularization of sagelib: Break out a separate package sagemath-repl Dec 9, 2020
@mkoeppe
Copy link
Contributor Author

mkoeppe commented Feb 13, 2021

comment:4

Setting new milestone based on a cursory review of ticket status, priority, and last modification date.

@mkoeppe mkoeppe modified the milestones: sage-9.3, sage-9.4 Feb 13, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.4, sage-9.5 Jul 19, 2021
@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Nov 27, 2021

Dependencies: #29865

@mkoeppe mkoeppe changed the title Modularization of sagelib: Break out a separate package sagemath-repl Modularization of sagelib: Break out separate packages sagemath-features, sagemath-repl Nov 27, 2021
@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe mkoeppe changed the title Modularization of sagelib: Break out separate packages sagemath-features, sagemath-repl Modularization of sagelib: Break out separate packages sagemath-environment, sagemath-repl Nov 27, 2021
@mkoeppe
Copy link
Contributor Author

mkoeppe commented Nov 27, 2021

Changed dependencies from #29865 to #29865, #32899

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Nov 27, 2021

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 27, 2021

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

23ecefcpkgs/sagemath-environment: Edit metadata

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 27, 2021

Commit: 23ecefc

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 27, 2021

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

c23ffa0pkgs/sagemath-environment: Edit metadata

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 27, 2021

Changed commit from 23ecefc to c23ffa0

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 28, 2021

Changed commit from c23ffa0 to d2c3a93

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 28, 2021

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

d2c3a93src/doc/en/developer/packaging_sage_library.rst: Explain build/pkgs

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Nov 28, 2021

Author: Matthias Koeppe, ...

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Dec 5, 2021

Changed dependencies from #29865, #32899 to #29865, #32899, #32977

@mkoeppe
Copy link
Contributor Author

mkoeppe commented May 15, 2022

comment:131

trivial merge

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 15, 2022

Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:

0b74a68Merge tag '9.6' into t/29941/modularization_of_sagelib__break_out_separate_packages_sagemath_environment__sagemath_repl

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 15, 2022

Changed commit from 15a2894 to 0b74a68

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 26, 2022

Changed commit from 0b74a68 to ffcbc79

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 26, 2022

Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:

ffcbc79Merge tag '9.7.beta1' into t/29941/modularization_of_sagelib__break_out_separate_packages_sagemath_environment__sagemath_repl

@vbraun
Copy link
Member

vbraun commented May 28, 2022

comment:136

Not the only fail but e.g.:

**********************************************************************
File "src/sage/misc/lazy_attribute.pyx", line 89, in sage.misc.lazy_attribute._lazy_attribute._sage_src_lines_
Failed example:
    lines
Expected:
    81
Got:
    89
**********************************************************************
1 item had failures:
   1 of   6 in sage.misc.lazy_attribute._lazy_attribute._sage_src_lines_
    [100 tests, 1 failure, 2.55 s]
----------------------------------------------------------------------
sage -t --long --warn-long 46.9 --random-seed=123 src/sage/misc/lazy_attribute.pyx  # 1 doctest failed
----------------------------------------------------------------------

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 28, 2022

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

a5da84asrc/sage/misc/{abstract_method.py,lazy_attribute.pyx}: Update doctest output
3884373src/sage/tests/cmdline.py: Update doctest for changed help message

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 28, 2022

Changed commit from ffcbc79 to 3884373

@mkoeppe
Copy link
Contributor Author

mkoeppe commented May 28, 2022

comment:139

The failure in sage/doctest/forker.py is unrelated, fixed in #33917.

@dimpase
Copy link
Member

dimpase commented May 29, 2022

comment:140

OK

@vbraun
Copy link
Member

vbraun commented Jun 12, 2022

@vbraun vbraun closed this as completed in 8d796b6 Jun 12, 2022
mkoeppe added a commit to mkoeppe/sage that referenced this issue Feb 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants