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

Add & apply pre-commit and lint job #658

Merged
merged 3 commits into from Apr 11, 2023
Merged

Add & apply pre-commit and lint job #658

merged 3 commits into from Apr 11, 2023

Conversation

jwodder
Copy link
Member

@jwodder jwodder commented Apr 10, 2023

No description provided.

@jwodder jwodder added tests Add or improve existing tests internal Changes only affect the internal API labels Apr 10, 2023
@jwodder jwodder force-pushed the lint branch 3 times, most recently from 3220491 to a1e2a90 Compare April 10, 2023 13:12
@jwodder jwodder marked this pull request as draft April 10, 2023 13:32
@codecov
Copy link

codecov bot commented Apr 10, 2023

Codecov Report

Patch coverage: 76.59% and project coverage change: -0.35 ⚠️

Comparison is base (0c3f14b) 81.57% compared to head (591d1a9) 81.22%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #658      +/-   ##
==========================================
- Coverage   81.57%   81.22%   -0.35%     
==========================================
  Files          43       43              
  Lines        3929     3925       -4     
==========================================
- Hits         3205     3188      -17     
- Misses        724      737      +13     
Impacted Files Coverage Δ
heudiconv/heuristics/banda-bids.py 2.63% <1.61%> (-2.21%) ⬇️
heudiconv/heuristics/cmrr_heuristic.py 3.63% <2.17%> (-1.73%) ⬇️
heudiconv/heuristics/example.py 4.22% <2.77%> (-1.34%) ⬇️
heudiconv/heuristics/uc_bids.py 6.89% <4.34%> (-3.11%) ⬇️
heudiconv/heuristics/bids_with_ses.py 5.12% <4.76%> (-2.19%) ⬇️
heudiconv/heuristics/multires_7Tbold.py 14.28% <13.63%> (-1.63%) ⬇️
heudiconv/heuristics/studyforrest_phase2.py 13.04% <22.22%> (-3.63%) ⬇️
heudiconv/cli/monitor.py 30.76% <29.03%> (-0.76%) ⬇️
heudiconv/tests/test_monitor.py 42.68% <46.66%> (-0.70%) ⬇️
heudiconv/external/dcmstack.py 29.41% <50.00%> (+4.41%) ⬆️
... and 33 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jwodder
Copy link
Member Author

jwodder commented Apr 10, 2023

@nipy/team-heudiconv Please review this PR and comment any desired configuration changes. I am using this as the base for several other PRs, so it would be good to get this PR processed quickly.

Copy link
Contributor

@asmacdo asmacdo left a comment

Choose a reason for hiding this comment

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

Looks good to me!

tox.ini Outdated Show resolved Hide resolved
hang-closing = False
unused-arguments-ignore-stub-functions = True
select = A,B,B902,C,E,E242,F,U100,W
ignore = A003,B005,E203,E262,E266,E501,W503
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick (shouldn't block merge)

IMO it's convenient to comment what these are.

@asmacdo
Copy link
Contributor

asmacdo commented Apr 10, 2023

IMHO, I prefer a linter job to a precommit hook. (I haven't used them extensively, so please correct me if I'm missing something.)

The reason is that I sometimes want to commit and push a WIP (for example, to commit where I am so I can switch branches to reproduce a bug) and I wouldn't want the linter failure to slow me down.

@jwodder
Copy link
Member Author

jwodder commented Apr 10, 2023

@asmacdo

The reason is that I sometimes want to commit and push a WIP (for example, to commit where I am so I can switch branches to reproduce a bug) and I wouldn't want the linter failure to slow me down.

That's what git commit's -n/--no-verify option is for.

sort_keys=False)
save_json(
participants_json,
OrderedDict(
Copy link
Member

Choose a reason for hiding this comment

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

note to myself -- we should get rid of them in order of regular dicts -- already ordered AFAIK to the degree necessary - should make this structure more sanely looking

Copy link
Member

@yarikoptic yarikoptic left a comment

Choose a reason for hiding this comment

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

Thank you! But wouldn't it cause you conflicts with the work you have done in #656? If not -- feel welcome to merge!

@jwodder
Copy link
Member Author

jwodder commented Apr 11, 2023

@yarikoptic It will cause conflicts, but that's only a problem for me.

@jwodder jwodder merged commit 012895d into master Apr 11, 2023
13 of 15 checks passed
@jwodder jwodder deleted the lint branch April 11, 2023 12:32
@github-actions
Copy link

github-actions bot commented May 8, 2023

🚀 PR was released in v0.13.0 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Changes only affect the internal API released tests Add or improve existing tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants