build: add python 3.12 checks alongside 3.8
For #1006
Description
- Adds Python 3.12 checks in CI alongside 3.8
- Fix
make docsin Python 3.12
make docs in Python 3.12 was failing for various reasons for variety of items (Action, Filter, FilterCallbackFunc). Mainly, the generic type does not get translated to py:class and is instead picked up as py:data. There were a few issues on Sphinx and some related items on Stackoverflow. Everyone handled it differently in some capacity. One suggestion was to ignore some of the type params but it did not result in docs building as expected (https://github.com/overhangio/tutor/pull/1008#issuecomment-1968906467). The appropriate fix for "Action & Filter" was to add entries in autodoc_type_aliases. FilterCallbackFunc was needed to be ignore because it does not translate to a py:class.
The docs build failure seems to be an old one https://github.com/overhangio/tutor/pull/775#issuecomment-1405208608. I will attempt a shot at fixing it.
The docs build issue mainly happens because Sphinx is not able to correctly identify type params. It tends to translate each param variation into a separate py:class entity, thus leading into errors when running in nitpick mode. One of the ways was to ignore the patterns via nitpick_ignore_regex but it resulted in docs not building as expected.
- https://docs.plasmapy.org/en/stable/contributing/doc_guide.html#reference-target-not-found
- https://github.com/sphinx-doc/sphinx/issues/10974
- https://github.com/sphinx-doc/sphinx/issues/10785