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] Use prettier to format HTML and CSS #4302

Merged
merged 7 commits into from Mar 18, 2024
Merged

Conversation

Remi-Gau
Copy link
Collaborator

@Remi-Gau Remi-Gau commented Mar 1, 2024

Changes proposed in this pull request:

  • add prettier hook to pre-commit config
  • run the hook on the code and doc base
  • add github action to check formating

@Remi-Gau Remi-Gau marked this pull request as draft March 1, 2024 08:24
Copy link
Contributor

github-actions bot commented Mar 1, 2024

👋 @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 Remi-Gau added Code quality This issue tackles code quality (code refactoring, PEP8...). Blocked labels Mar 1, 2024
@Remi-Gau
Copy link
Collaborator Author

Remi-Gau commented Mar 1, 2024

This is just a preview to see how much auto-formatting of the HTML and CSS can be done.

@Remi-Gau
Copy link
Collaborator Author

Remi-Gau commented Mar 1, 2024

If we agree this is a good idea to have:

  • mention it in the doc style guide section
  • update README description CI actions

Copy link

codecov bot commented Mar 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.94%. Comparing base (abb80ff) to head (c2af15b).
Report is 28 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4302      +/-   ##
==========================================
+ Coverage   91.85%   91.94%   +0.08%     
==========================================
  Files         144      143       -1     
  Lines       16419    16452      +33     
  Branches     3434     3451      +17     
==========================================
+ Hits        15082    15126      +44     
+ Misses        792      780      -12     
- Partials      545      546       +1     
Flag Coverage Δ
macos-latest_3.10_test_plotting 91.92% <ø> (?)
macos-latest_3.11_test_plotting ?
ubuntu-latest_3.10_test_plotting ?
ubuntu-latest_3.12_test_pre 91.92% <ø> (?)
windows-latest_3.8_test_plotting 91.86% <ø> (?)

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

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

@Remi-Gau Remi-Gau removed the Blocked label Mar 4, 2024
@Remi-Gau Remi-Gau marked this pull request as ready for review March 4, 2024 09:59
@Remi-Gau Remi-Gau changed the title [WIP][MAINT] Use prettier to format HTML and CSS [MAINT] Use prettier to format HTML and CSS Mar 4, 2024
@Remi-Gau Remi-Gau requested a review from bthirion March 4, 2024 14:10
@Remi-Gau
Copy link
Collaborator Author

Remi-Gau commented Mar 4, 2024

numpy2 issue is unrelated: see #4309

other tests should be fixed by #4306

@bthirion
Copy link
Member

bthirion commented Mar 4, 2024

I'd be in favor of merging #4306 and #4309 first.
But, again, I'd like to see the reports generated...

@Remi-Gau
Copy link
Collaborator Author

Remi-Gau commented Mar 5, 2024

I'd be in favor of merging #4306 and #4309 first. But, again, I'd like to see the reports generated...

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. Certainly deserves a whatwnew entry.

@Remi-Gau
Copy link
Collaborator Author

LGTM. Certainly deserves a whatwnew entry.

That's fair.

Will fix the merge conflicts and update the changelog.

=== Do not change lines below ===
{
 "chain": [],
 "cmd": "pre-commit run -a",
 "exit": 1,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^
@Remi-Gau Remi-Gau merged commit 681ed4f into nilearn:main Mar 18, 2024
32 of 33 checks passed
@Remi-Gau Remi-Gau deleted the prettier branch March 18, 2024 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code quality This issue tackles code quality (code refactoring, PEP8...).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants