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

pre-commit config #90

Merged
merged 9 commits into from
May 3, 2022
Merged

pre-commit config #90

merged 9 commits into from
May 3, 2022

Conversation

zmoon
Copy link
Contributor

@zmoon zmoon commented Mar 28, 2022

Based on xgcm's config but adding pyupgrade and facilitating the current longer line-length setting.

from xgcm but quoting the versions
based on xgcm but adding line-length for black to match
current xmovie flake8 setting
@zmoon
Copy link
Contributor Author

zmoon commented Mar 28, 2022

@jbusecke I wanted to see what you thought of this config before I apply it. Also wait for #73 to be merged I suppose.

@codecov
Copy link

codecov bot commented Mar 28, 2022

Codecov Report

Merging #90 (60ae494) into master (7886817) will decrease coverage by 0.13%.
The diff coverage is 95.83%.

@@            Coverage Diff             @@
##           master      #90      +/-   ##
==========================================
- Coverage   78.65%   78.52%   -0.14%     
==========================================
  Files           3        3              
  Lines         328      326       -2     
  Branches       61       61              
==========================================
- Hits          258      256       -2     
  Misses         46       46              
  Partials       24       24              
Flag Coverage Δ
unittests 78.22% <95.83%> (-0.14%) ⬇️

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

Impacted Files Coverage Δ
setup.py 0.00% <ø> (ø)
xmovie/core.py 85.12% <94.11%> (-0.16%) ⬇️
xmovie/presets.py 69.76% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7886817...60ae494. Read the comment docs.

@jbusecke
Copy link
Owner

jbusecke commented May 3, 2022

Hey @zmoon for this to work in the 'old way' you would have had to add a github workflow file, but I have started switching repos over to the pre-commit service. This is convenient since it does make linting corrections automatically!
Should we add this as part of this PR? If you agree, I would suggest to keep the line length as is (the bot should fix the code!), and I can activate the service.

@jbusecke
Copy link
Owner

jbusecke commented May 3, 2022

I just activated the service just in case. We should also add

[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/jbusecke/xmovie/master.svg)](https://results.pre-commit.ci/latest/github/jbusecke/xmovie/master)

to the README (I just tried to make a PR on your PR, but it didnt work for some reason).

@jbusecke
Copy link
Owner

jbusecke commented May 3, 2022

I also think we can put this PR in front of #73, which might need some more iterations.

@zmoon
Copy link
Contributor Author

zmoon commented May 3, 2022

the pre-commit service

Great, pre-commit ci is very nice. We should still do a pre-commit run --all-files here or later though.

tried to make a PR on your PR

You should be able to checkout my PR and commit. I can do it though.

@zmoon
Copy link
Contributor Author

zmoon commented May 3, 2022

I'm going to start resolving the failed checks here.

@zmoon zmoon marked this pull request as ready for review May 3, 2022 15:29
xmovie/core.py Outdated Show resolved Hide resolved
Co-authored-by: Zachary Moon <zmoon92@gmail.com>
@jbusecke jbusecke merged commit 86e43d0 into jbusecke:master May 3, 2022
@zmoon zmoon deleted the pre-commit branch May 3, 2022 22:33
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