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] Make black CI more verbose #4008

Merged
merged 3 commits into from Sep 26, 2023
Merged

[MAINT] Make black CI more verbose #4008

merged 3 commits into from Sep 26, 2023

Conversation

Remi-Gau
Copy link
Collaborator

@Remi-Gau Remi-Gau commented Sep 25, 2023

Changes proposed in this pull request:

  • use --diff when running black in CI to show what changes would have been made

@github-actions
Copy link
Contributor

👋 @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.

@Remi-Gau
Copy link
Collaborator Author

output example:

  black --check --diff --color .
  shell: /usr/bin/bash -e {0}
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.11.5/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.11.5/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.5/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.5/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.5/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.11.5/x64/lib
--- /home/runner/work/nilearn/nilearn/nilearn/plotting/img_plotting.py	2023-09-25 09:32:05.952337+00:00
+++ /home/runner/work/nilearn/nilearn/nilearn/plotting/img_plotting.py	2023-09-25 09:32:14.617086+00:00
@@ -50,21 +50,25 @@
     This function is equivalent to :func:`matplotlib.pyplot.show`,
     but is skipped on the 'Agg' backend where it has no effect other
     than to emit a warning.
 
     """
would reformat /home/runner/work/nilearn/nilearn/nilearn/plotting/img_plotting.py
-    if matplotlib.get_backend().lower() != 'agg':  # avoid warnings
+    if matplotlib.get_backend().lower() != "agg":  # avoid warnings
         plt.show()
 

@Remi-Gau Remi-Gau marked this pull request as ready for review September 25, 2023 09:37
@codecov
Copy link

codecov bot commented Sep 25, 2023

Codecov Report

Merging #4008 (0b62489) into main (5674c3e) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #4008   +/-   ##
=======================================
  Coverage   91.77%   91.77%           
=======================================
  Files         134      134           
  Lines       15795    15795           
  Branches     3299     3299           
=======================================
  Hits        14496    14496           
  Misses        755      755           
  Partials      544      544           
Flag Coverage Δ
macos-latest_3.10 91.69% <ø> (ø)
macos-latest_3.11 ?
macos-latest_3.8 91.65% <ø> (ø)
macos-latest_3.9 91.65% <ø> (ø)
ubuntu-latest_3.10 ?
ubuntu-latest_3.11 91.69% <ø> (ø)
ubuntu-latest_3.8 ?
ubuntu-latest_3.9 ?
windows-latest_3.10 91.63% <ø> (ø)
windows-latest_3.11 ?
windows-latest_3.8 91.59% <ø> (ø)
windows-latest_3.9 91.60% <ø> (ø)

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

📣 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, thx.

@Remi-Gau Remi-Gau merged commit 0d39ce2 into nilearn:main Sep 26, 2023
29 checks passed
@Remi-Gau Remi-Gau deleted the black_ci branch November 9, 2023 09:42
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

2 participants