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

[MAINT] Add python 3.12 to CI #4023

Merged
merged 8 commits into from Oct 5, 2023
Merged

[MAINT] Add python 3.12 to CI #4023

merged 8 commits into from Oct 5, 2023

Conversation

Remi-Gau
Copy link
Collaborator

@Remi-Gau Remi-Gau commented Oct 1, 2023

Changes proposed in this pull request:

  • use python 3.12 in CI

@github-actions
Copy link
Contributor

github-actions bot commented Oct 1, 2023

👋 @Remi-Gau Thanks for creating a PR!

Until this PR is ready for review, you can include the [WIP] tag in its title, or leave it as a github draft.

Please make sure it is compliant with our contributing guidelines. In particular, be sure it checks the boxes listed below.

  • PR has an interpretable title.
  • PR links to Github issue with mention Closes #XXXX (see our documentation on PR structure)
  • Code is PEP8-compliant (see our documentation on coding style)
  • Changelog or what's new entry in doc/changes/latest.rst (see our documentation on PR structure)

For new features:

  • There is at least one unit test per new function / class (see our documentation on testing)
  • The new feature is demoed in at least one relevant example.

For bug fixes:

  • There is at least one test that would fail under the original bug conditions.

We will review it as quick as possible, feel free to ping us with questions if needed.

@codecov
Copy link

codecov bot commented Oct 1, 2023

Codecov Report

Merging #4023 (27ef1c6) into main (b3385c5) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #4023   +/-   ##
=======================================
  Coverage   91.73%   91.73%           
=======================================
  Files         145      145           
  Lines       16230    16230           
  Branches     3367     3367           
=======================================
  Hits        14888    14888           
  Misses        797      797           
  Partials      545      545           
Flag Coverage Δ
macos-latest_3.10 91.65% <ø> (?)
macos-latest_3.11 91.65% <ø> (ø)
macos-latest_3.12 91.65% <ø> (?)
macos-latest_3.8 91.61% <ø> (ø)
macos-latest_3.9 ?
ubuntu-latest_3.10 91.65% <ø> (ø)
ubuntu-latest_3.11 91.65% <ø> (ø)
ubuntu-latest_3.12 91.65% <ø> (?)
ubuntu-latest_3.8 91.61% <ø> (ø)
ubuntu-latest_3.9 91.61% <ø> (ø)
windows-latest_3.10 91.59% <ø> (ø)
windows-latest_3.11 91.59% <ø> (ø)
windows-latest_3.12 91.59% <ø> (?)
windows-latest_3.8 91.55% <ø> (ø)
windows-latest_3.9 91.56% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
nilearn/decoding/decoder.py 96.92% <ø> (ø)
...n/interfaces/fmriprep/tests/test_load_confounds.py 98.40% <ø> (ø)
nilearn/surface/surface.py 96.56% <ø> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Remi-Gau Remi-Gau marked this pull request as ready for review October 4, 2023 07:55
@Remi-Gau Remi-Gau requested a review from ymzayek October 4, 2023 07:55
Copy link
Member

@ymzayek ymzayek left a comment

Choose a reason for hiding this comment

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

LGTM! Python 3.12 was just released so shouldn't remove the allow-prereleases parameter to make sure we're always testing on stable 3.12 releases?

@@ -29,7 +29,8 @@ jobs:
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.11'
Copy link
Member

Choose a reason for hiding this comment

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

I haven't looked closely at the flake8 failures related to 3.12 but at some point we'll need to handle these. Perhaps put in a separate issue

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

agreed

they are not massive:

./examples/02_decoding/plot_haxby_grid_search.py:127:18: E226 missing whitespace around arithmetic operator
./nilearn/decoding/decoder.py:254:28: E201 whitespace after '{'
./nilearn/decoding/decoder.py:254:40: E231 missing whitespace after ':'
./nilearn/decoding/decoder.py:254:56: E202 whitespace before '}'
./nilearn/interfaces/fmriprep/tests/test_load_confounds.py:583:54: E226 missing whitespace around arithmetic operator
./nilearn/surface/surface.py:961:48: E201 whitespace after '{'

strangely though they are not "just" handled by black

Copy link
Member

Choose a reason for hiding this comment

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

Ok maybe just manually handle here and update this workflow to 3.12?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

will try

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

OK I think this is related to the fact that f strings got upgraded in 3.12 and that you can have even more python code in them so code formatting rules will now start applying inside f strings too.

@Remi-Gau
Copy link
Collaborator Author

Remi-Gau commented Oct 4, 2023

shouldn't remove the allow-prereleases parameter to make sure we're always testing on stable 3.12 releases

yeah why not

@@ -43,7 +43,8 @@ jobs:
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: 3.11
python-version: '3.12'
allow-prereleases: false
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

set the pre-release to false, eventhough it is the default I feel it can be nice to keep it around for when we want to start checking new python pre-release

@bthirion
Copy link
Member

bthirion commented Oct 4, 2023

This looks good, then ?

@Remi-Gau
Copy link
Collaborator Author

Remi-Gau commented Oct 5, 2023

This looks good, then ?

Yup. Merging

@Remi-Gau Remi-Gau merged commit f7d83a6 into nilearn:main Oct 5, 2023
32 checks passed
@Remi-Gau Remi-Gau deleted the py3.12 branch November 9, 2023 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants