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 more pre-commit checks #1848

Merged
merged 5 commits into from
May 26, 2021
Merged

Add more pre-commit checks #1848

merged 5 commits into from
May 26, 2021

Conversation

Zethson
Copy link
Member

@Zethson Zethson commented May 21, 2021

Hey,

finally solves #1563

I added:

    -   id: trailing-whitespace
    -   id: end-of-file-fixer
    -   id: check-added-large-files
    -   id: check-case-conflict
    -   id: check-toml
    -   id: check-yaml
    -   id: check-merge-conflict
    -   id: detect-private-key

They are super super fast, so speed is not a concern.

Signed-off-by: zethson lukas.heumos@posteo.net

Signed-off-by: zethson <lukas.heumos@posteo.net>
@codecov
Copy link

codecov bot commented May 21, 2021

Codecov Report

Merging #1848 (547c422) into master (bcfa925) will increase coverage by 0.00%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1848   +/-   ##
=======================================
  Coverage   71.21%   71.22%           
=======================================
  Files          92       92           
  Lines       11181    11181           
=======================================
+ Hits         7963     7964    +1     
+ Misses       3218     3217    -1     
Impacted Files Coverage Δ
scanpy/preprocessing/_simple.py 80.14% <0.00%> (ø)
scanpy/plotting/_dotplot.py 87.16% <0.00%> (+0.37%) ⬆️

@Zethson Zethson requested a review from ivirshup May 21, 2021 08:10
Copy link
Member

@ivirshup ivirshup left a comment

Choose a reason for hiding this comment

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

Only thing that needs to change is the added large file.

Could you try building the docs and checking if anything gets added? The scanpy.plotting.rst file has been weird in the past. I think it's at least started being consistent with newer versions of sphinx, but it'd be good to check.

I would like it if the yaml and toml checks would also do formatting, but up to you on including that.

.pre-commit-config.yaml Outdated Show resolved Hide resolved
Signed-off-by: zethson <lukas.heumos@posteo.net>
@Zethson
Copy link
Member Author

Zethson commented May 25, 2021

Could you try building the docs and checking if anything gets added? The scanpy.plotting.rst file has been weird in the past. I think it's at least started being consistent with newer versions of sphinx, but it'd be good to check.

The pbmc data in the docs folder does indeed get downloaded when building the docs.
Do you want me to include this path into the .gitignore?

@ivirshup
Copy link
Member

Do you want me to include this path into the .gitignore?

👍

Signed-off-by: zethson <lukas.heumos@posteo.net>
@Zethson
Copy link
Member Author

Zethson commented May 26, 2021

Do you want me to include this path into the .gitignore?

+1

Done.

@ivirshup
Copy link
Member

One last thing, could you exclude the test data files from any automatic formatting? I guess it's good to know that new lines at the end of files doesn't matter, but I'd prefer to keep those files exactly as they were written by spaceranger/ zarr.

Signed-off-by: zethson <lukas.heumos@posteo.net>
@Zethson
Copy link
Member Author

Zethson commented May 26, 2021

@ivirshup

exclude: scanpy/tests/_data

Added for trailing-whitespace and end-of-file-fixer.

@ivirshup
Copy link
Member

Do revert the changes those made as well please!

Signed-off-by: zethson <lukas.heumos@posteo.net>
@Zethson
Copy link
Member Author

Zethson commented May 26, 2021

@ivirshup Done.

@ivirshup
Copy link
Member

Great, thanks

@ivirshup ivirshup merged commit 4dd8de9 into master May 26, 2021
@Zethson Zethson deleted the feature/pre-commit branch April 5, 2022 20:15
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