Repository: dh-tech/undate-python (language: python)

Issue:
support and test multiple versions of python
see discussion about versions on #11 — proposed minimum version 3.8

- [x] configure CI to use a matrix build and run against supported versions of python
- [x] document supported versions of python in readme and setup.py

Convert setup.py to new recommended format of setup.cfg + pyproject.toml
> Any reason to use `setup.py` vs `setup.cfg` + `pyproject.toml`? Think I've usually followed a structure somewhat like this for packages I think will be distributed: https://setuptools.pypa.io/en/latest/userguide/declarative_config.html.

_Originally posted by @ColeDCrawford in https://github.com/dh-tech/hackathon-2022/pull/27#discussion_r1019276580_
      


Discussion / hints:

Fix patch:
diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml
new file mode 100644
index 0000000..c5bdf24
--- /dev/null
+++ b/.github/workflows/check.yml
@@ -0,0 +1,26 @@
+name: style check
+
+on:
+  pull_request:
+
+jobs:
+  check:
+    runs-on: ubuntu-latest
+
+    defaults:
+      run:
+        working-directory: .
+
+    steps:
+      - uses: actions/checkout@v3
+      - name: Set up Python 3.9
+        uses: actions/setup-python@v4
+        with:
+          python-version: 3.9
+          cache: 'pip'
+          cache-dependency-path: '**/setup.py'
+      - name: Install package with dependencies
+        run: pip install -e ".[dev]"
+        if: steps.python-cache.outputs.cache-hit != 'true'
+      - name: Run black
+        run: black undate --check --diff
diff --git a/README.md b/README.md
index 4157fb3..c26d0d1 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,9 @@
 
 Repository for the DHTech 2022 Hackathon
 
+[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
+[![unit tests](https://github.com/dh-tech/hackathon-2022/actions/workflows/unit_tests.yml/badge.svg)](https://github.com/dh-tech/hackathon-2022/actions/workflows/unit_tests.yml)
+[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
 
 ## License
 
diff --git a/setup.py b/setup.py
index f8b8c0c..f714111 100644
--- a/setup.py
+++ b/setup.py
@@ -41,6 +41,8 @@
         "Programming Language :: Python :: 3",
         "Programming Language :: Python :: 3.8",
         "Programming Language :: Python :: 3.9",
+        "Programming Language :: Python :: 3.10",
+        "Programming Language :: Python :: 3.11",
         "Topic :: Software Development :: Libraries :: Python Modules",
         "Topic :: Utilities",
         "Typing :: Typed",


Test patch:
diff --git a/.github/workflows/ci.yml b/.github/workflows/unit_tests.yml
similarity index 79%
rename from .github/workflows/ci.yml
rename to .github/workflows/unit_tests.yml
index 063b996..35ec10f 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/unit_tests.yml
@@ -1,4 +1,4 @@
-name: CI
+name: unit tests
 
 on:
   push:
@@ -10,8 +10,11 @@ on:
   pull_request:
 
 jobs:
-  qa:
+  python-unit:
     runs-on: ubuntu-latest
+    strategy:
+      matrix:
+        python: ["3.8", "3.9", "3.10", "3.11"]
     defaults:
       run:
         working-directory: .
@@ -21,13 +24,11 @@ jobs:
       - name: Set up Python 3.9
         uses: actions/setup-python@v4
         with:
-          python-version: 3.9
+          python-version: ${{ matrix.python }}
           cache: 'pip'
           cache-dependency-path: '**/setup.py'
       - name: Install package with dependencies
         run: pip install -e ".[dev]"
         if: steps.python-cache.outputs.cache-hit != 'true'
-      - name: Run black
-        run: black undate --check --diff
       - name: Run unit tests
         run: pytest