Skip to content

Commit

Permalink
Test types on 3.7 as well
Browse files Browse the repository at this point in the history
  • Loading branch information
MilesCranmer committed Dec 31, 2023
1 parent d821ca8 commit 9fd88bc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,10 @@ jobs:
shell: bash -l {0}
strategy:
matrix:
python-version: ['3.11']
python-version:
- '3.11'
- '3.7'
os: ['ubuntu-latest']

steps:
- uses: actions/checkout@v3
Expand All @@ -174,8 +177,15 @@ jobs:
- name: "Install PySR and all dependencies"
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install mypy jax jaxlib torch
python setup.py install
python -m pip install -r requirements.txt
python -m pip install mypy
python -m pip install .
- name: "Install additional dependencies"
run: python -m pip install jax jaxlib torch
if: ${{ matrix.python-version != '3.7' }}
- name: "Run mypy"
run: mypy --install-types --non-interactive pysr
run: python -m mypy --install-types --non-interactive pysr
if: ${{ matrix.python-version != '3.7' }}
- name: "Run compatible mypy"
run: python -m mypy --ignore-missing-imports pysr
if: ${{ matrix.python-version == '3.7' }}
2 changes: 1 addition & 1 deletion pysr/export_latex.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def sympy2latex(expr, prec=3, full_prec=True, **settings) -> str:
"""Convert sympy expression to LaTeX with custom precision."""
settings["full_prec"] = full_prec
printer = PreciseLatexPrinter(settings=settings, prec=prec)
return printer.doprint(expr)
return str(printer.doprint(expr))


def generate_table_environment(
Expand Down

0 comments on commit 9fd88bc

Please sign in to comment.