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

MEG: Add git pre-commit configuration #1173

Merged
merged 19 commits into from
Sep 30, 2023

Conversation

hoechenberger
Copy link
Member

I copied MNE's pre-commit config

Once merged, we can enable pre-commit CI, https://pre-commit.ci

Merge checklist

Maintainer, please confirm the following before merging.
If applicable:

  • All comments are resolved
  • This is not your own PR
  • All CIs are happy
  • PR title starts with [MRG]
  • whats_new.rst is updated
  • New contributors have been added to CITATION.cff
  • PR description includes phrase "closes <#issue-number>"

@hoechenberger hoechenberger marked this pull request as ready for review September 26, 2023 19:31
@hoechenberger hoechenberger marked this pull request as draft September 26, 2023 19:34
@codecov
Copy link

codecov bot commented Sep 26, 2023

Codecov Report

Merging #1173 (078819b) into main (51d0da3) will decrease coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1173      +/-   ##
==========================================
- Coverage   97.63%   97.63%   -0.01%     
==========================================
  Files          40       40              
  Lines        8662     8661       -1     
==========================================
- Hits         8457     8456       -1     
  Misses        205      205              
Files Coverage Δ
mne_bids/path.py 97.38% <ø> (ø)
mne_bids/tests/test_dig.py 100.00% <ø> (ø)
mne_bids/tests/test_path.py 99.85% <ø> (ø)
mne_bids/tests/test_read.py 99.71% <ø> (ø)
mne_bids/utils.py 94.92% <ø> (ø)

Copy link
Member

@larsoner larsoner left a comment

Choose a reason for hiding this comment

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

I enabled the GitHub app so if you close this PR and open another it might show up

.pre-commit-config.yaml Outdated Show resolved Hide resolved
.pre-commit-config.yaml Outdated Show resolved Hide resolved
.pre-commit-config.yaml Outdated Show resolved Hide resolved
@hoechenberger
Copy link
Member Author

I enabled the GitHub app so if you close this PR and open another it might show up

Cool, thanks!

@hoechenberger
Copy link
Member Author

Oh the pre-commit CI bot is already here :)

@hoechenberger hoechenberger marked this pull request as ready for review September 26, 2023 20:12
@hoechenberger
Copy link
Member Author

I removed yamllint and codespell for now, we can add them later

@hoechenberger
Copy link
Member Author

hoechenberger commented Sep 27, 2023

I would say this is ready to go.

In follow-up PRs we should

  • Drop flake8
  • Add yamllint
  • Add codespell
  • Move from setup.cfg to pyproject.toml, which was added in this PR
  • Update the dev docs to mention how to use git pre-commit

@hoechenberger hoechenberger changed the title Add git pre-commit configuration MEG: Add git pre-commit configuration Sep 27, 2023
Copy link
Member

@sappelhoff sappelhoff left a comment

Choose a reason for hiding this comment

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

Thanks! could you also add some instructions on the pre-commit hooks to the dev documentation, please?

@hoechenberger
Copy link
Member Author

@sappelhoff Happy? :)

Copy link
Member

@sappelhoff sappelhoff left a comment

Choose a reason for hiding this comment

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

thanks Richard!

@hoechenberger hoechenberger merged commit 8b8e4b9 into mne-tools:main Sep 30, 2023
14 of 15 checks passed
@hoechenberger hoechenberger deleted the pre-commit branch September 30, 2023 16:19
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.

3 participants