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

Add support for using the modularized passagemath distributions #16

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions _doctest_environment.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Toplevel for doctesting with passagemath

from sage.all__sagemath_combinat import *
from sage.all__sagemath_modules import *

from k_combinat_for_sage.all import *
from k_combinat_for_sage.all import _is_sequence
6 changes: 5 additions & 1 deletion k_combinat_for_sage/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@
#*****************************************************************************
import sys

from sage.all import *
try:
from sage.all import *
except ImportError:
from sage.all__sagemath_combinat import *

from sage.combinat.partition_shifting_algebras import ShiftingOperatorAlgebra as ShiftingOperatorAlgebraExplicit

parent_module = sys.modules['.'.join(__name__.split('.')[:-1]) or '__main__']
Expand Down
6 changes: 5 additions & 1 deletion k_combinat_for_sage/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@
# http://www.gnu.org/licenses/
#*****************************************************************************

from sage.all import *
try:
from sage.all import *
except ImportError:
from sage.all__sagemath_combinat import *
from sage.all__sagemath_modules import *
# ^*^ sphinx insert ^*^


Expand Down
6 changes: 5 additions & 1 deletion k_combinat_for_sage/k_shape.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@

import sys

from sage.all import *
try:
from sage.all import *
except ImportError:
from sage.all__sagemath_combinat import *
from sage.all__sagemath_modules import *

parent_module = sys.modules['.'.join(__name__.split('.')[:-1]) or '__main__']
if __name__ == '__main__' or parent_module.__name__ == '__main__':
Expand Down
7 changes: 6 additions & 1 deletion k_combinat_for_sage/partition.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@
# http://www.gnu.org/licenses/
#*****************************************************************************

from sage.all import *
try:
from sage.all import *
except ImportError:
from sage.all__sagemath_combinat import *
from sage.all__sagemath_modules import *

# ^*^ sphinx insert ^*^

# HELPERS
Expand Down
3 changes: 1 addition & 2 deletions k_combinat_for_sage/proof_of_work.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#!/usr/bin/env sage
# -*- coding: utf-8 -*-
""" This file demonstrates that I have completed each requested task (or the functionality already existed in sage) by showing an example for each one. """
from sage.all import *
from all import *
from .all import *
print('Sage loaded. Executing proof of work...')


Expand Down
6 changes: 5 additions & 1 deletion k_combinat_for_sage/root_ideal.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@

import sys

from sage.all import *
try:
from sage.all import *
except ImportError:
from sage.all__sagemath_combinat import *
from sage.all__sagemath_modules import *

parent_module = sys.modules['.'.join(__name__.split('.')[:-1]) or '__main__']
if __name__ == '__main__' or parent_module.__name__ == '__main__':
Expand Down
2 changes: 1 addition & 1 deletion k_combinat_for_sage/shorthands.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from k_combinat_for_sage.shorthands import *

"""
from all import *
from .all import *
# ^*^ sphinx insert ^*^

# pre-initialized useful variables
Expand Down
6 changes: 5 additions & 1 deletion k_combinat_for_sage/skew_partition.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@

import sys

from sage.all import *
try:
from sage.all import *
except ImportError:
from sage.all__sagemath_combinat import *
from sage.all__sagemath_modules import *

parent_module = sys.modules['.'.join(__name__.split('.')[:-1]) or '__main__']
if __name__ == '__main__' or parent_module.__name__ == '__main__':
Expand Down
6 changes: 5 additions & 1 deletion k_combinat_for_sage/strong_marked_tableau.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@

import sys

from sage.all import *
try:
from sage.all import *
except ImportError:
from sage.all__sagemath_combinat import *
from sage.all__sagemath_modules import *

parent_module = sys.modules['.'.join(__name__.split('.')[:-1]) or '__main__']
if __name__ == '__main__' or parent_module.__name__ == '__main__':
Expand Down
15 changes: 10 additions & 5 deletions k_combinat_for_sage/test_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,17 @@
# from __future__ import print_function
import time

from sage.all import *
try:
from sage.all import *
except ImportError:
from sage.all__sagemath_combinat import *
from sage.all__sagemath_modules import *

print('Sage loaded. Now loading local modules...')
from testing import *
from all import *
from all import _is_sequence
from strong_marked_tableau import __go_to_ribbon_head
from .testing import *
from .all import *
from .all import _is_sequence
from .strong_marked_tableau import __go_to_ribbon_head
start_time = time.time()
print('Modules loaded. Testing...')

Expand Down
7 changes: 6 additions & 1 deletion k_combinat_for_sage/testing.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Tools for testing purposes.
from sage.all import *
try:
from sage.all import *
except ImportError:
from sage.all__sagemath_combinat import *
from sage.all__sagemath_modules import *


def is_False_or_None(x):
return x is None or x == False
Expand Down
6 changes: 6 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,10 @@
download_url=download_url,
keywords=['morse', 'k-boundary', 'k-rim', 'k-shape', 'skew-linked diagram', 'k-irreducible', 'root ideals', 'k-schur', 'combinatorics', 'sage', 'sagemath', 'raising root operators', 'catalan functions'],
classifiers=[],
extras_require={
'passagemath': ['passagemath-combinat',
'passagemath-modules',
'passagemath-repl',
],
},
)
19 changes: 19 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# tox -c tox-passagemath.ini
[tox]
envlist = passagemath

[testenv:.pkg]
passenv =
CPATH
LIBRARY_PATH

[testenv:passagemath]
usedevelop = True
extras = passagemath

setenv =
# For access to _doctest_environment.py
PYTHONPATH=.

commands =
sage -tp --environment=_doctest_environment k_combinat_for_sage