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] Update config black and pre-commit #3777

Merged
merged 5 commits into from Jun 27, 2023

Conversation

Remi-Gau
Copy link
Collaborator

@Remi-Gau Remi-Gau commented Jun 26, 2023

Relates to #2528

Changes proposed in this pull request:

  • update pre-commit and black config to run on all files except:
    • those involved in PRs
    • or those in part of the codebase that yet have to reformatted by black.

This results in very long "exclude" sections but brings us closer to the end goal of running black and pre-commit on everything: now we are at the stage of run on "everything minus those 100 files".

  • run pre-commit run -a to apply all hooks and check that no further change is done by running black .

following PRs will just gradually remove files from those exclude sections and re-apply black.

@Remi-Gau Remi-Gau marked this pull request as ready for review June 26, 2023 07:05
@Remi-Gau Remi-Gau changed the title [MAINT] Update config black [MAINT] Update config black and pre-commit Jun 26, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jun 26, 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 Jun 26, 2023

Codecov Report

Merging #3777 (2f0c1a7) into main (e6fc4f9) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #3777   +/-   ##
=======================================
  Coverage   91.65%   91.65%           
=======================================
  Files         139      139           
  Lines       16562    16562           
  Branches     3229     3229           
=======================================
  Hits        15180    15180           
  Misses       1379     1379           
  Partials        3        3           
Impacted Files Coverage Δ
nilearn/_utils/__init__.py 100.00% <100.00%> (ø)
nilearn/interfaces/__init__.py 100.00% <100.00%> (ø)
nilearn/interfaces/bids/__init__.py 100.00% <100.00%> (ø)
nilearn/interfaces/fmriprep/__init__.py 100.00% <100.00%> (ø)
nilearn/maskers/__init__.py 100.00% <100.00%> (ø)
nilearn/plotting/__init__.py 93.93% <100.00%> (ø)
nilearn/surface/__init__.py 100.00% <100.00%> (ø)

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

Copy link
Member

@bthirion bthirion left a comment

Choose a reason for hiding this comment

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

LGTM so far.

@Remi-Gau
Copy link
Collaborator Author

Note that all CI jobs are finished but the UI shows them as still running.

Not sure what happened on the azure python 3.11.

@Remi-Gau
Copy link
Collaborator Author

LGTM so far.

FYI @bthirion
I do not intend to reformat more files in this PR to avoid inflicting yet another 1000 lines long PR and y'all.

@bthirion
Copy link
Member

Sure. Do you undertsand the CI failures ?

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

@Remi-Gau
Copy link
Collaborator Author

Sure. Do you undertsand the CI failures ?

nope: trying to move to GH action only in #3780

Copy link
Member

@bthirion bthirion left a comment

Choose a reason for hiding this comment

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

LGTM.

@Remi-Gau
Copy link
Collaborator Author

OK I will merge this as I think it is pretty clear by now that the CI fails are not related to the content of the PR

@Remi-Gau Remi-Gau merged commit caa8da8 into nilearn:main Jun 27, 2023
23 of 28 checks passed
@Remi-Gau Remi-Gau deleted the config_black branch June 29, 2023 12:55
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