Skip to content

Latest commit

 

History

History

lesson-01-precommit

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

CRVFunder 1: pre-commit

The CRVFunder series is a short series exploring using Brownie at an application level. Specifically, we'll be looking at how Brownie was used to help rapidly prototype the CRVFunder application. CRVFunder launched a new fundraising gauge type to divert CRV inflation to any cause as voted on by the Curve DAO.

Throughout this series we'll be pointing to snapshots of the code in development. The actual repository is available at @vefunder/crvfunder. The code contained here in the crvfunder directory shows the application snapshot as it existed at 74d51bc

GIT HOOKS

Git Hooks are a way to fire off custom scripts when certain important actions occur. Pre-commit inspects a snapshot before it is committed. Further details at: https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks

GITHUB ACTIONS MIX

A Brownie template preconfigured for continuous integration with Github Actions, standardized testing environments with tox, linting checks (black, flake8, isort) and pre-commit for linting hooks. To create an empty brownie environment configured with github actions

brownie bake github-actions

Additional Brownie mixes can be browsed in the @brownie-mix Github repository.

LINTING TOOLS

Linters are tools used to flag programming errors, bugs, and coding issues

  • black: a PEP 8 compliant opinionated formatter with its own style
  • flake8: wrapper for PyFlakes, pycodestyle + McCabe
  • isort: Python utility to organize imports

PRECOMMIT CONFIG

Configuration details for linters are stored in .precommit-config.yaml