From ca3b7cb3640774ff926344d0cd3fd49daed33538 Mon Sep 17 00:00:00 2001 From: Justin DuJardin Date: Wed, 29 Nov 2023 11:36:46 -0800 Subject: [PATCH 1/3] feat(ci): add python build matrix --- .github/workflows/main.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 38090bf..444d74e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,9 +13,17 @@ on: jobs: build: + strategy: + matrix: + os: [ubuntu-20.04] + python-version: [3.7, 3.8, 3.9, 3.10.6, 3.11] runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} - name: Setup Packages run: sh tools/setup.sh - name: Build Packages From a648e1f0811f51b9df97c692b012fd264a67ca52 Mon Sep 17 00:00:00 2001 From: Justin DuJardin Date: Wed, 29 Nov 2023 11:40:48 -0800 Subject: [PATCH 2/3] Add Python version check to setup.sh --- tools/setup.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/setup.sh b/tools/setup.sh index e993e8e..5db5798 100644 --- a/tools/setup.sh +++ b/tools/setup.sh @@ -1,6 +1,8 @@ #!/bin/bash set -e +python3 --version + # Make the virtualenv only if the folder doesn't exist DIR=.env if [ ! -d "${DIR}" ]; then From 9cc6c3913f8b2bc168d7f654f9eb2bf2b3baee5f Mon Sep 17 00:00:00 2001 From: Justin DuJardin Date: Wed, 29 Nov 2023 11:44:27 -0800 Subject: [PATCH 3/3] chore: use Union instead of | :sob: --- mathy_core/problems.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mathy_core/problems.py b/mathy_core/problems.py index e217764..43aaa58 100644 --- a/mathy_core/problems.py +++ b/mathy_core/problems.py @@ -25,7 +25,7 @@ @dataclass class MathyTermTemplate: variable: Optional[str] = None # the term variable - exponent: Optional[int | float] = None # the term exponent + exponent: Optional[Union[int, float]] = None # the term exponent def make(self) -> str: return mathy_term_string(