Skip to content

Commit

Permalink
build: add python 3.12 checks alongside 3.8 (overhangio#1008)
Browse files Browse the repository at this point in the history
* build: add python 3.12 checks alongside 3.8

* docs: Py312 docs build
  • Loading branch information
DawoudSheraz authored Mar 26, 2024
1 parent 0e37449 commit f84e621
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@ on:
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.12']
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: requirements/dev.txt
- name: Upgrade pip
Expand Down
11 changes: 11 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,24 @@
# python 3.10
("py:class", "NoneType"),
("py:class", "click.core.Command"),
# Python 3.12
("py:class", "FilterCallbackFunc"),
]
# Resolve type aliases here
# https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#confval-autodoc_type_aliases
autodoc_type_aliases: dict[str, str] = {
# python 3.10
"T": "tutor.core.hooks.actions.T",
"T2": "tutor.core.hooks.filters.T2",
# # python 3.12
"L": "tutor.core.hooks.filters.L",
"FilterCallbackFunc": "tutor.core.hooks.filters.FilterCallbackFunc",
# https://stackoverflow.com/questions/73223417/type-aliases-in-type-hints-are-not-preserved
# https://github.com/sphinx-doc/sphinx/issues/10455
# https://github.com/sphinx-doc/sphinx/issues/10785
# https://github.com/emdgroup/baybe/pull/67
"Action": "tutor.core.hooks.actions.Action",
"Filter": "tutor.core.hooks.filters.Filter",
}


Expand Down

0 comments on commit f84e621

Please sign in to comment.