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

Attempt to run trunk & check for FIXMEs on PR #96

Conversation

katybaulch
Copy link
Contributor

@katybaulch katybaulch commented Mar 7, 2024

Description

Enable trunk check for admin backend repo. More info on trunk check here.

  • Migrated from using python based git pre-commits to using trunk to speed and standardise across all repos
  • Moved Python precommit validation CI job into reusable workflow that can be used in other Python repos
  • Fixed all auto-fixable problems using trunk
  • Enable trunk check and fmt actions as precommits (only for changed files)
  • Explictly add app, integration_tests and unit_tests folders to project packages so Pyright doesn't give missing import errors
  • Install using no-root in dockerfile to prevent install error
  • Migrated all makefile commands to use Docker Compose v2
  • Enable the following tools for this repo by default (trunk will automatically recommend ones to remove or add as your project changes):
  • actionlint
  • bandit (on non test files)
  • black
  • checkov
  • git-diff-check
  • hadolint
  • isort
  • markdownlint
  • osv-scanner
  • the precommit hooks detect-aws-credentials, check_json and end-of-file-fixer . A more exhaustive list can be found here, but they need to be manually enabled in the trunk.yaml file
  • prettier
  • pyright
  • ruff
  • shellcheck
  • shfmt
  • taplo
  • terrascan
  • trivy
  • trufflehof
  • yamllint

Proposed version

Please select the option below that is most relevant from the list below. This
will be used to generate the next tag version name during auto-tagging.

  • Patch
  • Minor version
  • Major version

Visit the Semver website to understand the
difference between MAJOR, MINOR, and PATCH versions.

Notes:

  • If none of these options are selected, auto-tagging will fail
  • Where multiple options are selected, the most senior option ticked will be
    used -- e.g. Major > Minor > Patch
  • If you are selecting the version in the list above using the textbox, make
    sure your selected option is marked [x] with no spaces in between the
    brackets and the x

Type of change

Please select the option(s) below that are most relevant:

  • Bug fix
  • New feature
  • Breaking change

How Has This Been Tested?

Please describe the tests that you added to verify your changes.

Reviewer Checklist

  • The PR represents a single feature (small drive-by fixes are also ok)
  • The PR includes tests that are sufficient for the level of risk
  • The code is sufficiently commented, particularly in hard-to-understand areas
  • Any required documentation updates have been made
  • Any TODOs added are captured in future tickets
  • No FIXMEs remain

Copy link

linear bot commented Mar 7, 2024

@katybaulch katybaulch marked this pull request as ready for review March 11, 2024 18:37
@katybaulch katybaulch requested a review from a team as a code owner March 11, 2024 18:37
@katybaulch katybaulch merged commit 6ce2761 into main Mar 13, 2024
9 checks passed
@katybaulch katybaulch deleted the PDCT-916/add-precommit-hooks-to-db-client-to-bring-in-line-with-other-repos branch March 13, 2024 10:25
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