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

Support Python 3.11, 3.12 and 3.13 #205

Merged
merged 21 commits into from
Nov 22, 2023

Conversation

CasperWA
Copy link
Collaborator

@CasperWA CasperWA commented Nov 3, 2023

Validate python-version user inputs for callable workflows that installs and uses the local ci-cd package.

Add pyupgrade as a pre-commit hook with the --py37-plus argument.
Update configurations for pytest:

  • Remove current ignore warnings filters.
  • Make all warnings errors.
  • Add explicit coverage and print to terminal.

Update configurations for mypy: Use Python 3.7.


Note, this PR is labeled BLOCKING because a change in required status checks is required to merge this PR, leaving other PRs unable to succeed the list of required status checks until this has been merged.

Replace all ignored warnings with "error" to make all warnings errors.
This is validated only when the `ci-cd` package is installed and used,
and is validated against the Python versions it supports.
Add pyupgrade as a pre-commit hook with --py37-plus arg.
Run and upgrade all files accordingly.

Configure mypy to check typing expecting Python 3.7.
Instead of using env vars as ${{ env.XXX }}, use them as ${XXX} if found
in a bash "run" value segment.
Copy link

codecov bot commented Nov 3, 2023

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (bb54428) 79.95% compared to head (b115a89) 80.07%.

❗ Current head b115a89 differs from pull request most recent head 32060c4. Consider uploading reports for the commit 32060c4 to get more accurate results

Files Patch % Lines
ci_cd/tasks/docs_index.py 33.33% 2 Missing ⚠️
ci_cd/main.py 0.00% 1 Missing ⚠️
ci_cd/tasks/api_reference_docs.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #205      +/-   ##
==========================================
+ Coverage   79.95%   80.07%   +0.11%     
==========================================
  Files          12       12              
  Lines         828      838      +10     
==========================================
+ Hits          662      671       +9     
- Misses        166      167       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@CasperWA CasperWA changed the title Support Python 3.11 and 3.12 Support Python 3.11 and 3.12 and 3.13 Nov 3, 2023
@CasperWA CasperWA changed the title Support Python 3.11 and 3.12 and 3.13 Support Python 3.11, 3.12 and 3.13 Nov 3, 2023
Depending on the documentation framework, this ensures the minimum set
of packages are installed for building the documentation.
@CasperWA CasperWA requested a review from ajeklund November 6, 2023 10:06
@CasperWA CasperWA linked an issue Nov 6, 2023 that may be closed by this pull request
Update pyupgrade hook accordingly.
@CasperWA CasperWA added the BLOCKING Issue or PR blocks further development label Nov 6, 2023
@CasperWA CasperWA requested review from daniel-sintef and removed request for ajeklund November 9, 2023 07:14
@CasperWA CasperWA requested a review from ajeklund November 13, 2023 11:41
Copy link
Contributor

@ajeklund ajeklund left a comment

Choose a reason for hiding this comment

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

I added a couple of questions; several about what seems to be historically non-tested code.

.github/workflows/ci_tests.yml Show resolved Hide resolved
ci_cd/main.py Show resolved Hide resolved
ci_cd/tasks/update_deps.py Outdated Show resolved Hide resolved
ci_cd/tasks/api_reference_docs.py Show resolved Hide resolved
pyproject.toml Show resolved Hide resolved
ci_cd/tasks/docs_index.py Show resolved Hide resolved
ci_cd/tasks/docs_index.py Show resolved Hide resolved
@CasperWA CasperWA requested a review from ajeklund November 22, 2023 10:21
Copy link
Contributor

@ajeklund ajeklund left a comment

Choose a reason for hiding this comment

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

Great, thanks a lot!

@CasperWA CasperWA merged commit dc78405 into main Nov 22, 2023
22 checks passed
@CasperWA CasperWA deleted the cwa/python-version-support-implementation branch November 22, 2023 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BLOCKING Issue or PR blocks further development
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support all newer Python versions
2 participants