-
-
Notifications
You must be signed in to change notification settings - Fork 484
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
Restructure sage.*.all
for modularization, replace relative by absolute imports
#36676
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
from sage.misc.lazy_import import lazy_import | ||
|
||
|
||
# Algebra base classes | ||
from sage.algebras.free_algebra import FreeAlgebra | ||
from sage.algebras.free_algebra_quotient import FreeAlgebraQuotient | ||
|
||
from sage.algebras.steenrod.all import * | ||
from sage.algebras.quantum_groups.all import * | ||
|
||
lazy_import('sage.algebras.iwahori_hecke_algebra', 'IwahoriHeckeAlgebra') | ||
lazy_import('sage.algebras.affine_nil_temperley_lieb', | ||
'AffineNilTemperleyLiebTypeA') | ||
lazy_import('sage.algebras.nil_coxeter_algebra', 'NilCoxeterAlgebra') | ||
lazy_import('sage.algebras.schur_algebra', ['SchurAlgebra', | ||
'SchurTensorModule']) | ||
|
||
lazy_import('sage.algebras.hall_algebra', 'HallAlgebra') | ||
|
||
lazy_import('sage.algebras.jordan_algebra', 'JordanAlgebra') | ||
|
||
lazy_import('sage.algebras.shuffle_algebra', 'ShuffleAlgebra') | ||
|
||
lazy_import('sage.algebras.commutative_dga', 'GradedCommutativeAlgebra') | ||
|
||
lazy_import('sage.algebras.rational_cherednik_algebra', | ||
'RationalCherednikAlgebra') | ||
|
||
lazy_import('sage.algebras.tensor_algebra', 'TensorAlgebra') | ||
|
||
lazy_import('sage.algebras.q_system', 'QSystem') | ||
|
||
lazy_import('sage.algebras.cluster_algebra', 'ClusterAlgebra') | ||
|
||
lazy_import('sage.algebras.yangian', 'Yangian') | ||
|
||
del lazy_import |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from sage.misc.lazy_import import lazy_import | ||
|
||
lazy_import('sage.algebras.group_algebra', 'GroupAlgebra') | ||
|
||
# old-style class for associative algebras, use Parent instead | ||
from sage.rings.ring import Algebra | ||
|
||
from sage.algebras.finite_dimensional_algebras.all import FiniteDimensionalAlgebra | ||
from sage.algebras.clifford_algebra import CliffordAlgebra, ExteriorAlgebra | ||
from sage.algebras.weyl_algebra import DifferentialWeylAlgebra | ||
lazy_import('sage.algebras.octonion_algebra', 'OctonionAlgebra') | ||
|
||
import sage.algebras.catalog as algebras | ||
del lazy_import |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
from .finite_dimensional_algebra import FiniteDimensionalAlgebra | ||
from sage.algebras.finite_dimensional_algebras.finite_dimensional_algebra import FiniteDimensionalAlgebra |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
""" | ||
Hecke Algebras | ||
""" | ||
#from sage.misc.lazy_import import lazy_import |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
#****************************************************************************** | ||
# ****************************************************************************** | ||
# Copyright (C) 2020 Reimundo Heluani <[email protected]> | ||
# | ||
# 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. | ||
# http://www.gnu.org/licenses/ | ||
#***************************************************************************** | ||
# https://www.gnu.org/licenses/ | ||
# ***************************************************************************** | ||
|
||
|
||
from sage.misc.lazy_import import lazy_import | ||
lazy_import('sage.algebras.lie_conformal_algebras.lie_conformal_algebra','LieConformalAlgebra') | ||
lazy_import('sage.algebras.lie_conformal_algebras', 'examples', 'lie_conformal_algebras') | ||
lazy_import('sage.algebras.lie_conformal_algebras.lie_conformal_algebra', | ||
'LieConformalAlgebra') | ||
lazy_import('sage.algebras.lie_conformal_algebras', | ||
'examples', 'lie_conformal_algebras') | ||
del lazy_import |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
from .quaternion_algebra import QuaternionAlgebra | ||
from sage.algebras.quatalg.quaternion_algebra import QuaternionAlgebra |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
""" | ||
The Steenrod algebra | ||
""" | ||
from .steenrod_algebra import SteenrodAlgebra, Sq | ||
from sage.misc.lazy_import import lazy_import | ||
lazy_import('sage.algebras.steenrod.steenrod_algebra', ['SteenrodAlgebra', 'Sq']) | ||
lazy_import('sage.algebras.steenrod.steenrod_algebra_bases', | ||
'steenrod_algebra_basis', | ||
deprecation=(32647, 'removed from namespace')) | ||
del lazy_import |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why convert this to a lazy import?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was convenient in the modularization. Do you have a specific concern about it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For another ticket: I think that
SteenrodAlgebra
(which I wrote) and other named algebras perhaps could be deprecated and accessed solely through the algebras catalog, as a way of cleaning up the namespace. (I have no concerns about lazy importing here, for what that's worth.)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just that it makes it very hard to review this PR, as there are all these unrelated changes sprinkled in. Can you extract these lazy_import changes to a new PR please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I don't believe this would be helpful for anything.