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

Anpl 862 configure pre commit for dev #1079

Merged
merged 85 commits into from
Dec 7, 2022

Conversation

ahbensiali
Copy link
Contributor

@ahbensiali ahbensiali commented Oct 14, 2022

pre-commit added to stack

📝 Summary

As part of our code cleanup and linting efforts, pre-commit has been added using this ticket.
pre-commit is the main container that holds other tools used to clean and check our code and commits.

This PR ...

  • added pre-commit
  • added pre-commit configs
  • added flake8 & configs
  • added isort
  • added black
  • added commit-msg configuration for message validation

Merging this PR will have the following side-effects:

  • no affect in deployment only in local

🔍 What should the reviewer concentrate on?

  • testing commit message format
  • test black and isort work by changing something in a python file
  • check flake works by seeing if a changed file throws up errors

🧑‍💻 How should the reviewer test these changes?

  • pull changes
  • pip install -r requirements.dev.txt
  • pre-commit install --hook-type commit-msg
  • pre-commit install
  • add & commit files as normal
  • omit jira ticket number to check jira check is working
  • change a python file to have it formatted

📚 Documentation status

  • No changes to the documentation are required
  • This PR includes all relevant documentation
  • Documentation will be added in the future because ... (see #ANPL-...)

Bumps [django-filter](https://github.com/carltongibson/django-filter) from 2.3.0 to 22.1.
- [Release notes](https://github.com/carltongibson/django-filter/releases)
- [Changelog](https://github.com/carltongibson/django-filter/blob/main/CHANGES.rst)
- [Commits](carltongibson/django-filter@2.3.0...22.1)

---
updated-dependencies:
- dependency-name: django-filter
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@ahbensiali ahbensiali requested review from ymao2 and LouiseABowler and removed request for ymao2 October 14, 2022 08:40
.pre-commit-config.yaml Outdated Show resolved Hide resolved
.pre-commit-config.yaml Outdated Show resolved Hide resolved
.pre-commit-config.yaml Outdated Show resolved Hide resolved
.pre-commit-config.yaml Show resolved Hide resolved
.flake8 Outdated Show resolved Hide resolved
@ahbensiali ahbensiali force-pushed the ANPL-862-configure-pre-commit-for-dev branch from 3f6166c to 8a2ab61 Compare October 28, 2022 09:55
Copy link
Contributor

@LouiseABowler LouiseABowler left a comment

Choose a reason for hiding this comment

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

I've left one question that I think we should resolve before merging but pre-commit is working as expected for me now 👍

.pre-commit-config.yaml Outdated Show resolved Hide resolved
.pre-commit-config.yaml Outdated Show resolved Hide resolved
.pre-commit-config.yaml Outdated Show resolved Hide resolved
.pre-commit-config.yaml Outdated Show resolved Hide resolved
Copy link
Contributor

@LouiseABowler LouiseABowler left a comment

Choose a reason for hiding this comment

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

I've given each of the checks a try and they're all working as expected, nice work @ahbensiali! 🙌

I'll approve now so you can merge when you want to, but we shouldn't each start using the hooks ourselves until we do the big formatting commit at some point in the next couple of weeks.

@ahbensiali ahbensiali merged commit aac4189 into main Dec 7, 2022
@ahbensiali ahbensiali deleted the ANPL-862-configure-pre-commit-for-dev branch December 7, 2022 19:38
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