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] Run black, isort, ruff, and other auto-linters on entire package #159

Merged
merged 13 commits into from
Dec 6, 2023

Conversation

adam2392
Copy link
Member

@adam2392 adam2392 commented Nov 29, 2023

Thanks for contributing. If this is your first time,
make sure to read contributing.md

PR Description

  • runs isort and black formatters

Merge checklist

Maintainer, please confirm the following before merging:

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

@larsoner
Copy link
Member

Nowadays in MNE-Python we use pre-commit.ci + .pre-commit-config.yaml to do most style stuff.

For git history it would be best to split this PR into two -- one that runs black and isort and makes yamllint changes with whatever settings you want, and you squash+merge that.

Then in a (much smaller!) follow-up PR you add that commit hash to a new .git-blame-ignore-revs and adjust CIs. Then git blame should be correct on everything.

@adam2392
Copy link
Member Author

Okay, I'll do all the yaml/toml stuff first in one go, since those are just extra files and then do the whole package black/ruff/isort as you suggest?

@larsoner
Copy link
Member

Sure that would work

Signed-off-by: Adam Li <[email protected]>
Signed-off-by: Adam Li <[email protected]>
Signed-off-by: Adam Li <[email protected]>
Signed-off-by: Adam Li <[email protected]>
Signed-off-by: Adam Li <[email protected]>
@adam2392
Copy link
Member Author

adam2392 commented Dec 6, 2023

@larsoner do I update the git-blame file after I merge this PR?

@adam2392 adam2392 changed the title [MAINT] Repackage with pyproject.toml for release [MAINT] Run black, isort, ruff, and other auto-linters on entire package Dec 6, 2023
Signed-off-by: Adam Li <[email protected]>
Signed-off-by: Adam Li <[email protected]>
@larsoner larsoner merged commit 0c216d3 into mne-tools:main Dec 6, 2023
9 checks passed
@larsoner
Copy link
Member

larsoner commented Dec 6, 2023

Yep, add 0c216d35127f48792caabdc3cca170874a443eee to .git-blame-revs-ignore and your blame on GitHub and properly configured local gits should work

@adam2392 adam2392 deleted the pkg branch December 6, 2023 17:13
@adam2392
Copy link
Member Author

adam2392 commented Dec 6, 2023

Kay done with the last commit to main

tsbinns pushed a commit to tsbinns/mne-connectivity that referenced this pull request Dec 15, 2023
…age (mne-tools#159)

* Repackage with pyrpoject.toml

Signed-off-by: Adam Li <[email protected]>

* Fix CIs

Signed-off-by: Adam Li <[email protected]>

* Add version

Signed-off-by: Adam Li <[email protected]>

* Try to fix ci again

Signed-off-by: Adam Li <[email protected]>

* Fix the pyproject toml and otehr files

Signed-off-by: Adam Li <[email protected]>

* Fix circleCI and style

Signed-off-by: Adam Li <[email protected]>

* Fix statsmodels install

Signed-off-by: Adam Li <[email protected]>

* Run precommit

Signed-off-by: Adam Li <[email protected]>

* Ran black and isort and ruff

Signed-off-by: Adam Li <[email protected]>

* Sort pyrpoject

Signed-off-by: Adam Li <[email protected]>

* Fix

Signed-off-by: Adam Li <[email protected]>

* Don't need to test install

Signed-off-by: Adam Li <[email protected]>

---------

Signed-off-by: Adam Li <[email protected]>
larsoner added a commit to larsoner/mne-connectivity that referenced this pull request Jan 9, 2024
* upstream/main: (56 commits)
  [CI] Fix CIs (mne-tools#164)
  Fix azure
  Fix CIs
  New dev for v0.7
  [RELEASE] V0.6 (mne-tools#162)
  Try azure again
  [CI] Fix azure (mne-tools#161)
  Add gitblame
  [MAINT] Run black, isort, ruff, and other auto-linters on entire package (mne-tools#159)
  [MAINT] Replace setup.py with pyproject.toml (mne-tools#160)
  [BUG] Fixed issue w/ different rank-indices length (mne-tools#158)
  [MAINT] Refactor bivariate and multivariate methods into separate files (mne-tools#156)
  [MAINT] Fix failing unit tests & update CI packages (mne-tools#157)
  fixed grammar mistake
  switched to array indices & added inline comments
  updated default non-zero rank tolerance
  removed redundant list creation
  removed redundant ignored word
  switched to masked indices for multivariate conn
  updated time
  ...
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.

2 participants