Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: add python 3.12 checks alongside 3.8 #1008

Merged
merged 2 commits into from
Mar 26, 2024

Conversation

DawoudSheraz
Copy link
Contributor

@DawoudSheraz DawoudSheraz commented Feb 23, 2024

For #1006

Description

  • Adds Python 3.12 checks in CI alongside 3.8
  • Fix make docs in 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 (#1008 (comment)). 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.

@DawoudSheraz
Copy link
Contributor Author

The docs build failure seems to be an old one #775 (comment). I will attempt a shot at fixing it.

@DawoudSheraz
Copy link
Contributor Author

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.

image

@DawoudSheraz DawoudSheraz force-pushed the dsheraz/py312 branch 2 times, most recently from eba31d4 to bb54353 Compare February 29, 2024 10:15
@DawoudSheraz DawoudSheraz mentioned this pull request Feb 29, 2024
2 tasks
@DawoudSheraz DawoudSheraz marked this pull request as ready for review February 29, 2024 10:18
Copy link
Contributor

@regisb regisb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove changelog entry and we are good to go.

@@ -0,0 +1 @@
- [Feature] Add Python 3.12 CI and `make docs` compatibility (by @DawoudSheraz)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI-only changes don't warrant a changelog.

Basically, to decide whether a change needs a changelog entry, we need to place ourselves in the position of the typical Tutor user: platform administrator or plugin developer. Whenever they upgrade, we expect that they have a look at the changelog entries. We don't want them to worry unnecessarily about changes that won't impact them. But we do want to highlight the features that they might want to use and the breaking changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok.

docs/conf.py Show resolved Hide resolved
Copy link
Contributor

@regisb regisb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@DawoudSheraz DawoudSheraz merged commit f84e621 into overhangio:master Mar 26, 2024
2 checks passed
@DawoudSheraz DawoudSheraz deleted the dsheraz/py312 branch March 26, 2024 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

2 participants