Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
28 changes: 14 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ jobs:
&& !contains(github.event.head_commit.message, '[skip tests]')
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]
fail-fast: false
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -41,25 +41,25 @@ jobs:
- name: Lint
run: |
flake8 -v
- uses: hidakatsuya/action-setup-diff-pdf@v1.3.0
if: "matrix.python-version == '3.11'"
- uses: hidakatsuya/action-setup-diff-pdf@v1.4.0
if: "matrix.python-version == '3.12'"
with:
diff-pdf-version: '0.5'
- uses: actions/cache@v3
name: Tectonic Cache
if: "matrix.python-version == '3.11'"
if: "matrix.python-version == '3.12'"
with:
path: ~/.cache/Tectonic
key: ${{ runner.os }}-tectonic-${{ hashFiles('**/*.tex') }}
restore-keys: |
${{ runner.os }}-tectonic-
- uses: wtfjoke/setup-tectonic@v2
if: "matrix.python-version == '3.11'"
if: "matrix.python-version == '3.12'"
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
biber-version: "latest"
- name: Set environment variables
if: "matrix.python-version == '3.11'"
if: "matrix.python-version == '3.12'"
run: |
echo "TEST_GXPDF=1" >> "$GITHUB_ENV"
- name: Test
Expand All @@ -79,12 +79,12 @@ jobs:
--nbval-sanitize-with test/.nbval_sanitize.cfg \
"${PYTEST_ARGS[@]}"
- name: Upload coverage to Codecov
if: "matrix.python-version == '3.11'"
if: "matrix.python-version == '3.12'"
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
- uses: actions/upload-artifact@v4
if: "matrix.python-version == '3.11' && failure()"
if: "matrix.python-version == '3.12' && failure()"
with:
name: PDF-diffs
path: test/diff
Expand All @@ -106,11 +106,11 @@ jobs:
url: https://pypi.org/p/galgebra
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"
- name: Install wheel
run: |
python -m pip install wheel packaging
Expand Down
2 changes: 1 addition & 1 deletion examples/primer/cm3.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"\n",
"cm3coords = (o,x,y,z,infty) = symbols('o 1 2 3 infty', real=True)\n",
"cm3g = '0 0 0 0 -1, 0 1 0 0 0, 0 0 1 0 0, 0 0 0 1 0, -1 0 0 0 0'\n",
"cm3 = Ga('o \\mathbf{e}_1 \\mathbf{e}_2 \\mathbf{e}_3 \\infty', g = cm3g, coords = cm3coords)\n",
"cm3 = Ga(r'o \\mathbf{e}_1 \\mathbf{e}_2 \\mathbf{e}_3 \\infty', g = cm3g, coords = cm3coords)\n",
"(eo, e1, e2, e3, eoo) = cm3.mv()\n",
"ep = eo - eoo/2 # ep^2 = +1 Geometric Algebra for Computer Science 408\n",
"em = eo + eoo/2 # em^2 = -1\n",
Expand Down
2 changes: 1 addition & 1 deletion examples/primer/gprint.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"source": [
"# Set up standard G^3 geometric algebra\n",
"g3coords = (x,y,z) = symbols('x y z', real=True) # Without real=True, symbols are complex\n",
"g3 = Ga('\\mathbf{e}', g=[1,1,1], coords=g3coords)\n",
"g3 = Ga(r'\\mathbf{e}', g=[1,1,1], coords=g3coords)\n",
"(ex, ey, ez) = g3.mv() # Program names of basis vectors.\n",
"(exr, eyr, ezr) = g3.mvr() # Program names of reciprocal basis vectors."
]
Expand Down
2 changes: 1 addition & 1 deletion examples/primer/h3.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"source": [
"h3coords = (x,y,z,e) = symbols('x y z e', real=True)\n",
"# h3 = Ga('e_x e_y e_z e_e', g=[1,1,1,1], coords=h3coords)\n",
"h3 = Ga('\\mathbf{e}', g=[1,1,1,1], coords=h3coords)\n",
"h3 = Ga(r'\\mathbf{e}', g=[1,1,1,1], coords=h3coords)\n",
"(ex,ey,ez,ee) = h3.mv()"
]
},
Expand Down
2 changes: 1 addition & 1 deletion examples/primer/primer.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@
}
],
"source": [
"gprint('\\grad = ', grad)"
"gprint(r'\\grad = ', grad)"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion examples/primer/sp2g3.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"\n",
"# g3: Base manifold.\n",
"g3coords = (x,y,z) = symbols('x y z', real=True) \n",
"g3 = Ga('\\mathbf{e}', g=[1,1,1], coords=g3coords)\n",
"g3 = Ga(r'\\mathbf{e}', g=[1,1,1], coords=g3coords)\n",
"(ex, ey, ez) = g3.mv()\n",
"\n",
"# sp2: Submanifold\n",
Expand Down
2 changes: 1 addition & 1 deletion examples/primer/spacetime.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"source": [
"txyz = (t, x, y, z) = symbols('t x y z', real=True)\n",
"stcoords = (t,x,y,z) = symbols('t x y z')\n",
"st = Ga('\\mathbf{e}', g=[1, -1, -1, -1], coords=stcoords)\n",
"st = Ga(r'\\mathbf{e}', g=[1, -1, -1, -1], coords=stcoords)\n",
"(et, ex, ey, ez) = st.mv()"
]
},
Expand Down
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
package_dir={'galgebra': 'galgebra'},
# Sympy 1.4 is needed for printing tests to pass, but 1.3 will still work
install_requires=['sympy'],
python_requires='>=3.6',
python_requires='>=3.10',
long_description=long_description,
long_description_content_type='text/markdown',
classifiers=[
Expand All @@ -33,10 +33,9 @@
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Topic :: Scientific/Engineering :: Mathematics',
'Topic :: Scientific/Engineering :: Physics',
],
Expand Down
4 changes: 2 additions & 2 deletions test/test_mv.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import distutils.version
from packaging.version import Version

import pytest
import sympy
Expand Down Expand Up @@ -204,7 +204,7 @@ def test_arithmetic(self):
lambda ga: 1,
lambda ga: ga.mv(sympy.S.One),
pytest.param(lambda ga: sympy.S.One, marks=pytest.mark.skipif(
distutils.version.LooseVersion(sympy.__version__) < "1.6",
Version(sympy.__version__) < Version("1.6"),
# until sympy/sympy@bec42df53cf2486d485065ddad1c31011a48bf3b
reason="Cannot override < and > on sympy.Expr"
))
Expand Down
Loading