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, linting, and type hints #13

Merged
merged 6 commits into from
May 31, 2021

Conversation

sondrelg
Copy link
Contributor

@sondrelg sondrelg commented May 30, 2021

Hi @jerry-git 🙂

I'm going to sit down and have a go at writing the implementation suggested in #11 to see if it works.

I noticed that there was a pre-commit config in the project but that it maybe wasn't fully functional, so I've updated it (let me know if you prefer to remove some of the hooks I've added), run it on the project, and added type hints to the project. Hope that's something you want.

Opening this as an initial PR so it doesn't affect the diff for the next PR(s) 🙂

If you want, I could also add a linting workflow and/or test workflow to the project to run on pull-requests

setup.cfg Outdated Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
@jerry-git
Copy link
Owner

If you want, I could also add a linting workflow and/or test workflow to the project to run on pull-requests

Sure that would be nice. And it would be actually great if GHA would be used for all the CI related activities.

@sondrelg sondrelg force-pushed the pre-commit branch 4 times, most recently from 2f669cb to a8af98b Compare May 31, 2021 07:07
run: pip install -e .
- name: Run tests
run: |
pytest --cov=pytest_diff --verbose --assert=plain
Copy link
Owner

Choose a reason for hiding this comment

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

Aren't we now running the tests with both Travis and GHA?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've never used Travis. How is that configured? Don't see any traces of it in the repo or elsewhere 😛

Copy link
Owner

Choose a reason for hiding this comment

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

.pre-commit-config.yaml Outdated Show resolved Hide resolved
@sondrelg sondrelg force-pushed the pre-commit branch 3 times, most recently from 39488bc to 939b6b7 Compare May 31, 2021 07:21
@sondrelg
Copy link
Contributor Author

sondrelg commented May 31, 2021

If you want, I could also add a linting workflow and/or test workflow to the project to run on pull-requests

Sure that would be nice. And it would be actually great if GHA would be used for all the CI related activities.

Workflow now seems to work (see here) 🎉

I removed tests from the flake8-ignore list, added mypy, and added configs for the flake8-packages used 🙂

UPDATE: And I removed python 3.10 for now - there was an error there that I think might be something we can fix in #14 instead 👍

Copy link
Owner

@jerry-git jerry-git left a comment

Choose a reason for hiding this comment

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

Great stuff 💪

Thank you!

@jerry-git jerry-git merged commit e67d449 into jerry-git:master May 31, 2021
@sondrelg sondrelg deleted the pre-commit branch May 31, 2021 07:52
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