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

dev: Add simple pre-commit setup #445

Merged
merged 6 commits into from
Jun 1, 2023
Merged

Conversation

jjerphan
Copy link
Collaborator

Reference Issues/PRs

Addresses #146.
Follow-up of #431.

What does this implement/fix? Explain your changes.

This proposes setting up pre-commit hook using the pre-commit python project.

For now, only hooks for black and flake8 have been introduced to prevent failures of the CI.

Later, we can add other ones, such as the one for clang-formater (see #356).

Any other comments?

The code base needs to be adapted to pass the checks (see the TODO in setup.cfg).

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
Changes originates from black as invoked by:

    pre-commit run --all-files

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
@jjerphan jjerphan marked this pull request as ready for review May 31, 2023 16:43
Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
pyproject.toml Outdated Show resolved Hide resolved
setup.cfg Outdated Show resolved Hide resolved
Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

Co-authored-by: Alex Seaton <alex.seaton@man.com>
@jjerphan jjerphan merged commit ce33ed4 into master Jun 1, 2023
@jjerphan jjerphan deleted the dev/add-pre-commit-setup branch June 1, 2023 08:42
times.shape[0], s
)
"Inconsistent size of column values. times.shape[0]={} must match cv.shape[0] for all column values."
" actual={}".format(times.shape[0], s)
Copy link
Contributor

Choose a reason for hiding this comment

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

It is not clear if the .format would extend to strings on a separate line, would have preferred another level of brackets

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have opened #448 to make it clearer.

.pre-commit-config.yaml Show resolved Hide resolved
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